行不应超过 80 个字符。 lint_length_linter;使用 <-,而不是 =,用于 assignment.assignment_linter

lines should not be more than 80 characters. lint_length_linter; Use <-, not =, for assignment.assignment_linter

我在vscode中使用R,它会抛出许多带有蓝色波浪下划线的注释,例如'lines should not be more than 80 characters. lint_length_linte'、'Use <-, not =, for assignment.assignment_linter'.

在解决此问题的项目中创建“.lintr”文件,请参阅 details。并且关闭选项 Lsp:Diagnostics 也可以解决。但我想知道如何通过修改某些配置文件(如 r.json、.Rprofile 等)来设置适用于所有 R 项目的全局设置。我尝试了但失败了。

some of the problems detected by lintr enter image description here

将全局 lintr 配置文件放在 ~/.lintr 将全局生效。