-
Notifications
You must be signed in to change notification settings - Fork 187
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
Exclusions read from .lintr are depedent of the current working directory #438
Comments
Could you post an example |
I'm using the code from linters: with_defaults(line_length_linter(120))
exclusions: list("inst/doc/creating_linters.R" = 1, "inst/example/bad.R", "tests/testthat/exclusions-test") |
Just seen this as well.
|
All calls to read_settings come from |
I noticed that in both I think that the issue won't be solved just by changing |
`read_settings` was modified: when it is passed a directory, any excluded files that are specified in a user config are now specified relative to the directory (eg, the package root), rather relative to the current working directory
Hi, I recently started using lintr and it's pretty great. Thank you to everyone involved!
I bumped into an issue related with the
exclusions
extracted from.lintr
files. It seems that the lint report depends on the current working directory of the R console.Running the following script while the working directory was in the root of the project (
lintr/
)does not show
inst/example/bad.R
in the report (since it's path is in.lintr
). Then, if I runthe file
inst/example/bad.R
shows in the report.There is a similar issue with
lint()
. I added a filelintr/inst/example/.lintr
with the contentThen, I ran the commands
and
bad.R
did not show up in the report (as expected). However, that was not the case when I ranFurthermore, when run directly from the console, it seems that
lint_dir()
always ignores the exclusions in.lintr
.Can you clarify if any of these contrasting behaviors are expected, or what the expected behaviors should be?
Thank you
João
The text was updated successfully, but these errors were encountered: