Skip to content

Commit a589a74

Browse files
committed
Improve static analysis workflow for Markdown linting
1 parent dd63c2f commit a589a74

File tree

3 files changed

+37
-21
lines changed

3 files changed

+37
-21
lines changed

.github/workflows/Static Analysis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
markdownlint:
10+
name: Markdown Lint Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18'
20+
cache: 'npm'
21+
22+
- name: Install markdownlint-cli
23+
run: npm install -g markdownlint-cli
24+
25+
- name: Run markdownlint
26+
run: |
27+
echo "🔍 Checking Markdown files..."
28+
if find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | head -1 | grep -q .; then
29+
find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" -print0 | xargs -0 markdownlint --config .markdownlint.json || markdownlint **/*.md
30+
echo "✅ Markdown lint check completed successfully"
31+
else
32+
echo "ℹ️ No Markdown files found to check"
33+
fi

.markdownlint.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"MD026": false,
3-
"default": true,
4-
"line-length": false
5-
}
2+
"MD026": false,
3+
"default": true,
4+
"line-length": false
5+
}

0 commit comments

Comments
 (0)