Skip to content

Commit

Permalink
ci(shfmt): Update shfmt
Browse files Browse the repository at this point in the history
- Use go install in CI
- Use go install pre-commit hook

Resolves #80
  • Loading branch information
jidicula committed Jan 16, 2022
1 parent 9ae62e3 commit 4082107
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/shell-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:

steps:
- uses: actions/checkout@v2.4.0

- uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Install shfmt
run: |
sudo wget "https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfmt_v${SHFMT_VERSION}_linux_amd64" -O /usr/local/bin/shfmt
sudo chmod +x /usr/local/bin/shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest

- name: Check .sh files
run: shfmt -d .
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-added-large-files
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.2-1
hooks:
- id: shellcheck
- id: shfmt

0 comments on commit 4082107

Please sign in to comment.