Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class-declaration-abstractness-changed #974

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mamatha1718
Copy link

Closes #

Changes

Flags

Screenshots or Video

Related Issues

  • Issue #
  • Pull Request #

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

Copy link

@DS-AdamMilazzo DS-AdamMilazzo left a comment

Choose a reason for hiding this comment

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

I'm sure the Concerto team would like to see something in the PR description.

@@ -54,11 +54,17 @@ const classDeclarationTypeChanged: ComparerFactory = (context) => ({
if (aType === bType) {
return;
}
context.report({

Choose a reason for hiding this comment

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

The existing type-change report shouldn't be removed. Instead, the if statement above should be inverted (aType !== bType or whatever) and the report should be put in there.

const changeSeverity = isAbstract(a) ? 'minor' : 'major';
context.report({
key: 'class-declaration-abstractness-changed',
message: `The class "${a.getName()}" changed from ${changeType} (${changeSeverity} change).`,

Choose a reason for hiding this comment

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

The severity can't simply be expressed in the message but must be defined here:

You'll need to create two different keys: one for abstract to concrete, and one for concrete to abstract.

Copy link
Author

@Mamatha1718 Mamatha1718 Dec 22, 2024

Choose a reason for hiding this comment

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

I have added the rules, and change the severity to changeKey.
The pull request is ready for review.
please let me know if any changes need.

@DS-AdamMilazzo
Copy link

It looks okay to me, but I'm not part of the Concerto team so they'll have to review it. I expect they would like to see a test, for example. I think you can search for the other result codes (keys) and find where the existing tests are.

@Mamatha1718
Copy link
Author

Mamatha1718 commented Dec 22, 2024 via email

@Mamatha1718
Copy link
Author

Mamatha1718 commented Dec 22, 2024 via email

@DS-AdamMilazzo
Copy link

I’m really interested in contributing to the Accord project, especially for GSoC 2025.

Thank you. I'm not part of the Accord/Concerto team, but I'd recommend asking @dselman or @mttrbrts, who are the principals behind it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants