Template for a good new topic, formatted with Markdown:
- ALM used GitHub
- CI system used Jenkins
- Languages of the repository Java
The rule java:S1874 is written in Sonarcloud as Analysis Scope : Main sources
I understand that it should only report issues from my production files and not my tests files, right ?
It is, however, reported in my test files, see the screenshot
The full path of this file is
etech-central/src/test/java/eTech/ui/AbstractActivityTypeActionTest.java
My scope is defined in maven pom.xml as such :
Main project pom :
<sonar.exclusions>**/*.jsp,**/*.html,**/*.xml,**/*.css</sonar.exclusions>
Module pom : No definition of analysis scope
Here’s the logs in my Jenkins build :
[INFO] 12:02:57.114 Indexing files...
[INFO] 12:02:57.115 Project configuration:
[INFO] 12:02:57.115 Excluded sources: **/build-wrapper-dump.json, **/*.jsp, **/*.html, **/*.xml, **/*.css
...
[INFO] 12:02:57.270 Indexing files of module 'etech-central'
[INFO] 12:02:57.270 Base dir: /home/****/workspace/ETECH_eTech_main/etech-central
[INFO] 12:02:57.271 Source paths: pom.xml, src/main/java
[INFO] 12:02:57.271 Test paths: src/test/java
[INFO] 12:02:57.271 Excluded sources: **/build-wrapper-dump.json, **/*.jsp, **/*.html, **/*.xml, **/*.css
Am I just misunderstanding how the rules analysis scope is designed ? Should I update something on my setup ? Or is there some kind of bug ?