S2699 logs warning in default config

(Mike Noordermeer) #1

Version used
SonarQube 7.7

Problem
A warning is logged: Unable to create a corresponding matcher for custom assertion method, please check the format of the following symbol: ''

Steps to reproduce

  • Run an analysis with Java rule S2699 enabled and unit tests present

Expected behaviour
No warning is logged in default config.

More info
It seems this method should check if customAssertionMethods is not empty: https://github.com/SonarSource/sonar-java/blob/f9682a75325810476bc09c65e4290c5b49f27891/java-checks/src/main/java/org/sonar/java/checks/AssertionsInTestsCheck.java#L133

(Michael Düsterhus) #2

I see the same unexpected behavior in our SonarQube 7.7 log.

(Aram Mirzadeh) #3

7.7 on Linux confirmed. Client also on linux using gradle.