-
Notifications
You must be signed in to change notification settings - Fork 141
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
Deprecate rules overlapping with SQ or deprecated in SpotBugs #386
Conversation
- Read the 'deprecated' rules in the spotbugs metadata and add a SQ status for deprecated rule - Regenerated the rules metadata - Added a unit test to check that the status is read from the metadata
Mark rules as deprecated when there's a native SonarQube rule providing overlapping function. Update the description to include a link to the SonarQube rule
Hello, I've added changes to address issue #304 by marking some issues as deprecated, there's a link pointing to the native SonarQube rule in the description: @KengoTODA I also took the liberty to incorporate commit 22f3eab , it was never merged into the master but it makes the update of the rules metadata easier. I think this PR can be reviewed at this point, let me know if this needs further work |
I think the replacement rules description all have to change from squid: to java:, otherwise at least with modern sonarqube versions the links might not work |
@reitzmichnicht I think you're right I've tested by adding the SQ java plugin (on a bare SQ) and it worked but when testing with SQ + built-in plugins it should be java: and not squid: |
USBR_UNNECESSARY_STORE_BEFORE_RETURN has false positives with instanceof pattern matching: if (x instanceof ABC a) return a;
The spotbugs rules metadata contains an optional 'deprecated' flag but it is currently ignored by the plugin.
SQ rules have a 'status' attribute which can be set to DEPRECATED.
The purpose of this PR is to set the status to DEPRECATED for deprecated spotbugs rules.
Apparently there are no deprecated rules in FB-contrib or FSB
status for deprecated rule