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

ECS0600 is too coarse #74

Open
rjmurillo opened this issue Oct 24, 2024 · 0 comments
Open

ECS0600 is too coarse #74

rjmurillo opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or request triage
Milestone

Comments

@rjmurillo
Copy link
Owner

rjmurillo commented Oct 24, 2024

ECS0600 is intended to do two things:

  1. Promote the nameof operator when the symbol name is the same as the value (e.g. var Name = nameof(Name))
  2. Stop inlining the constant value during IL creation

This feels like two separate rules. The first is the existing ECS0600 but is a bit pedantic and should be moved to Suggestion. A new analyzer for the second case (e.g., ECS0601) that is a warning and only for publicly visible or Internalsvisibleto symbols

CC @MattKotsenas

@rjmurillo rjmurillo added this to the vNext milestone Oct 24, 2024
@rjmurillo rjmurillo added enhancement New feature or request triage labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant