-
Notifications
You must be signed in to change notification settings - Fork 108
explicit parse_settings = TRUE #706
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| if (file.exists(path)) { | ||
| lints <- lintr::lint(path, cache = cache, text = content) | ||
| lints <- lintr::lint(path, cache = cache, text = content, parse_settings = TRUE) |
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.
I think we can omit this diff? the change in {lintr}, IIRC, is about the latter invocation (no path, just text=).
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.
You are probably right about this, would need to double check to be sure :)
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.
I just had the same problem and had to modify a local copy of languageserver to fix my .linter file not being used (actually I was going to submit a PR myself).
I can confirm this change is necessary even in this case. :)
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.
In my opinion, it makes sense to always be explicit to protect from future lintr changes.
|
I'm unsure how the maintainers (I guess @renkun-ken @randy3k) want to proceed with this PR. Do you want me to bring this PR into a state so it can be merged, and what steps would that entail? Or would you rather implement a fix yourself (totally fine by me!)? |
|
@ManuelHentschel Sorry for bothering you, but could you take a look at this? |
According to https://github.com/r-lib/lintr/releases with lintr 3.3.0-1:
This means
.lintrfiles are ignored for the linting vscode does in the background by default. Explicitly settingparse_settings = TRUE(as suggested in this PR) helps.