S2699 logs warning in default config

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

1 Like

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

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

Is there a workaround for this? I’m getting most of my tests not recorded and seeing this warning, not sure if it’s related but it’d be good to rule it out.