Skip to content

IntelliJ Plugin format (Ctrl+Alt+L) diverges from command line (google-java-format.jar) #919

@habutre

Description

@habutre

Expected behavior:

Not much changes beyond described in the release notes

Actual behavior:

Indentation changes dramatically

Before:

      @RequestParam(value = "createdAt") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull
          LocalDate createdAt) {
    

After:

      @RequestParam(value = "createdAt") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) @NotNull
      LocalDate createdAt) {   

I have a pre-commit hook script that prevents unformatted to be committed and now the formats diverges between IntelliJ Plugin (Ctrl+Alt+L) and the command google-java-format.jar --skip-reflowing-long-strings

Environment details:

IntelliJ IDEA 2022.3.3 (Community Edition)
Build #IC-223.8836.41, built on March 10, 2023
Runtime version: 17.0.6+1-b653.34 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.19.17-2-manjaro
GC: G1 Young Generation, G1 Old Generation
Memory: 1536M
Cores: 8
Registry:
    debugger.watches.in.variables=false
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true

Non-Bundled Plugins:
    google-java-format (1.16.0.0)
    gherkin (223.8617.8)
    cucumber-java (223.7571.123)
    org.sonarlint.idea (8.0.0.63273)

Kotlin: 223-1.8.0-release-345-IJ8836.41
Current Desktop: GNOME

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions