redhat-developer / redhat-developer/vscode-java

Empty formatter settings disable rules

Offen
#1,237 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

formatter
Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

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).

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie damit, nachzuverfolgen, wie die Erweiterung die Konfiguration java.format.settings.url liest und anwendet, wenn der Arbeitsbereichswert eine leere Zeichenfolge ist. Bestätigen Sie, ob ein leerer Arbeitsbereichswert auf den Benutzerwert zurückfallen kann, und überprüfen Sie das Verhalten anhand der Reproduktionsschritte; in der Issue wird keine Quelldatei und kein Test angegeben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, typescript, vscode
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.