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

Constant expected analyzer (CA1856) was approved as "Info" but implemented as **Error** #6342

Closed
Youssef1313 opened this issue Dec 13, 2022 · 3 comments

Comments

@Youssef1313
Copy link
Member

Implemented in #5766

Runtime issue: dotnet/runtime#33771

Severity: Info

Was that intended, or just a mistake?

@Youssef1313 Youssef1313 added Bug The product is not behaving according to its current intended design Area-Microsoft.CodeAnalysis.NetAnalyzers labels Dec 13, 2022
@Youssef1313
Copy link
Member Author

@buyaa-n Can you please take a look?

@buyaa-n
Copy link
Contributor

buyaa-n commented Dec 13, 2022

Severity: Info

Was that intended, or just a mistake?

That is the proposed severity, by the approved API it is Error:

  • Category: Performance
  • The default diagnostic for passing a non-constant value: Warning
  • The default diagnostic for a constant that's out of range: Warning
  • The default diagnostic for a constant that's out of range by composition with another ConstantExpected attribute: Warning
  • The default diagnostic for passing min/max that make no sense (wrong type, inverted, is a reference type, etc): Error

@buyaa-n buyaa-n closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
@Youssef1313 Youssef1313 added Resolution-By Design and removed Bug The product is not behaving according to its current intended design labels Dec 13, 2022
@Youssef1313
Copy link
Member Author

@buyaa-n Thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants