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

Better warnings/errors for allow-comments #252

Open
ZedThree opened this issue Dec 20, 2024 · 1 comment
Open

Better warnings/errors for allow-comments #252

ZedThree opened this issue Dec 20, 2024 · 1 comment
Assignees

Comments

@ZedThree
Copy link
Member

Currently we just abort if an allow comment is not a valid rule, but we should instead raise a violation, which would allow us to include the line number etc.

We should also warn if an allow-comment isn't used and so can be removed.

@ZedThree
Copy link
Member Author

Hmm, this isn't so straight forward to raise it as a normal Diagnostic, as we want a Rule that's not normally checked (i.e. not text, path, or AST).

So maybe we want a fourth category or None -- could also be useful for test rules?

We could continue to hard-error, just with a custom struct with a nicer Display, but this wouldn't work for unused-allow-comment

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

1 participant