-
Notifications
You must be signed in to change notification settings - Fork 222
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
Do not skip source files that contains "ExcludeFromCodeCoverage*" attributes #428
Comments
Related issue #155 |
Why wouldn't you want to skip a file that is telling you to skip it? |
It's saying to exclude the file from code coverage, not from static code analysis, right? |
It would be fine if they are still scanned, but thay are listed to be not covered by unit tests. I did only mark some methods/Properties to not be exclued from code coverage but sonar still say they need to be covered. |
Hi @DanielHWe, this issue was closed 2 years ago. Please create a new topic on https://community.sonarsource.com with full description of your scenario that could help to understand the situation. Thank you |
Description
If a source file contains "ExcludeFromCodeCoverage" or "ExcludeFromCodeCoverageAttribute" code attribute, the analyzer will skip the file from the analysis.
This mechanism has been put in place the prevent SonarC# to analyze generated source code. This codding attributes are not related to auto-generated code.
The aim of this issue to prevent the analyzer to skip any source file relying on these coding attributes.
Here is the related source code.
Repro steps
Related information
It impact any analysis since version 5.4 of SonarC#.
The text was updated successfully, but these errors were encountered: