SonarLint-Plugin IntelliJ does not analyze Test-Classes

Hi there,

I’m using SonarLint-Plugin for Intellij, and I’m wondering why SonarLint is not analyzing the code of my test-classes when triggering the inspection by “Analyze with SonarLint” context-menu.

when i rename the folder from ‘test’ to e.g.‘abc’ the inspection works.

Is this a normal behaviour and is there a way to configure this?

Thanks in advance

Best Regards

Klaus

Hello, thanks for your patience and sorry for the wait.

Test code is analyzed with a different rule set than production code. For instance, you might see issues on test methods that don’t have assertions, or test classes that don’t have test methods. But issues e.g on use of System.out or string duplication won’t be raised.

Since this thread is a bit old and I can’t reproduce this behavior with the latest SonarLint for IntelliJ, I suggest that you update to the latest version and open a new thread if you notice any unexpected behavior.