redhat-developer / redhat-developer/vscode-java

Empty formatter settings disable rules

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

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

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

説明

I have the google style eclipse settings activated in my user settings.
By accident, I've saved an empty string in my formatter settings of my workspace which lead to

"java.format.settings.url": ""

in my workspace settings.json. I did this in the UI so I didn't notice at first.
Apparently this overwrites the user settings.json file, formatting was done by the default formatting rules and not the ones specified in my user settings.json.

I'm not sure if this is intended or if it's actually related to how vscode (and not this plugin) handle settings values.

Environment
  • Operating System: macOS Catalina 10.15.1
  • JDK version: 1.8.0_202
  • Visual Studio Code version: 1.41.1
  • Java extension version: 0.55.1
Steps To Reproduce
  1. Set custom formatting rules in your user settings.json
"java.format.settings.url": "/PATH/TO/CUSTOM/RULES"
  1. Set custom formatting rules in a project's settings.json to empty string:
"java.format.settings.url": ""
Current Result

Empty-string 'java.format.settings.url' in workspace lead to usage of default rules of the plugin and not the settings url set in the user settings.json.

Expected Result

Empty-string should be a value that is ignored and therefore use the url defined in the user settings.json

Additional Informations

The only way to notice that there is an empty string in the workspace settings.json in the UI is the message that it is 'Modified in: Workspace' but the UI itself shows the same value as it would when it wasn't defined in the first place (empty string).

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

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

はじめの一歩

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

調査の方向性

まず、ワークスペースの値が空文字列の場合に、拡張機能が java.format.settings.url 設定をどのように読み取り、適用するかを追跡します。空のワークスペース値によってユーザー値にフォールバックできるかを確認し、再現手順に対する動作を検証してください。issue ではソースファイルもテストも特定されていません。

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

評価

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

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

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