-
Notifications
You must be signed in to change notification settings - Fork 93
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
.lintr defaults are not respected #235
Comments
What editor was it? |
Ups sorry, forgot that you do editor-agnostic work here -> vscode. |
By any chance, did you ever specified languageserver.default_linters in .Rprofile? That setting is now deprecated. |
I could reproduce this. It's actually a bug on our side. Since we use Since there's no exported functions for us to get the linters specified in the right config file, fixing it would be a little tricky. Any good idea, @randy3k? |
I guess we could hack into https://github.com/jimhester/lintr/blob/1a7114b87c4d672772c74ffc30c932dcdb3ce017/R/settings.R#L64 to specify |
It looks we could safely specify |
I test with setting |
Thanks for taking this on so quickly. Unfortunately, linting is now completely broken for me (with latest dev).
in the "Problems" pane. I had to roll back to b5ce3a8. |
@pat-s Would you like to turn on the R lsp debug and see the output of the languageserver. For example, if I put a
To ensure your lintr::lint("path/to/your_file.R") |
Looks like we should write the error message as the diagnostics message to make it easier to debug. |
d6dba1b shows the diagnostics error. Please try it and let us know the error shown in the diagnostics. For example, if the
|
Thanks @renkun-ken for helping. With latest dev, the diagnostic message I get is unfortunately not that much informative:
With languageserver diagnostics I get
Seems like something is wrong within the R script as I get lintr::lint("~/git/mlr3learners/mlr3learners.fnn/R/LearnerClassifFNN.R")
Error in linters[[linter]](expr) : attempt to apply non-function The call works with default linters, i.e. This is also fine And the following causes the issue: I think it is an {lintr} issue: r-lib/lintr#471 Nevertheless the latest changes should help users tracking down issues in the future! Thanks. |
I have a
.lintr
file in my repo root and runninglintr::lint_package()
works fine.However, the disabled linters are not honored from languageserver and still appear in the problems pane.
.lintr
The text was updated successfully, but these errors were encountered: