redhat-developer / redhat-developer/vscode-java

Use a naming convention to ignore the unused variable warning

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

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

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

説明

For example :

        for (String i : arrayName)
            ArrayListName.add(someIntVariable++);

I need the length of arrayName, but I need not i. Obviously, the language server will prompt the warning of The value of the local variable i is not used.

I can suppress the warning through add @SuppressWarnings("unused") before the method/class. But IntelliJ has a better solution: you can rename i to ignored to suppress this warning. Could we provide a similar function?

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

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

はじめの一歩

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

調査の方向性

issue で説明されている未使用ローカル変数の警告に対する Java language-server の処理から始め、IntelliJ が名前 ignored をどのように扱うかを確認します。サポートされている命名規則とその適用範囲を特定し、iignored に変更するとこの警告が抑制される一方で、他の未使用変数に関する診断は抑制されないことを検証します。

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

評価

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

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

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