redhat-developer / redhat-developer/vscode-java

// @formatter:off should impact save actions too

オープン
#2,397 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement formatter upstream
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

This is probably a new feature request rather than a bug.

Currently, // @formatter:off and // @formatter:on are great for having VSCode not format part of your file. This behavior could also extend to save actions, not just formatting. For example, when using Args4J, you annotate fields with @Option and those fields are set for you based on command line arguments (through some kind of reflection black magic). If one of those fields is final, then Args4J throws an exception. Example of a field with the annotation:

@Option(name = "--write-tps", handler = LongOptionHandler.class, usage = "The target write tps when updating the table")
private Long writeTps = 1L;

When saving, VSCode will add final:

@Option(name = "--write-tps", handler = LongOptionHandler.class, usage = "The target write tps when updating the table")
private final Long writeTps = 1L;

but that is not desirable in this case.

Ideally we could use comments to turn off adding final, like this:

// @formatter:off
@Option(name = "--read-capacity", handler = LongOptionHandler.class, usage = "The target read capacity to utilize when scanning the table")
private Long readCapacity = 1L;

@Option(name = "--write-tps", handler = LongOptionHandler.class, usage = "The target write tps when updating the table")
private Long writeTps = 1L;

@Option(name = "--no-dry-run", handler = BooleanOptionHandler.class, usage = "If set to true, the backfill will be done to records needing it")
private Boolean noDryRun = false;
// @formatter:on

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

VSCode Java の保存アクションの経路から始めて、書式設定において // @formatter:off/on が現在どのように処理されているかを追跡してください。ここに示す Args4J フィールドを含め、保存アクションによって注釈付きの領域が変更されず、マーカーの外側の動作もそのまま維持されれば完了です。

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

評価

技術スタック
java, typescript, vscode
領域
developer-experience, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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