redhat-developer / redhat-developer/vscode-java
Empty formatter settings disable rules
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 2.3k
- 分支
- 546
- 平均合併
- 20 小時 1 分鐘
- 30 天內合併 PR
- 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
- Set custom formatting rules in your user settings.json
"java.format.settings.url": "/PATH/TO/CUSTOM/RULES"
- 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).
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先追蹤擴充功能在工作區值為空字串時如何讀取並套用 java.format.settings.url 設定。確認空的工作區值是否可以回退到使用者值,並根據重現步驟驗證其行為;issue 中未指定原始檔或測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java, typescript, vscode
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100