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

Don't mark @RuleProperty fields as final #1617

Merged
merged 2 commits into from
Dec 8, 2018

Conversation

ivangalkin
Copy link
Contributor

@ivangalkin ivangalkin commented Dec 8, 2018

Partial revert of "final" commit

Some of the fields, which represent the user customization of SonarQube rules were marked as `final`.
These are however changeable settings and are injected from SonarQube (see the `@RuleProperty` annotations).
Besides the fact, that this change in not logical it also **actually** prevents the fields of being changed.

E.g. I tried to create a custom quality profile with custom regular expression for `HardcodedIpCheck`.
The associated C++ project doesn't react on the customized regexp. The default one is used instead.

This reverts commit b92e83b1a13189395832da25a7db0ee16602e37e.
CommentContainsPatternChecker is not a SonarQube check

The class `CommentContainsPatternChecker` is a utility class, which
is used inside of the following checks

* FixmeTagPresenceCheck
* TodoTagPresenceCheck

`CommentContainsPatternChecker` is however not a check by itself.
All rules-related annotations are wrong.

This change is Reviewable

Some of the fields, which represent the user customization of SonarQube rules were marked as `final`.
These are however changeable settings and are injected from SonarQube (see the `@RuleProperty` annotations).
Besides the fact, that this change in not logical it also **actually** prevents the fields of being changed.

E.g. I tried to create a custom quality profile with custom regular expression for `HardcodedIpCheck`.
The associated C++ project doesn't react on the customized regexp. The default one is used instead.

This reverts commit b92e83b.
The class `CommentContainsPatternChecker` is a utility class, which
is used inside of the following checks

* FixmeTagPresenceCheck
* TodoTagPresenceCheck

`CommentContainsPatternChecker` is however not a check by itself.
All rules-related annotations are wrong.
@ivangalkin ivangalkin added this to the 1.2.1 milestone Dec 8, 2018
@ivangalkin ivangalkin self-assigned this Dec 8, 2018
@ivangalkin ivangalkin requested review from guwirth and Bertk December 8, 2018 15:09
@ivangalkin ivangalkin changed the title Don't mark @RuleProperty as final Don't mark @RuleProperty fields as final Dec 8, 2018
@guwirth guwirth merged commit ec64e41 into SonarOpenCommunity:master Dec 8, 2018
@guwirth guwirth mentioned this pull request Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants