Skip to content

Commit 70c164f

Browse files
committed
Ignore plugins directory
1 parent 58fdaed commit 70c164f

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.buildkite/pipeline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99

1010
- label: ":bash: shfmt"
1111
key: fmt
12-
command: docker run --rm -u "$$(id -u):$$(id -g)" -v "$$PWD:/mnt" -w /mnt mvdan/shfmt:v3-alpine --diff --binary-next-line --indent 2 --list .
12+
command: .buildkite/steps/shfmt.sh
1313
agents:
1414
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE}"
1515

.buildkite/scripts/shfmt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -Eeuo pipefail
4+
5+
# Wrapper script for shfmt
6+
7+
exec docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/mnt" -w /mnt mvdan/shfmt:v3-alpine "$@"

.buildkite/steps/shfmt.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -Eeuo pipefail
4+
5+
SHFMT=".buildkite/scripts/shfmt"
6+
7+
# ignore plugins - it contains submodules
8+
"$SHFMT" --find . \
9+
| grep -v '^plugins/' \
10+
| xargs "$SHFMT" --diff --binary-next-line --indent 2

0 commit comments

Comments
 (0)