Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
130 views

.pre-commit-hooks.yaml is like below: - id: google-style-java name: Google Java Code Style for Java description: Formats code in Google's Java codestyle. entry: ./format-code.sh ...
tuk's user avatar
  • 6,964
1 vote
0 answers
356 views

I have added spotless google-java-format to an existing project, and a pinned version of guava is causing conflicts. I have reproduced the problem in a toy example. Here is the full project if you ...
Hakan Baba's user avatar
  • 2,075
0 votes
1 answer
197 views

I added the following dependency to the build.gradle file in my branch. dependencies { implementation 'com.google.googlejavaformat:google-java-format:1.24.0' } From here, I am confused. How can I ...
cparks10's user avatar
  • 377
2 votes
0 answers
631 views

The java code format suggest that star/wildcard imports are not tolerated. Without the help of the IDE, neither the java-code-format nor spotless can enforce this. Is there any success case out there? ...
Paulo Oliveira's user avatar
0 votes
0 answers
412 views

A few years ago I created a maven plugin project which takes a given input and generates a series of Java source files which are formatted upon output using the google-java-format library. I'm trying ...
pconrey's user avatar
  • 6,113
1 vote
1 answer
802 views

In our team we're using IntelliJ and Eclipse. As formatter we're plugins for Eclipse and IntelliJ from v1.18.1 of https://github.com/google/google-java-format We set the same imports layouts for both ...
vasiv's user avatar
  • 11
1 vote
0 answers
50 views

Need help with google client lib for creating tags and attach to VM InstanceTagDetails instanceTagDetails = new InstanceTagDetails(); instanceTagDetails.setKey("tagKeys/...
Vini's user avatar
  • 11
1 vote
0 answers
1k views

I'd like to have the google java formatting in my IDE (using the google-java-format plugin for IntelliJ or something else if that's not the best way to do...) and be able to check with maven that ...
Jerome VDL's user avatar
  • 3,556
1 vote
1 answer
6k views

I have OpenJDK 19 installed and use the "google-java-format" plugin. I have configured IntelliJ IDEA as per instructions here. However, code formatting doesn't work. If I uninstall the ...
Moritz Petersen's user avatar
0 votes
1 answer
554 views

I used to add a google-java-format plugin in Eclipse via drop an e.g. google-java-format-eclipse-plugin-1.13.0.jar into a dropins folder. On Windows and Linux it always worked. But on MacOS 12.6 it ...
zolv's user avatar
  • 1,940
0 votes
1 answer
727 views

I've openapi plugin to autogenerate some java source code using mustache files as template. I wish to format this code using google java style. I followed example at this link: https://shankulk.com/...
Ajeetkumar's user avatar
  • 1,337
5 votes
1 answer
4k views

I am using the Spotless plugin to format my Java code. However, when I am enabling the reflowLongStrings rule, it breaks lines to be no longer than 80 chars. Is it possible to change it to 120?
Avraham Cohen's user avatar
3 votes
1 answer
2k views

I use Checkstyle 9.3 (because I'm still using JDK 8). I'm wondering what is the exact Google Java Format version used by that Checkstyle version? I'm referring to the following file: https://github....
Jonathan Poulin's user avatar
10 votes
1 answer
9k views

I am trying to configure a maven spring boot application to use spotless with google java format style. I would like as well to have Intellij formatting the code as the maven plugin does. But i am ...
mpssantos's user avatar
  • 1,011
4 votes
3 answers
4k views

I'm using google-java-format to format Java code according to Google Java Style. However, I only find documentation and examples showing how to format one file using the CLI. Is there a built-in way ...
nathaner's user avatar
  • 581
0 votes
2 answers
2k views

I have an archive plugin for Eclipse that contains an personalized google-java-format implementation, I want to import this to VSCode editor, is it possible to this?I found how to do this with xml ...
user15250690's user avatar
12 votes
0 answers
2k views

I have a checkstyle.xml file to check for formatting violations . Is there any way to provide checkstyle.xml as a input to diffplug/spotless formatter . Java8 is being used and spotless verison is 2....
darth_vader's user avatar
4 votes
3 answers
6k views

Using the google-java-format eclipse plugin works great when running Eclipse under Java 11, but when running on Java 16+, it fails with the following error: Full error: A save participant caused ...
sparty02's user avatar
  • 606
2 votes
0 answers
716 views

I have the following code: Arrays.asList(new Point2D.Double(1.00, 3.028571712152178), new Point2D.Double(2.00, 4.5990231472038055), new Point2D.Double(3.00, 4.816365844337747), new ...
Tinker's user avatar
  • 4,595
0 votes
0 answers
562 views

Please tell me how to use code style formatting in IDEA? I used the google-java-format plugin and it works very well for me. An example of my code using the google-java-format plugin: public Single<...
Kirill Sereda's user avatar
3 votes
2 answers
13k views

I'm using maven spotless plugin to format java files, but it can't skip files. I used exclude and toggle off, neither works. <plugin> <groupId>com.diffplug.spotless</groupId> <...
chaokunyang's user avatar
  • 2,352
0 votes
1 answer
2k views

I need to disable this auto line break my code in Java VS CODE Formatter It's wrong Expected:
Amala Amala's user avatar
7 votes
1 answer
3k views

I am finding out ways to configure google_checks to use 4 spaces in the maven Checkstyle plugin. I set the indentSize configuration parameter to 4, but it does not work. Is there a configuration ...
Nikhil's user avatar
  • 365
1 vote
1 answer
4k views

I installed google-java-format in Intellij and made sure its enabled for current project. However its still not working, CTRL+ALT+L, which is by default in Intellij is still working. Also, does this ...
SeleniumTester's user avatar
6 votes
1 answer
14k views

We wired https://github.com/sherter/google-java-format-gradle-plugin into our project per the readme. We also wired in a pre-commit hook to run the plugin before committing, which ensures that all of ...
Jim Showalter's user avatar
-1 votes
1 answer
2k views

I've got an identical script running on three google sheets, it works just fine on two of them, but on one it just won't generate, keeps throwing me the below error: TypeError: Cannot read property '...
Alisher Ataev's user avatar
4 votes
2 answers
4k views

I use the Google code style in my Java projects. I installed the google-java-format plugin in IntelliJ, but the plugin does not cover all formatting rules (e.g java imports). The documentation ...
Henok's user avatar
  • 423
1 vote
1 answer
871 views

I've added an ant task to format sources before compilation. However, the formatter comes up a cropper when provided a list of file paths and skips (is unable to read) a file when run as a java Ant ...
Linus Fernandes's user avatar
4 votes
0 answers
1k views

I'm wondering if the following behavior of the Eclipse formatter is a bug or not, and if so, if there is any workaround. After I click return and create a new line, I can see Eclipse has ...
Dave L.'s user avatar
  • 9,840
3 votes
1 answer
6k views

i just downloaded eclipse 2019-03 (4.11.0), and need to install google-java-format plugin, according to the instruction I need to put the google-java-format Eclipse plugin to eclipse dropins folder, i ...
user468587's user avatar
  • 5,081
0 votes
2 answers
5k views

I am using the Google-java-formatter in IntelliJ IDEA. I tried all the option present under setting > editor > code Style > java but not able to change this behavior. private void ...
Chandresh Mishra's user avatar
0 votes
1 answer
377 views

I am trying to add sherter gradle plugin for code style. I want to run this plugin in pre-commit script file. I added sherter in gradle as, repositories { jcenter() maven { url "https://...
SmartAndroidian's user avatar
0 votes
0 answers
156 views

I have a xml file which has Java and groovy codes in some tags and I need to format the code, I am able to format xml but not java and groovy code inside xml tags. Ex: Input: <?xml version="1....
origin's user avatar
  • 128
1 vote
2 answers
2k views

Google-java-format-gradle-plugin integrates with Gradle, but how can I run it automatically as part of the normal build?
Bob Lee's user avatar
  • 1,962
2 votes
1 answer
2k views

I have added mavenCentral() in rootProject build script. But its giving below error while build. Any idea on this. You probably need to add a repository containing the '[com.google.googlejavaformat:...
Praveen's user avatar
  • 91.4k