From f5a8f0fb94c5e8819fc3e8e2cf74ad2fb89a35fb Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 7 Oct 2021 15:34:51 +0200 Subject: [PATCH] Upgrade shfmt to version 3.4.0 --- .github/workflows/test-extensions.yml | 10 ++++------ scripts/lint | 2 +- scripts/lint.bat | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-extensions.yml b/.github/workflows/test-extensions.yml index fe7a977..ada97d7 100644 --- a/.github/workflows/test-extensions.yml +++ b/.github/workflows/test-extensions.yml @@ -29,17 +29,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: "1.13" + go-version: "1.17.1" - name: Install shfmt - run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt + run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@v3.4.0 - name: Checkout uses: actions/checkout@v2 - name: Check coding style - run: | - export PATH=$PATH:$(go env GOPATH)/bin - ./scripts/invoke-shfmt check + run: ./scripts/invoke-shfmt check check_syntax_php: name: Check PHP coding style runs-on: ubuntu-latest diff --git a/scripts/lint b/scripts/lint index 3d074d2..03eb35e 100755 --- a/scripts/lint +++ b/scripts/lint @@ -11,7 +11,7 @@ echo '# Linting shell scripts' if ! docker --version >/dev/null 2>/dev/null; then echo 'Docker is not installed, or it is not running.' >&2 rc=1 -elif ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.3.1-alpine fix; then +elif ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.4.0-alpine fix; then echo 'ERROR!' >&2 rc=1 fi diff --git a/scripts/lint.bat b/scripts/lint.bat index 7f5165a..babca73 100644 --- a/scripts/lint.bat +++ b/scripts/lint.bat @@ -16,7 +16,7 @@ if errorlevel 1 ( echo Docker is not installed, or it's not running >&2 set rc=1 ) else ( - docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.3.1-alpine fix + docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:v3.4.0-alpine fix if errorlevel 1 ( echo ERROR! >&2 set rc=1