SonarSource / sonar-go-archived

SonarGo: Go Analyzer for SonarQube
https://docs.sonarqube.org/display/PLUG/SonarGo
Other
120 stars 24 forks source link

Support subtests when importing json test report #351

Closed rittneje closed 5 years ago

rittneje commented 5 years ago

If you use sub-tests, the test name gets reported as "TestName/SubTestName". When this plugin attempts to lookup the file name from the test name, it looks for a function with that name, which obviously doesn't exist. You need to split on the first slash (if any) and use that when looking up the test function.

https://github.com/SonarSource/sonar-go/blob/9bd2b791e42574a9a056a9302c8d6d6886dfdb42/sonar-go-plugin/src/main/java/org/sonar/go/plugin/GoTestSensor.java#L139