Skip to content

Commit fe9cfe0

Browse files
committed
Exclude generated files from formatting
1 parent 0183eb8 commit fe9cfe0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/gradlex/conventions/check/SpotlessConventionsPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ public void apply(Project project) {
4242

4343
// format the source code
4444
spotless.java(java -> {
45+
java.targetExclude("build/**");
4546
java.palantirJavaFormat();
4647
java.licenseHeader("// SPDX-License-Identifier: Apache-2.0\n", "package|import");
4748
});
4849
spotless.format("javaPackageInfoFiles", java -> {
50+
java.targetExclude("build/**");
4951
// add a separate extension due to https://github.com/diffplug/spotless/issues/532
5052
java.target("src/**/package-info.java");
5153

0 commit comments

Comments
 (0)