Repository navigation
Correctly parse checkUsage when a multiline warning is encountered - #758
Conversation
|
Diff coverage needs a test for |
|
I've only tried this fix on one (very messy) file so far, but lintr is exiting with a new error before it gets to the multiline expression I wanted to test: When linting with the released version of lintr the next message emitted is a "Lines should not be more than 80 characters" -- if |
|
This seems vaguely related to #742. |
# Conflicts: # R/object_usage_linter.R # tests/testthat/test-object_usage_linter.R
|
We're still getting NA locations if the info doesn't match on the first line of the checkUsage info. |
add tests for 100% coverage
|
Now working without error and with correct messages for the case I reported above, but for completeness I can report narrowed the offending lines down to an if-else with unbound names in both conditions: Again, as of 9209e7a lintr is correctly warning on both lines and not erroring. |
|
Thanks for checking this out @infotroph. |
| foo <- function(x) { | ||
| with( | ||
| x, | ||
| `\u2019regex_kill` |
There was a problem hiding this comment.
the test here is a symbol name that's not matched by our regex? so that the linter has to default to where the expression starts
There was a problem hiding this comment.
The test causes the boundary, res$name, boundary regex to not match against the source code, yes.
fixes #507