-
Notifications
You must be signed in to change notification settings - Fork 463
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
Don't emit CA1064 in executables #7234
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7234 +/- ##
========================================
Coverage 96.49% 96.49%
========================================
Files 1443 1443
Lines 345670 345799 +129
Branches 11370 11374 +4
========================================
+ Hits 333552 333677 +125
- Misses 9240 9241 +1
- Partials 2878 2881 +3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @CollinAlpert for the fix, as discussed in the issue we don't want to exclude exception types from CA1515, instead it's better to exclude diagnostic for CA1064 Exceptions should be public: in executable.
- Please revert the
Exclude exception types from CA1515
part from the PR, looks you also did some code refactoring for the analyzer we can accept that part. - If you are interested fixing the issue by excluding CA1064 diagnostics for executable, that will be great, but not required
Thanks for the hint, I have reverted the change to CA1515 and tweaked CA1064. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, overall looks great, thank you @CollinAlpert!
src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/MakeTypesInternal.cs
Show resolved
Hide resolved
...tAnalyzers/CSharp/Microsoft.CodeQuality.Analyzers/Maintainability/CSharpMakeTypesInternal.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/MakeTypesInternal.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CollinAlpert looks good
Affected analyzers: MakeTypesInternal, ExceptionsShouldBePublicAnalyzer
Affected diagnostic IDs: CA1515, CA1064
This PR ensures that exception types are not suggested to be made internal, as this could conflict with CA1064.
Fixes #7191