google / google/google-java-format

Not formatting file on save in Intellij 2023.1

Offen
#929 11 Kommentare 29 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
IntelliJ
Vorherrschende Sprache
Java
Sterne
6.2k
Forks
937
Ø Merge
6 Min.
Gemergte PRs (30 T.)
3

Beschreibung

My Java files are not being formatted on save, only when I do a reformat manually. I can see that the google-java-format plugin is running when I save the file (it is quickly showing in the status bar), but the file is not reformatted. I cannot find any logs on this.

**My setup**
* Intellij 2023.1 (Build #IU-231.8109.175, built on March 28, 2023)
* google-java-format plugin 1.16.0.1
* Activated "Reformat code" and "Optimize imports" under settings -> Tools -> actions on save
*I have imported the [intellij-java-google-style](https://raw.githubusercontent.com/google/styleguide/gh-pages/intellij-java-google-style.xml) file under settings -> code style -> Scheme.
* Runtime version: 17.0.6+10-b829.5 aarch64
* VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

I have setup custom VM options as follows
```
-Xmx3072m
-Dsplash=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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