Upgrade shfmt to version 3.4.0

pull/450/head
Michele Locati 2021-10-07 15:34:51 +02:00
parent 669a786c7e
commit f5a8f0fb94
No known key found for this signature in database
GPG Key ID: 98B7CE2E7234E28B
3 changed files with 6 additions and 8 deletions

View File

@ -29,17 +29,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install Go - name: Install Go
uses: actions/setup-go@v1 uses: actions/setup-go@v2
with: with:
go-version: "1.13" go-version: "1.17.1"
- name: Install shfmt - 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 - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Check coding style - name: Check coding style
run: | run: ./scripts/invoke-shfmt check
export PATH=$PATH:$(go env GOPATH)/bin
./scripts/invoke-shfmt check
check_syntax_php: check_syntax_php:
name: Check PHP coding style name: Check PHP coding style
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -11,7 +11,7 @@ echo '# Linting shell scripts'
if ! docker --version >/dev/null 2>/dev/null; then if ! docker --version >/dev/null 2>/dev/null; then
echo 'Docker is not installed, or it is not running.' >&2 echo 'Docker is not installed, or it is not running.' >&2
rc=1 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 echo 'ERROR!' >&2
rc=1 rc=1
fi fi

View File

@ -16,7 +16,7 @@ if errorlevel 1 (
echo Docker is not installed, or it's not running >&2 echo Docker is not installed, or it's not running >&2
set rc=1 set rc=1
) else ( ) 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 ( if errorlevel 1 (
echo ERROR! >&2 echo ERROR! >&2
set rc=1 set rc=1