Skip to content

Commit 2ebc3b0

Browse files
committed
Exclude buildTools test fixtures from fmt checks
The fixtures mirror real-world project layouts (like examples/) and must not be reformatted by javafmt/ktfmt.
1 parent 809473e commit 2ebc3b0

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

flake.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,26 @@
5353
javafmt = pkgs.runCommand "check-javafmt" { } ''
5454
cd ${./.}
5555
# Exclude minimized fixtures and generated SCIP snapshot goldens
56-
# (coupled to exact line/column annotations) plus the standalone
57-
# example projects: their layout must not be reformatted here.
56+
# (coupled to exact line/column annotations), the standalone example
57+
# projects, and the buildTools test fixtures: these all mirror
58+
# real-world project layouts that must not be reformatted here.
5859
find . -name '*.java' \
5960
-not -path './examples/*' \
6061
-not -path './tests/minimized/*' \
6162
-not -path './tests/snapshots/*' \
63+
-not -path './tests/buildTools/src/test/resources/fixtures/*' \
6264
-not -path './scip-kotlinc/minimized/*' \
6365
-exec ${pkgs.google-java-format}/bin/google-java-format --dry-run --set-exit-if-changed {} +
6466
touch $out
6567
'';
6668
ktfmt = pkgs.runCommand "check-ktfmt" { } ''
6769
cd ${./.}
68-
# Exclude minimized Kotlin snapshots: the input fixtures are coupled
69-
# to generated SCIP goldens with exact line/column annotations, so
70-
# their layout must not be reformatted here.
70+
# Exclude minimized Kotlin snapshots (coupled to generated SCIP
71+
# goldens with exact line/column annotations) and the buildTools test
72+
# fixtures (real-world project layouts): neither may be reformatted.
7173
find . -name '*.kt' \
7274
-not -path './scip-kotlinc/minimized/*' \
75+
-not -path './tests/buildTools/src/test/resources/fixtures/*' \
7376
-exec ${pkgs.ktfmt}/bin/ktfmt --kotlinlang-style --dry-run --set-exit-if-changed {} +
7477
touch $out
7578
'';

0 commit comments

Comments
 (0)