Skip to content

Feature/linting (#19) #7

Feature/linting (#19)

Feature/linting (#19) #7

Workflow file for this run

name: lint
on: [push]
jobs:
lint:
name: Run ShellCheck
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install ShellCheck
run: sudo apt-get install shellcheck
- name: Find shell scripts with \#!/bin/sh and run ShellCheck
run: |
files=$(find . -type f ! -path '*/\.*' -exec grep -lE '^#!(/usr)?/bin/sh' {} +)
if [ -n "$files" ]; then
shellcheck -a -S warning -s sh $files
else
echo "No shell scripts with #!/bin/sh shebang found."
fi