What steps will reproduce the problem?
Steps to reproduce the behavior:
What is the expected output?
No changes.
$ git status
> ... nothing to commit, working tree clean
What happens instead?
Code got reformatted.
$ git status
> ... modified: Foo.java
Environment:
Here's plugins configuration:
<project> <build> <plugins> ... <plugin> <groupId>com.cosium.code</groupId> <artifactId>git-code-format-maven-plugin</artifactId> <version>2.7</version> </plugin> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>2.6.0</version> <configuration> <java> <googleJavaFormat/> </java> </configuration> </plugin> ...
Link to a git repository that can be cloned to reproduce the problem:
Private repository, but if I'll manage to replicate it on a public repo, I'll add it in here.
Additional context
Being up to date with latest google-java-format version, saves clarifications when google-java-format IDE plugins or other formatting plugins 'change' formatting.
There is a formatting change around stram()
which changed in google-java-format 1.8.
// google-java-format 1.7 xxx xxx = xxx.xxx().xxx().xxx() .stream() .xxx() .xxx(); // google-java-format 1.8 and 1.9 xxx xxx = xxx .xxx() .xxx() .xxx() .stream() .xxx() .xxx();
For a test, I've upgraded google-java-format version (https://github.com/Cosium/git-code-format-maven-plugin/blob/master/pom.xml#L43) to 1.8
and 1.9
and reformatted with snapshot build of git-code-format-maven-plugin and got same format as with the other plugin (spotless uses 1.9).
Note that google-java-format requires JDK 11 at runtime.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4