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 #9571

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

Tim-Pohlmann
Copy link
Contributor

Fixes #8503

@Tim-Pohlmann
Copy link
Contributor Author

@andrei-epure-sonarsource I assigned you as a secondary reviewer. Please confirm that the PR solves the issue.

Copy link
Contributor

@zsolt-kolbay-sonarsource zsolt-kolbay-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title Should align logging for not indexed files SQ Plugin: Should align logging for not indexed files Jul 30, 2024
assertThat(logTester.logs(Level.DEBUG).get(0)).isEqualTo("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.");
assertThat(logTester.logs(Level.DEBUG).get(0)).isEqualTo(
"The file 'C:\\_\\some\\path\\file.cs' is not indexed or does not have the supported language."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can fail either because there is a mismatch between the deterministic source path (due to some tooling issue) or because the file hasn't been indexed.

how can we make both possible cases clear? is it worth it? what would it help if you were the developer investigating such a case?

Did you look at the integration tests we have for deterministic code coverage, to get more context?

Copy link
Contributor Author

@Tim-Pohlmann Tim-Pohlmann Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored it a bit to improve the situation. I hope the messages make sense now.

Copy link
Contributor

@zsolt-kolbay-sonarsource zsolt-kolbay-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left one remark.

Copy link

sonarcloud bot commented Aug 2, 2024

Copy link

sonarcloud bot commented Aug 2, 2024

@Tim-Pohlmann Tim-Pohlmann merged commit 2bcf101 into master Aug 5, 2024
17 checks passed
@Tim-Pohlmann Tim-Pohlmann deleted the Tim/AlignLogging branch August 5, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQ Plugin: Should align logging for not indexed files
3 participants