问题描述
我在 vscode 中使用 R,当一行超过 80 个字符时,它会抛出一个带有波浪线的注释:行不应超过 80 个字符.line_length_linter.但我没有在 lint 中找到它让 R 改变它.此外,在setting.json中,虽然我在互联网上搜索了它,但我不知道参数配置的名称.在此处输入图片描述
I use R in vscode, when the line has more than 80 characters , it will throw a note with a wavy line : Lines should not be more than 80 characters. line_length_linter. But i do not find it in lint for R to chage it. Moreover , in the setting.json, I do not know the name of parameter configuration though i search it in the internet.enter image description here
推荐答案
刚刚遇到了同样的问题.我找到了一个 为 Atom IDE 建议的解决方法,它也适用于 VSCode.
Just faced the same issue. I found a workaround suggested for Atom IDE and it works for VSCode too.
在您的项目文件夹中创建一个 .lintr 文件并添加这一行:
Create a .lintr file in your project folder and add this one line:
linters: with_defaults(line_length_linter=line_length_linter(100))
有关更多配置选项,请查看 lintr 包文档.
For more configuration options, check the lintr package documentation.
这篇关于关于行长 linter 80 个字符的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!