Template for a good bug report, formatted with Markdown:
- versions used (SonarQube - 8.6.1, Scanner, Plugin: gradle plugin: id “org.sonarqube” version “3.0”, java 11, Gradle 6.8.1)
I use SQ developer edition and have PR decoration enabled in my GitHub project. Project is Java and compiled using Gradle.
Issue: SonarQube doesn’t report issue on System.out.println statement being used in test code. I have the following test in src/test/java
test :
@Test
void shouldReportSonarIssue() {
System.out.println("Sout is forbidden!!!");
assertThat("test").isEqualTo("test");
}
After SQ analysis issue java:S106 is not reported on code above, but in the same time such issue is reported if it appears in main
code.
Is this a bug? Is it possible to reconfigure it somehow?