Skip to content

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

@andrei-epure-sonarsource

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:

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.",

Metadata

Metadata

Assignees

Labels

UXImprove any kind of user experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions