[Bug]: indentation clash (formatter vs lintr)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 92/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- json, r, vscode
调研方向
从 configurationDefaults 开始,找到现有的 [r] 语言块。使用提议的编辑器设置,将默认制表符大小设为两个空格。完成的标准是:新建的 R 文件默认采用两个空格缩进,且不会触发 indentation_linter 警告。
由索引模型根据 Issue 内容生成。
描述
Area
Syntax highlighting
Bug description
VS Code indents with 4 spaces by default, and vscode-R doesn't override this for R. However, lintr expects indentation of 2 spaces. This leads to a harmless, but annoying linting markup for any new R file:
Steps to reproduce
Open a new file and type and write some code with indentation, e.g. a function call over multiple lines:
plot(
1:10
)
Again, the 4 spaces is what gets produced automatically. But lintr will complain that it should only be 2.
[indentation_linter] Indentation should be 2 spaces but is 4 spaces.
Expected behavior
The indentation behaviour or vscode-R should accord with its default linter. My own preference is for that to be 2 spaces, which is the standard that most R linters follow (incl. lintr, air, etc.)
We could set this part of the r block in configurationDefaults.
"[r]": {
"editor.tabSize": 2
}
Environment
vscode-R: 3.2.0
R: 4.6.1
Relevant R package versions
packageVersion('lintr')
[1] ‘3.4.0’
Relevant VS Code settings
Logs and additional context
No response
- 主要语言
- TypeScript
- 星标
- 1.2k
- 派生
- 151
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 76
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
REditorSupport/vscode-R 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
REditorSupport/vscode-R#1846 · 2 条评论 ·
维护者通常 1 天内回复
-
(feat) Additional Arrow support可能已有人在做 @Fred-Wu 于 4 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 72/100
REditorSupport/vscode-R#1785 · 2 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 12/100
REditorSupport/vscode-R#1877 · 2 条评论 ·
维护者通常 1 天内回复
-
Explore a standalone, dependency-free R package for the Data Viewer backend可能已有人在做 @eitsupi 于 6 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
REditorSupport/vscode-R#1860 · 10 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
REditorSupport/vscode-R#1859 ·
维护者通常 1 天内回复
查看 REditorSupport/vscode-R 的全部 Issue
相似的 Issue
-
area:workflow bug ready-for-human
难度 1/5 1 小时以内 新手友好度 78/100
fil-donadoni/tolaria#6108 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/rocketmq-dashboard#7234 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
vitest-dev/vitest#11656 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
维护者通常 1 天内回复