concerto icon indicating copy to clipboard operation
concerto copied to clipboard

fix(concerto-analysis): inheritance bug solved in /packages/concerto-analysis related to i/1067 raised

Open rnema19 opened this issue 2 months ago • 3 comments

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

  • Issue #1067

Author Checklist

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

rnema19 avatar Oct 22 '25 20:10 rnema19

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

ekarademir avatar Oct 23 '25 11:10 ekarademir

@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 avatar Oct 23 '25 11:10 rnema19

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

ekarademir avatar Oct 23 '25 11:10 ekarademir

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[bot] avatar Nov 18 '25 02:11 github-actions[bot]