r-lib / lintr

Static Code Analysis for R
https://lintr.r-lib.org
Other
1.16k stars 184 forks source link

Linting is too agressive #2592

Closed Jacinto27 closed 4 weeks ago

Jacinto27 commented 4 weeks ago

Too many miniscule and almost meaningless errors are raised by default on the languageserve package, and consecuently, the VS Code extension and implementation of the lintr package. Perhaps some communication between lintr and languageserver to create a better default?

Info:

vs-codeR: Less aggressive linting #1400

lintr documentation regarding the languageserver defaults

Don't know if issue has been raised here already. Checked closed issues and found nothing, did not check open issues.

MichaelChirico commented 4 weeks ago

{lintr} will not change its defaults; enforcing the tidyverse guide as a default is a core development principle of the package.

If there is any FR for improving how to set lint configuration, please elaborate. Or if this is a documentation issue, that is also something we can help with. PRs especially welcome.

Barring that, it looks like a VScode issue -- as noted they already ship a non-default line_length_linter(), so they should be willing to ship non-defaults for other linters too. It looks like that default config is here:

https://github.com/REditorSupport/vscode-R/blob/b196c7d8257a04509de68a3bfe7acf9c1f2fba85/R/.lintr#L2

Jacinto27 commented 4 weeks ago

In other words, there is nothing peculiar to this extension. This is the default configuration for the lintr package

Originally posted by @eitsupi in https://github.com/REditorSupport/vscode-R/issues/1400#issuecomment-1867864350


Barring that, it looks like a VScode issue -- as noted they already ship a non-default line_length_linter(), so they should be willing to ship non-defaults for other linters too.


??

Despite this, given that vscode-R is the final user, it should be their responsability to wrap it's dependencies, especially considering that "the tidyverse guide as a default is a core development principle of the package", and avoid people fidgetting with the lintr file. Will reference these comments on the vscode-R repo.