Skip to content

Commit 1ec8a59

Browse files
committed
Linting workflow
- Rename checkshell.yml to linting.yml - Add Markdownlint to Linting - Ensure shellcheck tests .sh and .bats files - Better formatting of workflow - Update markdownlint-cli2-action
1 parent 79d1474 commit 1ec8a59

2 files changed

Lines changed: 38 additions & 18 deletions

File tree

.github/workflows/checkshell.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/linting.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Linting
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
shfmt:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v6
12+
13+
- name: shfmt
14+
run: |
15+
docker run --rm -v "$(pwd)":/sh -w /sh mvdan/shfmt:v3 -sr -i 2 -l -w -ci .
16+
git diff --color --exit-code
17+
18+
shellcheck:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
24+
- name: Shellcheck
25+
run: |
26+
shellcheck *.sh
27+
shellcheck test/*.bats
28+
29+
markdownlint:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v6
34+
35+
- name: Markdownlint
36+
uses: DavidAnson/markdownlint-cli2-action@v22
37+
with:
38+
globs: '*.md'

0 commit comments

Comments
 (0)