Refine list of test rules or make it user-configurable

Description

There are requests from the community that some rules, which are currently only checked for main code, should also be available for test code.

What we could do at least is to rethink the rule assignment to JAVA_MAIN_CHECKS and JAVA_TEST_CHECKS in or.sonar.plugins.java.CheckList. However, it would be better to leave the current as the default assignment and allow the user to change it by configuration, because:

  • The opinion about the assignment of specific rules will vary from user to user

  • Changing the default assignment would break the analysis for lots of projects, which would then suddenly have many new reported issues

We also need to keep in mind that for some rules, it’s stated in the RSPEC whether they are meant for main or test code, and we should stay compliant with that.

Activity

Show:
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Priority

Sentry

Created March 12, 2024 at 2:48 PM
Updated July 5, 2024 at 10:36 AM