You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve consistency with unified code format/imports (#3156)
Configures the spring-javaformat plugin to enforce and apply code formatting as part of the build. Applies the formatting to existing code. Also adds to editorconfig configuration for import order and updates all imports. There is no generic support for Java import order configuration in editorconfig, so an IntelliJ specific configuration is used.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+7
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,13 @@ The wrapper can be used with a command, for example, `./gradlew check` to build
42
42
43
43
This repository should be imported as a Gradle project into your IDE of choice.
44
44
45
+
## Code formatting
46
+
47
+
The [spring-javaformat plugin](https://github.com/spring-io/spring-javaformat) is configured to check and apply consistent formatting in the codebase through the build.
48
+
The `checkFormat` task checks the formatting as part of the `check` task.
49
+
Apply formatting with the `format` task.
50
+
You should rely on the formatting the `format` task applies instead of your IDE's configured formatting.
51
+
45
52
## Testing changes locally
46
53
47
54
Specific modules or a test class can be run from your IDE for convenience.
Copy file name to clipboardExpand all lines: benchmarks/benchmarks-core/src/jmh/java/io/micrometer/benchmark/compare/CompareCountersWithOtherLibraries.java
Copy file name to clipboardExpand all lines: benchmarks/benchmarks-core/src/jmh/java/io/micrometer/benchmark/compare/CompareHistogramsWithOtherLibraries.java
0 commit comments