Lint #395
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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@v4 | |
- name: Install shfmt | |
run: brew install shfmt | |
- name: Run shfmt | |
run: shfmt -d -i 2 -ci . |