-
Notifications
You must be signed in to change notification settings - Fork 186
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
Adding examples to documentation of each linter #1492
Comments
Need to wait for #1480 to be merged before I can work on this. |
This is a great idea. It would be ideal to also have a brief explanation/link for why that check happens - for instance, I do not understand why the |
Closes #1584 Part of #1492 Co-authored-by: Michael Chirico <[email protected]>
@LukasWallrich Have a look at the new docs. Hopefully, it's clear why the recommendation is so. |
Please don't forget to add a NEWS item of this when it's done :) |
Will do! :) |
Very helpful explanation, thanks. However, given that |
Hi @LukasWallrich, not that https://github.com/r-lib/lintr/blob/main/.lintr_new This is just an offered linter as some authors may prefer the robustness. I'm also reminded of my SO question from long, long ago: https://stackoverflow.com/q/29956250/3576984 While [[ is slower, it tends to be on the sub-millisecond scale. most authors should not be concerning themselves with the efficiency difference. |
Thanks Indrajeet!!! 💪💪💪 |
I think docs for each linter should have an examples section with at least one example of code that does produce lint and another that doesn't.
I think the style guide is good to provide the underlying rationale for the lint (provided that the reader actually clicks on that link!), but it doesn't lead to much exploration on the reader's part. Giving concrete examples means that the reader can just copy-paste examples and start toying around with them to see what does and doesn't lint.
Note to self: Make sure all of them follow the style guide, and so use
"
instead of'
, e.g.Progress tracker
The text was updated successfully, but these errors were encountered: