-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added [Constant] attribute. #687
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also dunno if @j3parker still has reservations of this approach vs just doing it specifically for logging? Only know what was in that initial slack thread before the break. |
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 some notes -- looks good!
Can be used to fix #518 - Added D2L.CodeStyle.Annotations.Contract.ConstantAttribute.cs - Added D2L.CodeStyle.Analyzers.Helpers.ConstantAnalyzer.cs - Added D2L.CodeStyle.Analyzers.Tests.Specs.ConstantAnalyzer.cs - Moved common method from Analyzers.ApiUsage.NotNullAnalyzer.cs to Analyzers.ExtensionMethods.cs - Changed to extension method on ISymbol
Added tests to check specific logging cases.
8d6cb08
to
df5c4bc
Compare
…ctly. Added more explanatory comments. Changed HasAttribute() to compare symbols instead of strings. Closes #697
src/D2L.CodeStyle.Analyzers/Extensions/Microsoft.CodeAnalysis.cs
Outdated
Show resolved
Hide resolved
Cleaned up comments and whitespace.
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.
Nice!
Co-authored-by: Jacob Parker <jacob@solidangle.ca>
Can be used to fix #518