redhat-developer / redhat-developer/vscode-java
Empty formatter settings disable rules
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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).
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza rastreando cómo la extensión lee y aplica la configuración java.format.settings.url cuando el valor del espacio de trabajo es una cadena vacía. Confirma si un valor vacío del espacio de trabajo puede recurrir al valor del usuario y verifica el comportamiento según los pasos de reproducción; en la issue no se identifica ningún archivo fuente ni ninguna prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript, vscode
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100