-
Notifications
You must be signed in to change notification settings - Fork 473
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
Enabled logging analyzer on new repo #5244
Conversation
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
...etAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
Got caught up with conflicts from diagnostics on other PRs getting merged and me having to change my diagnostic numbers on this PR. Currently checking to see if the CI build is successful before pushing up a WIP commit trying to address using operation analysis instead of syntax analysis. Once that is done, I will address the remaining feedback. |
Codecov Report
@@ Coverage Diff @@
## release/6.0.1xx #5244 +/- ##
===================================================
- Coverage 95.62% 95.60% -0.03%
===================================================
Files 1233 1236 +3
Lines 283449 283895 +446
Branches 16968 17032 +64
===================================================
+ Hits 271052 271418 +366
- Misses 10108 10179 +71
- Partials 2289 2298 +9 |
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
the MemberData test cases for |
...etAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.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.
Since there is no language specific logic now. I believe this can be moved up from CSharp
to Core
without any extra work other than unit tests.
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
The test failures still need looking into. @sharwell and I plan on looking at this again today. |
@maryamariyan I'm not seeing test failures in CI. The failure in CI is due to auto-generated files being outdated. Can you run
|
src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineTests.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
The PR is ready for review :) |
...etAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx
Outdated
Show resolved
Hide resolved
- Switch category to Reliability for fifth diagnostic - Switch severity to hidden from disabled for first two
OK, will address in a follow up PR |
src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineTests.cs
Outdated
Show resolved
Hide resolved
src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Outdated
Show resolved
Hide resolved
The message structure looks good to me, but the |
Head branch was pushed to by a user without write access
I renamed to "named placeholder" from "named hole", since that works as well |
💯 |
The dotnet/extensions code: https://github.com/dotnet/extensions/tree/master/src/Logging/Logging.Analyzers
cc: @mavasani @sharwell @pgovind