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

Revamp analyzer diagnostic system #4626

Open
Tracked by #3727
ematipico opened this issue Nov 24, 2024 · 5 comments
Open
Tracked by #3727

Revamp analyzer diagnostic system #4626

ematipico opened this issue Nov 24, 2024 · 5 comments

Comments

@ematipico
Copy link
Member

ematipico commented Nov 24, 2024

Our analyzer currently works this way:

  • recommended rules emit a diagnostic error
  • non-recommended rules don't emit any diagnostic

This behaviour is different from the majority of linters/analyzers out there, and it's really confusing for people who use other tools. We intended to change it, so:

  • lint rules will always have a severity (it will be Severity::Information by default)
  • recommended rules won't change the severity of a rule

This means there could be lint rules that will have Severity::Warning rules and be recommended.

@Conaclos
Copy link
Member

Are there some rationales for using Severity::Information by default instead of Severity::Warning?

@ematipico
Copy link
Member Author

There are no particular rationales, feel free to propose something in here. Severity::Information is the Default implementation of Severity

@Conaclos
Copy link
Member

Maybe we should use the default implementation of Severity that should be Severity::Off?

@ematipico
Copy link
Member Author

That's a variant that doesn't exist in Severity. It's possible there's some misunderstanding, so instead of talking code, why don't you propose a "business logic" instead?

@Conaclos
Copy link
Member

Indeed, I had some understanding. Looks good to me.

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

No branches or pull requests

2 participants