-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add/export a readable wrapper for testing whether a linter is on an expression or the whole file #921
Comments
Good idea. Impl would be something like
|
Twice now I've been bitten by the OTOH, maybe we could add a "dummy tree" when parsing fails and we can't add a real AST? Something as simple as
Currently the failure mode is highly obscure:
|
Better use |
We've got (minor perturbations of) this little idiomatic piece at the top of basically every linter:
lintr/R/cyclocomp_linter.R
Lines 13 to 15 in 23b06bd
lintr/R/line_length_linter.R
Line 13 in 23b06bd
lintr/R/missing_argument_linter.R
Line 11 in 23b06bd
This is too obscure to a first-time reader. We should add a wrapper of this expression that makes it clear what's being done/why, and also export it for use in custom downstream linters.
The text was updated successfully, but these errors were encountered: