Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: indentation clash (formatter vs lintr)

オープン 初心者向け
#1,883 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@renkun-ken がすでに取り組んでいます。

2026年10月20日 から。

  • #1884 @renkun-ken による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
92/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
json, r, vscode

調査の方向性

configurationDefaultsから始めて、既存の[r]言語ブロックを見つけます。提案されたエディター設定を使って、デフォルトのタブサイズを2スペースにします。新しいRファイルがデフォルトで2スペースのインデントになり、indentation_linterの警告が出なければ完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
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:

Image
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時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

REditorSupport/vscode-R のほかの issue

REditorSupport/vscode-R の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。