Skip to content

Commit 2ff16a3

Browse files
authored
Add CI for checking markdown format. (#415)
Signed-off-by: ChenYing Kuo <[email protected]>
1 parent 5189b26 commit 2ff16a3

File tree

3 files changed

+154
-106
lines changed

3 files changed

+154
-106
lines changed

.github/workflows/ci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ jobs:
8585
- name: Run tests (with prefix_symbols)
8686
run: cargo test --features prefix_symbols --verbose
8787

88+
markdown_lint:
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@v4
92+
- uses: DavidAnson/markdownlint-cli2-action@v18
93+
with:
94+
config: '.markdownlint.yaml'
95+
globs: '**/README.md'
96+
8897
# NOTE: In GitHub repository settings, the "Require status checks to pass
8998
# before merging" branch protection rule ensures that commits are only merged
9099
# from branches where specific status checks have passed. These checks are
@@ -93,7 +102,7 @@ jobs:
93102
ci:
94103
name: CI status checks
95104
runs-on: ubuntu-latest
96-
needs: build
105+
needs: [build, markdown_lint]
97106
if: always()
98107
steps:
99108
- name: Check whether all jobs pass

.markdownlint.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"MD013": false, # Line length limitation
3+
"MD033": false, # Enable Inline HTML
4+
"MD041": false, # Allow first line heading
5+
"MD045": false, # Allow Images have no alternate text
6+
}

0 commit comments

Comments
 (0)