You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disable Lintr but keep other diagnostic errors #456
I was looking to see if there was a way to disable or edit the lintr warnings generated when r.lsp Diagnostics were turned on?
The errors that are generated when it is enabled are extremely useful, however most/all of the lintr warnings are irrelevant to the code base we are working on.
Sorry if this question has already been posted, but I have been searching through all the issues and other sites trying to find out this information, any assistance would be appreciated!
Thank you
Currently, all diagnostics in VS Code come from lintr, i.e. a collection of linters each checks a specific aspect of the code. The .lintr config will work no matter what IDE you use. If you edit your global lintr config (e.g. via file.edit("~/.lintr")) and put the following code in it:
then it will make all lintr::lint() deviate from the defaults with the specified settings above if lint(linters=) is not specified.
If you only want to change the linting of your particular project, then put the same file in your workspace folder (e.g. in the workspace folder in vscode terminal, file.edit(".lintr")). lintr will pick up this file instead of the global config file.
Activity
renkun-ken commentedon Jul 16, 2021
Do you want to disable specific linters globally or disable linting for specific files or projects?
renkun-ken commentedon Jul 16, 2021
Please take a look at https://github.com/jimhester/lintr#project-configuration which might be useful. Putting the config in
~/.lintrtakes effect globally, while${workspaceFolder}does only within the project.renkun-ken commentedon Jul 16, 2021
Currently, all diagnostics in VS Code come from lintr, i.e. a collection of linters each checks a specific aspect of the code. The
.lintrconfig will work no matter what IDE you use. If you edit your global lintr config (e.g. viafile.edit("~/.lintr")) and put the following code in it:then it will make all
lintr::lint()deviate from the defaults with the specified settings above iflint(linters=)is not specified.If you only want to change the linting of your particular project, then put the same file in your workspace folder (e.g. in the workspace folder in vscode terminal,
file.edit(".lintr")).lintrwill pick up this file instead of the global config file.renkun-ken commentedon Jul 16, 2021
You could take a look at the names of the linter you want to disable, and write them like
commented_code_linter = NULLto disable them.