-
Notifications
You must be signed in to change notification settings - Fork 184
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
Linter for space needed after right parenthesis of function symbol formals #809
Comments
I don't know if there is any contribution guideline for lintr, therefore I am just going to ask - is it alright if I start working on this? Do you think it should be a new linter or be a part of an already existing linter? |
The following linters might be related to this issue, but they are quite unique on their own.
Looks like it enhances the If we are not to enhancing existing linters in this way, then we will need a new linter to specifically check this. |
I have created a PR for this issue. Let me know what you think. |
* feat(new linter): added a new linter * Added a new linter that checks for a space between the right parenthesis and the function body in function definitions that span one line and don't use braces Closes #809 * Added a new line at the end of paren_body_linter.R * Updated after review no 1 * Added `\` * Updated NEWS and README * update roxygen and document() * update roxygen and document() * Added a skip condition to the test with syntax available since R 4.1.0 * Refactored comparing versions * update NEWS to indicate paren_body_linter() is a default linter. Co-authored-by: Konrad Pagacz <konrad.pagacz@contractors.roche.com> Co-authored-by: Alexander Rosenstock <alexander.rosenstock@web.de>
Just notice that there seems to be no linter that complains about the following code
where a space is needed between
function(x)
andx + 1
.The text was updated successfully, but these errors were encountered: