Skip to content

Conversation

@rnema19
Copy link

@rnema19 rnema19 commented Oct 22, 2025

Closes Issue#1067

Changes

  • I have changed the /packages/concerto-analysis/src/**compare.ts file** for parent-child property inheritance. Earlier there was "a" child's property being inherited, now only "c" child's property is inherited
  • Key in findings(result) now displays an output -> key: 'optional-property-added'
  • I tried adding no additional code, just used different properties of Compare class defined in classdeclaration.js file in concerto-core directory, used getProperties() instead of getOwnProperties()
  • Now we have minor result(1) instead of major result(3)

Flags

  • You need to create a separate inheritance file to review the issue and check the result

Code

{
  findings: [
    {
      key: 'optional-property-added',
      message: 'The optional field "cProperty" was added to the concept "Parent"',
      element: [Field],
      result: 1
    }
  ],
  result: 1
}

Images

image

Results and Tests

  • All tests passed in npm run test, more than 96% patching found.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

@ekarademir
Copy link
Contributor

ekarademir commented Oct 23, 2025

@rnema19 Could you update the PR title to follow commit conventions please? https://www.conventionalcommits.org/en/v1.0.0/

@rnema19
Copy link
Author

rnema19 commented Oct 23, 2025

@rnema19 Could you update the PR title to follow commit conventions please? https://www.conventionalcommits.org/en/v1.0.0/

Sure, I'd be doing it immediately.

@rnema19 rnema19 changed the title Fixed Issue 1067: Inheritance bug solved in Concerto Analyser fix(concerto-analysis): inheritance bug solved in /packages/concerto-analysis related to i/1067 raised Oct 23, 2025
@ekarademir
Copy link
Contributor

@rnema19 could you also add test cases for the fix?

return;
}
this.compareProperties(comparers, a.getOwnProperties(), b.getOwnProperties());
let propsA = a.getOwnProperties();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't getProperties() return a super set of getOwnProperties()?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would, I'm working on getting exclusive inherited properties.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it fine if we use getAddedProperties to check additional or inherited properties, this way we could get the inherited properties set only?

this.compareProperties(comparers, a.getOwnProperties(), b.getOwnProperties());
let propsA = a.getOwnProperties();
let propsB = b.getOwnProperties();
if (a.getProperties()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this will at least return an empty array, so this condition will always be true.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 18, 2025
@github-actions github-actions bot closed this Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants