From 5930d5b42728a65889a15672b407de72e703d138 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 6 Jul 2017 11:08:44 -0700 Subject: [PATCH] Remove shfmt We don't have that many scripts and for the amount of errors this is causing on a weekly basis for contributors its not worth the overhead. Signed-off-by: Michael Crosby --- Dockerfile | 9 --------- Makefile | 1 - script/validate-shfmt | 21 --------------------- 3 files changed, 31 deletions(-) delete mode 100755 script/validate-shfmt diff --git a/Dockerfile b/Dockerfile index db4f1607..9d6b96fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,15 +47,6 @@ RUN mkdir -p /usr/src/criu \ && make install-criu \ && rm -rf /usr/src/criu -# install shfmt -RUN mkdir -p /go/src/github.com/mvdan \ - && cd /go/src/github.com/mvdan \ - && git clone https://github.com/mvdan/sh \ - && cd sh \ - && git checkout -f v0.4.0 \ - && go install ./cmd/shfmt \ - && rm -rf /go/src/github.com/mvdan - # setup a playground for us to spawn containers in ENV ROOTFS /busybox RUN mkdir -p ${ROOTFS} \ diff --git a/Makefile b/Makefile index 81178928..6781ac74 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,6 @@ clean: validate: script/validate-gofmt - script/validate-shfmt go vet $(allpackages) ci: validate localtest diff --git a/script/validate-shfmt b/script/validate-shfmt deleted file mode 100755 index 8f45fe3c..00000000 --- a/script/validate-shfmt +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -badFiles=() -while read f; do - badFiles+=("$f") -done < <(shfmt -l . | grep -v vendor/) - -if [ ${#badFiles[@]} -eq 0 ]; then - echo 'Congratulations! All shell source files are properly formatted.' -else - { - echo "These files are not properly shfmt'd:" - for f in "${badFiles[@]}"; do - echo " - $f" - done - echo - echo 'Please reformat the above files using "shfmt -w" and commit the result.' - echo - } >&2 - false -fi