Skip to content

Commit

Permalink
Adopt shfmt as the code formatter
Browse files Browse the repository at this point in the history
Resistance is futile.
All your code are belong to us.
  • Loading branch information
aureliojargas committed Jun 30, 2020
1 parent 7758e34 commit cd04978
Show file tree
Hide file tree
Showing 3 changed files with 208 additions and 207 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
# If you're searching for the official clitest Docker image (for users):
# https://hub.docker.com/r/aureliojargas/clitest

FROM alpine:3.11
FROM alpine:3.12

# Perl is required by clitest's --regex matching mode
RUN apk --no-cache add \
bash dash mksh zsh \
perl \
make \
checkbashisms shellcheck
checkbashisms shellcheck shfmt

WORKDIR /mnt
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ test_cmd = ./clitest --first --progress none test.md
default:
@echo "Read the comments in the Makefile for help"

fmt:
$(docker_run) shfmt -w -i 4 -ci -kp -sr clitest

lint:
$(docker_run) shfmt -d -i 4 -ci -kp -sr clitest
$(docker_run) checkbashisms --posix clitest
$(docker_run) shellcheck clitest

Expand Down
Loading

0 comments on commit cd04978

Please # to comment.