Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQ Plugin: Should align logging for not indexed files #8503

Closed
andrei-epure-sonarsource opened this issue Dec 22, 2023 · 0 comments · Fixed by #9571
Closed

SQ Plugin: Should align logging for not indexed files #8503

andrei-epure-sonarsource opened this issue Dec 22, 2023 · 0 comments · Fixed by #9571
Assignees
Labels
Area: SQ Plugin Java plugin related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: UX Improve any kind of user experience
Milestone

Comments

@andrei-epure-sonarsource
Copy link
Contributor

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:

but in the ScannerFileService the logging message does not mention indexed files, only "deterministic source paths".

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:

LOG.debug("Skipping the file {}, line '{}', visitCount '{}' because file is not indexed or does not have the supported language.",

+ " because it is not indexed or does not have the supported language.", fileCanonicalPath);

" which is not indexed or does not have the supported language.",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: SQ Plugin Java plugin related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: UX Improve any kind of user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants