Skip to content

Commit 692254b

Browse files
authored
Merge pull request #1192 from mvdan/shfmt
Add shell formatting via shfmt
2 parents 43c4300 + b9d1346 commit 692254b

File tree

7 files changed

+334
-318
lines changed

7 files changed

+334
-318
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ RUN mkdir -p /usr/src/criu \
3636
&& cd /usr/src/criu \
3737
&& make install-criu
3838

39+
# install shfmt
40+
RUN mkdir -p /go/src/github.com/mvdan \
41+
&& cd /go/src/github.com/mvdan \
42+
&& git clone https://github.com/mvdan/sh \
43+
&& cd sh \
44+
&& git checkout -f v0.4.0 \
45+
&& go install ./cmd/shfmt \
46+
&& rm -rf /go/src/github.com/mvdan
47+
3948
# setup a playground for us to spawn containers in
4049
ENV ROOTFS /busybox
4150
RUN mkdir -p ${ROOTFS} \

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ clean:
119119

120120
validate:
121121
script/validate-gofmt
122+
script/validate-shfmt
122123
go vet ./...
123124

124125
ci: validate localtest

0 commit comments

Comments
 (0)