Skip to content

Commit 00c2801

Browse files
fmeumoetr
authored andcommitted
Fix format script to actually format .kt files
1 parent bb9bc9e commit 00c2801

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ if [[ "${CI:-0}" == 0 ]]; then
3535
# Check which ktlint_tests failed and run the corresponding fix targets. This is much faster than
3636
# running all ktlint_fix targets when e.g. only a few or no .kt files changed.
3737
# shellcheck disable=SC2046
38-
TARGETS_TO_RUN=$(bazel test --config=quiet $(bazel query --config=quiet 'kind(ktlint_test, //...)') | { grep FAILED || true; } | cut -f1 -d' ' | sed -e 's/:ktlint_test/:ktlint_fix/g')
38+
TARGETS_TO_RUN=$(bazel test --config=quiet $(bazel query --config=quiet 'kind(ktlint_test, //...)') | { grep FAILED || true; } | cut -f1 -d' ' | sed -e 's/:ktlint_test/:ktlint_fix/g' || true)
3939
if [[ -n "${TARGETS_TO_RUN}" ]]; then
40-
echo "$TARGETS_TO_RUN" | xargs -n 1 bazel run --config=quiet
40+
echo "$TARGETS_TO_RUN" | xargs -I '{}' -n 1 bazel run --config=quiet {} -- --format
4141
fi
4242

4343
# BUILD files

0 commit comments

Comments
 (0)