Reputation: 11
I exclude our JUnit test from the scanning, however, I would like for it to be scanned for certain set of rule, how can I configure SonarQube to do this?
Upvotes: 0
Views: 42
Reputation: 3121
The SonarQube documentation page Narrowing the focus allows you to specifically target some files for given set of rules. It probably can help you achieve what you want to do.
Now, the SonarJava analyzer already separates Main sources files from Test Source files. Correctly configured, your project will then apply only rules targeting tests on files categorized as "Test Sources". The same way, rules are usually targeting Main sources only.
Upvotes: 1