forked from mockito/mockito
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use google-java-format in spotless (mockito#1934)
Google-java-format is an open source formatter [1]. It automatically formats source code based on the Google Java Style. The Mockito source code to a very large extent already adheres to this style guide. While this PR in itself is large, many of the changes are related to string formatting and nested method calls. Most notably, google-java-format is an improvement over the current formatting strategy in that: 1. It handles comment formatting (e.g. spacing between comments) 2. It handles nested method calls. You can see the difference in our usage of the ByteBuddy API, which is now more consistent 3. It enforces the max-line length. It essentially automates all of the styling rules we list in https://github.com/mockito/mockito/blob/release/3.x/.github/CONTRIBUTING.md#alignment As such, for new contributors it should be a lot easier (and less scary) to contribute to Mockito, as they no longer have to be concerned about formatting. Hopefully, this once again lowers the bar for external contributors who want to help the project, but would otherwise feel overwhelmed by the rules we have to adhere to. (If we wouldn't have these rules, it would be a lot harder for us to maintain a consistent and maintainable codebase). The only interesting changes in this PR are those in `build.gradle`. All other changes were auto-generated by running `./gradlew spotlessApply`. Note that I disabled the formatting of Javadoc, as I think we should keep formatting that ourselves. We normally put a lot of time and effort in our Javadoc and changing that all at once seems like the wrong decision at this point in time. [1]: https://github.com/google/google-java-format
- Loading branch information
1 parent
4584946
commit dc9cd5e
Showing
629 changed files
with
12,781 additions
and
9,098 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,4 @@ | |
@Retention(RUNTIME) | ||
@Target(FIELD) | ||
@Documented | ||
public @interface Spy { } | ||
public @interface Spy {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,4 @@ public boolean cleansStackTrace() { | |
public boolean enableClassCache() { | ||
return true; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.