-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Tasks for this ticket
- align logging - all coverage parsers should point users to
Verify sonar.sources in .sonarqube\\out\\sonar-project.properties. - improve logging in the ScannerFileService to mention "file is not indexed or does not have the supported language."
Context
Related to this forum topic.
In the ScannerFileService we currently log:
DEBUG: Did not find deterministic source path in 'C:\_\some\path\file.cs'. Will skip this coverage entry. Verify sonar.sources in .sonarqube\out\sonar-project.properties."
When the file is not indexed (path mismatch in coverage report vs what the S4NET knows).
There's quite some indirect logic that we've added when we added support for deterministic source paths in code coverage reports. Because for VS Coverage reports, when a file is not indexed, the information is not logged in the VisualStudioCoverageXmlReportParser:
Line 125 in cfee18a
| // debug logging should be done in the fileService |
but in the ScannerFileService the logging message does not mention indexed files, only "deterministic source paths".
Line 76 in cfee18a
| LOG.debug("Did not find deterministic source path in '{}'. Will skip this coverage entry. Verify sonar.sources in .sonarqube\\out\\sonar-project.properties.", deterministicBuildPath); |
Compare this with the other report parsers, which log not indexed files in a more direct manner:
Line 131 in cfee18a
| LOG.debug("Skipping the file {}, line '{}', visitCount '{}' because file is not indexed or does not have the supported language.", |
Line 74 in cfee18a
| + " because it is not indexed or does not have the supported language.", fileCanonicalPath); |
Line 132 in cfee18a
| " which is not indexed or does not have the supported language.", |