-
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
refactor xml_nodes_to_lints() lint location to XPath #1234
Conversation
#' to the `Lint` object. If `lint_message` is a `function`, | ||
#' this function is first applied to `xml` (so it should be a | ||
#' function taking an `xml_node` as input and must produce a | ||
#' length-1 character as output). If `lint_message` is a character vector the same length as `xml`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to add a test to enforce the equal-lengths part more strictly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nonequal lengths will generate a recycling warning by .mapply()
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right... tidyverse usually hates recycling though and tends to error instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good candidate for a sanity-check follow up (in addition to the start <= column <= nchar(line)
check discussed below.
last few comments here. good overall! I think this API maximizes flexibility & has good defaults. |
…de_linter() even more
The build failure looks sporadic. Restarting should fix it. |
Fixes #1215
xml_nodes_to_lints()
to its own fileLint()
slist()
containingxml_node
s, even if it's not classedxml_nodeset
match_after_end
usages to XPath based locationscommas_linter()
commas_linter()
xml_nodes_to_lints()
spaces_inside_linter()
to usexml_nodes_to_lints()