Skip to content

Lint

Lint #83

Workflow file for this run

name: Lint
on:
pull_request:
paths-ignore:
- "**.md"
push:
paths-ignore:
- "**.md"
schedule:
- cron: "0 0 * * *" # daily at midnight
jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update Shellcheck
run: |
sudo apt install xz-utils
scversion="stable"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/
shellcheck --version
- name: Shellcheck
run: shellcheck -x bin/* -P lib/
shfmt:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install shfmt
run: brew install shfmt
- name: Run shfmt
run: shfmt -d -i 2 -ci .