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(CA2023: Adds validation against invalid braces in logger message templates) #7286
base: main
Are you sure you want to change the base?
Conversation
Kritner
commented
Apr 10, 2024
- Fixes Malformed message template string should throw warning or compiler error as a preference over runtime exceptions #7285
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7286 +/- ##
=======================================
Coverage 96.48% 96.48%
=======================================
Files 1443 1443
Lines 345394 345483 +89
Branches 11364 11378 +14
=======================================
+ Hits 333240 333330 +90
+ Misses 9275 9274 -1
Partials 2879 2879 |
getting this build error, both prior to and after making updates to the files mentioned. I'm not sure if this command is supposed to be run locally, or as a part of the build automatically; but i was getting errors attempting to run it locally. going to revert changes to these two files mentioned and just double check the same error occurs:
|
@buyaa-n i think this might be good to go now - though i'm a bit unsure of the git flow being used. I'm assuming i want to target my PR to the (I only tagged you because of your activity on #7285, lmk if i should tag someone else or just let this thing sit til it gets through some queue) |
src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/LoggerMessageDefineAnalyzer.cs
Show resolved
Hide resolved
No this should target main, only servicing changes should target release branches |
This reverts commit e640355.
This reverts commit 4c41c4e.
* Needed to have a title and description that match *both* potential reasons for this warning * The individual messages for the differing reasons is still separate, but the MD/sarif description seemed to be "last wins" when it comes to a title/description * The `msbuild /t:pack` command kept failing for me, so upped the global.json to target a non preview .net8 SDK, but am not checking that change in
78c69e7
to
211c166
Compare
This reverts commit 26f1e68.
This reverts commit 386fe96.
* Will likely need a follow up commit to "undo" the "new" tags around `CA2017`, as these should now match from main
…ated" versions from CA2017 * CA2017 was originally repurposed, which caused undesired impacts to already released versions of the analyzer. Instead these changes are introduced as a new CA2023 dotnet#7286 (comment)
Hey just wanted to bump this to check if anything is needed from me, and/or what next steps are? |
@stephentoub could you please advise if we can handle this in already existing rule or do you think we need to introduce a new analysis rule with new diagnostic? |
@Kritner thanks for helping with this issue. If we'll continue having a new diagnostic we'll need to get approval for it before we proceed. Could you please log a new issue in the runtime repo to track reviewing it? here is some example issue dotnet/runtime#78406 which you can mimic. meanwhile I converted this PR to draft till we finalize the process. |
from @tarekgh:
added dotnet/runtime#101698 |