-
Notifications
You must be signed in to change notification settings - Fork 185
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
New warning in 'designer' from object_usage_linter #1986
Comments
Similar warnings also in other packages:
|
Here's an MRE for the type of error that's unrecognized: lintr::lint(linters = lintr::object_usage_linter(), "
foo <- function() bar()
")
Warning message:
In parse_check_usage(fun, known_used_symbols = known_used_symbols, :
Possible bug in lintr: Couldn't parse usage message ‘<anonymous>: no visible global function definition for 'bar'
’. Ignoring 1 usage warnings. Please report an issue at https://github.com/r-lib/lintr/issues. |
c.f. the codetools::checkUsage({
foo <- function() bar()
})
# <anonymous>: no visible global function definition for ‘bar’
codetools::checkUsage({
foo <- function() {
bar()
}
})
# <anonymous>: no visible global function definition for ‘bar’ (:3) |
Not really a regression, the old version just kept silent about the problem. We should try to fix this though. |
would you mind having a crack at a fix? I thought it would be as simple as making this a Line 288 in ed91a2f
|
I can take a look, do you have MWEs for all the "Couldn't parse usage message" warnings you found? |
It was surprisingly easy to remedy - you were almost there. Just had to make the message part fit lazily. |
Haven't confirmed this is a regression yet, but we observe this warning on main that is not present on v3.0.2:
The text was updated successfully, but these errors were encountered: