redhat-developer / redhat-developer/vscode-java
Empty formatter settings disable rules
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 2.3k
- Forks
- 546
- Merge médio
- 20h 1min
- PRs com merge (30d)
- 11
Descrição
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).
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece rastreando como a extensão lê e aplica a configuração java.format.settings.url quando o valor do workspace é uma string vazia. Confirme se um valor vazio do workspace pode usar como fallback o valor do usuário e verifique o comportamento seguindo as etapas de reprodução; nenhum arquivo-fonte ou teste é identificado na issue.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- java, typescript, vscode
- Domínio
- tooling
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100