Must-share information (formatted with Markdown):
- Sonarqube Community Edition Version 8.9.8, Azure Devops plugin
- SonarQube on premises
- try to have SonarQube ignore some C# files
- adding some //NOSONAR comments
I’d like to get rid of some code smells marked by SonarQube by adding the //NOSONAR comment in my C# (.cs) file, but SonarQube keeps analyzing them instead of ignoring them.
In this case, not only the code smell is not ignored, but SonarQube shows an additional code smell because “Single line comment should begin with a space”:
How could I solve this?
I was able to get rid at least of the “single line comment should begin with a space” code smell by adding the comment:
with a space between the slashes and NOSONAR, but I still get an error on the lowercase letter issue:
Anyone? Still blocked with this issue
Welcome to the community!
Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
8.9.8 → 9.9.1 → 10.1 (last step optional)
You may find these resources helpful:
If you have questions about upgrading, feel free to open a new thread for that here.
Regarding your question, not every language supports
NOSONAR comments for issue suppression.