Repository navigation
Use XPath for T_and_F_symbol_linter and fix false positives - #759
Conversation
|
The That said: Maybe
WDYT? |
I agree with this (and have run into this issue before). FWIW, using T/F as variables is against the style guide due to conflicts with |
| xml_nodes_to_lint <- function(xml, source_file, message, linter, | ||
| type = c("style", "warning", "error")) { | ||
| type = c("style", "warning", "error"), | ||
| offset = 0L) { |
There was a problem hiding this comment.
nice extension! eventually i think we can refactor a lot of the XPath lints to use this helper. Basically as long as message is static (e.g. this isn't the case for seq_linter) I think this can be used.
There was a problem hiding this comment.
Maybe we can even vectorize on xml and message?
The T and F symbol linter needs a wrapper at the call site that just generates the proper message.
All call sites lapply() over some nodeset, and the function name actually suggests nodes and not a node.
There was a problem hiding this comment.
Let's tuck this away to revisit for now
16dfbd5 to
e29e501
Compare
|
r-release CI failures are due to #761. |
fixes #657
Migrating to XPath makes adding other exceptions easier as well.
Had to add the argument
offsettoxml_nodes_to_lintto keep the column numbers unchanged.