Skip to content

regression: java.format.settings.url no longer loads project .xml file #1827

@rothfels

Description

@rothfels

Some of our teammates just upgraded to the latest version of this extension and noticed that the formatter's behavior has changed.

Before upgrading extension:

  • open a file, run Format document -- no diff

After upgrading extension:

  • open a file, run Format document -- large diff

Our formatter configuration is and has been set from an .xml config file. Our .vscode/settings.json looks like this:

  "java.format.settings.url": "path/to/code-style.xml",

I opened the project in Eclipse and imported the same code-style.xml file, and verified that the Eclipse formatter running with that config produces no diff.

I've concluded the formatter on the most recent version of this extension has regressed.

Environment
  • Operating System: MacOS 11.2.1
  • JDK version: openjdk version "15.0.1" 2020-10-20
  • Visual Studio Code version: 1.54.1
  • Java extension version: v0.76.0
Steps To Reproduce
  1. Create custom code style .xml file
  2. Configure via .vscode/settings.json
  3. Run Format document
Current Result

Formatter generating unwanted diffs on newest extension version.

Expected Result

No formatting diffs on files that were formatted with prior extension version.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions