redhat-developer / redhat-developer/vscode-java
Empty formatter settings disable rules
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
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).
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando il modo in cui l’estensione legge e applica la configurazione java.format.settings.url quando il valore dell’area di lavoro è una stringa vuota. Verifica se un valore vuoto dell’area di lavoro può ripiegare sul valore dell’utente e verifica il comportamento seguendo i passaggi per la riproduzione; nell’issue non sono identificati né un file sorgente né un test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100