Repository navigation
add function_argument_linter() - #1420
Merged
Merged
Conversation
AshesITR
force-pushed
the
feature/450-function-argument-linter
branch
from
June 19, 2022 17:05
ee82388 to
6316738
Compare
MichaelChirico
left a comment
Collaborator
There was a problem hiding this comment.
Would you mind running this on all (a bunch of?) the tidyverse/r-lib packages? I have a feeling we may be missing some common case, or that it's violated a lot in practice. Any special care needed for S3 methods?
fix test failure pertaining to is_linter not being a linter factory.
Collaborator
Author
|
I'll try to do a run similar to indentation linter and report my findings some time later. |
| following-sibling::SYMBOL_FORMALS[not(following-sibling::*[1][self::EQ_FORMALS])]" | ||
| xpath <- paste(glue::glue( | ||
| "//{c('FUNCTION', 'OP-LAMBDA')}/following-sibling::EQ_FORMALS[1]/ | ||
| following-sibling::SYMBOL_FORMALS[not(following-sibling::*[not(self::COMMENT)][1][self::EQ_FORMALS])]" |
Collaborator
There was a problem hiding this comment.
nit: feels like a lot of whitespace here, no?
MichaelChirico
previously approved these changes
Jul 13, 2022
MichaelChirico
approved these changes
Jul 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #450.
Name chosen so that we can extend this linter to perform other checks on function argument lists in the future.
e.g.
tidyverseusually has defaults for arguments that appear after...