-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix S1144 FP: Private Attributes #8342
Comments
Hi @jeremia, thanks for reporting this issue. I can reproduce it myself, and I can confirm it is indeed an issue that seems to appear when attributes are used. Meanwhile, waiting for a fix, you have the following options:
Hope it helps, |
@zsolt-kolbay-sonarsource please also change the title of the issue. |
Description
Regarding S1144: Remove the unused class 'XXX'
For a private attribute class without AttributeUsageAttribute SonarLint always reports the class as unused even if it's used.
Repro steps
namespace ConsoleApp;
Expected behavior
Only report CA1018: Specify AttributeUsage on XXX, Not S1144.
Actual behavior
Both S1144 and CA1018 is reported
Known workarounds
Att AttributeUsage: This removes both CA1018 (regarding attribute usage) and S1144 (regarding unused class).
Related information
The text was updated successfully, but these errors were encountered: