Skip to content
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

Logging Analyzer: Add code fixer for CA1727 and CA1848 #7241

Open
maryamariyan opened this issue Jul 28, 2021 · 5 comments
Open

Logging Analyzer: Add code fixer for CA1727 and CA1848 #7241

maryamariyan opened this issue Jul 28, 2021 · 5 comments
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers help wanted The issue is up-for-grabs, and can be claimed by commenting

Comments

@maryamariyan
Copy link
Member

We shipped logging analyzer diagnostics in 6.0, approved in issue dotnet/runtime#36064.

This issue tracks adding fixer for two of them:

  • CA1727: easy fixer, would involve uppercasing the named placeholder so it becomes pascal case.

  • CA1848: this diagnostic encourages using LoggerMessage delegates. The fixer could involve making use of the logging source generator as a code suggestion.

@ghost
Copy link

ghost commented Jul 28, 2021

Tagging subscribers to this area: @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

We shipped logging analyzer diagnostics in 6.0, approved in issue dotnet/runtime#36064.

This issue tracks adding fixer for two of them:

  • CA1727: easy fixer, would involve uppercasing the named placeholder so it becomes pascal case.

  • CA1848: this diagnostic encourages using LoggerMessage delegates. The fixer could involve making use of the logging source generator as a code suggestion.

Author: maryamariyan
Assignees: -
Labels:

area-Extensions-Logging, code-analyzer

Milestone: 7.0.0

@maryamariyan maryamariyan changed the title Add code fixer for CA1727 and CA1848 Logging Analyzer: Add code fixer for CA1727 and CA1848 Jul 28, 2021
@flcdrg
Copy link
Contributor

flcdrg commented Dec 15, 2021

FYI the documentation is missing for CA1848. The link from the analyzer - https://docs.microsoft.com/en-au/dotnet/fundamentals/code-analysis/quality-rules/ca1848 results in a 404

@maryamariyan
Copy link
Member Author

FYI the documentation is missing for CA1848. The link from the analyzer - https://docs.microsoft.com/en-au/dotnet/fundamentals/code-analysis/quality-rules/ca1848 results in a 404

This issue is tracked by dotnet/docs#23900

@carlossanlop
Copy link
Member

@maryamariyan do you plan on addressing these bug fixes in 7.0?

@buyaa-n buyaa-n added the help wanted The issue is up-for-grabs, and can be claimed by commenting label Nov 10, 2022
@buyaa-n
Copy link
Member

buyaa-n commented Nov 10, 2022

@maryamariyan looks the fixers proposed here are approved with the original API proposal, is that right? If so, we don't need to keep this issue in runtime, better to be transferred to the analyzer's repo for further implementation

@buyaa-n buyaa-n transferred this issue from dotnet/runtime Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzers help wanted The issue is up-for-grabs, and can be claimed by commenting
Projects
None yet
Development

No branches or pull requests

4 participants