Marcelo
Marcelo

Reputation: 167

Sonarqube rule for JUnit @Ignore

I'm concerned about some developers who usually ignore failing tests with @Ignore to bypass SonarQube static verification.

For that I'm looking a rule that creates issues.

Does anybody know how I could achieve this?

I'm using SonarQube 5.4 and JUnit.

Upvotes: 2

Views: 1224

Answers (1)

slartidan
slartidan

Reputation: 21608

There used to be a rule for this: Rule S1607: Tests should not be ignored (old)

However this rule was updated and now actually allows ignored Tests, if appropriatly commented: Rule S1607: JUnit4 @Ignored and JUnit5 @Disabled annotations should be used to disable tests and should provide a rationale (new)

Upvotes: 6

Related Questions