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
and [junit-eclipse.importorder](gradle/config/eclipse/junit-eclipse.importorder),
85
-
respectively. For IntelliJ IDEA there's a
86
-
[plugin](https://plugins.jetbrains.com/plugin/6546) you can use in conjunction with the
87
-
Eclipse settings.
88
-
89
-
It is forbidden to use _wildcard imports_ (e.g., `import static org.junit.jupiter.api.Assertions.*;`)
90
-
in Java code.
79
+
Code formatting is automatically enforced using the [Spotless](https://github.com/diffplug/spotless) Gradle plugin during the build process. The build will:
80
+
81
+
- Automatically format all code
82
+
- Add missing license headers
83
+
- Correct import order
84
+
- Fix other style issues
85
+
86
+
You can run the plugin goal `gradle spotlessApply` to apply formation.
87
+
Nevertheless, that´s not required, as the build handles everything automatically.
1. Both `CI` and `rewriteRun` environment variables must be set:
99
+
-`CI=false` to enable execution
100
+
-`spotlessApply=true` to auto-apply suggestions
101
+
2. Dry runs execute by default for change preview
102
+
3. Changes are blocked in CI environments (when `CI=true`)
103
+
4. Always review changes before applying
104
+
105
+
just add this to your shell config: ~/.zshrc
106
+
export spotlessApply=true
107
+
export rewriteRun=true
108
+
109
+
#### Rewriting
110
+
111
+
The build supports automated code refactoring through [Moderne](https://moderne.io/) rewrite rules. These transformations are controlled exclusively through environment variables - there is no local variable configuration option to apply automatic fixes out of the box.
112
+
113
+
**Usage requirements:**
114
+
1. Both `CI` and `rewriteRun` environment variables must be set:
115
+
-`CI=false` to enable execution
116
+
-`rewriteRun=true` to auto-apply suggestions
117
+
2. Dry runs execute by default for change preview
118
+
3. Changes are blocked in CI environments (when `CI=true`)
0 commit comments