Skip to content

Commit 3d01fa3

Browse files
committed
switch to rumdl for md linting
1 parent 6f95faa commit 3d01fa3

File tree

5 files changed

+39
-105
lines changed

5 files changed

+39
-105
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ tmp
88
.DS_Store
99
.vscode/
1010
.python-version
11-
11+
dist/

.markdownlint.jsonc

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
{
2-
// Example markdownlint JSON(C) configuration with all properties set to their default value
3-
// Default state for all rules
42
"default": true,
5-
// not enforcing line break a specific lenght
63
"MD013": false,
74
"MD007": {
85
"indent": 4
96
},
10-
// allow Multiple headings with the same content
117
"MD024": false,
12-
// allow multiple top level headings -> generated files
138
"MD025": false,
14-
// to be consistent with prettier
159
"MD030": {
1610
"ul_single": 1,
1711
"ul_multi": 1
1812
},
19-
// allow some html
2013
"MD033": {
2114
"allowed_elements": [
2215
"figure",
@@ -31,15 +24,10 @@
3124
"br"
3225
]
3326
},
34-
// not enfore h1 as first content of a file
27+
"MD035": false,
3528
"MD041": false,
36-
// allow missing img alt text
3729
"MD045": false,
38-
// disabled due to admonition / tabs using indented blocks
3930
"MD046": false,
40-
//"MD046": { "style": "fenced" },
41-
// allow non-descriptive link text, like "here"
4231
"MD059": false,
43-
// relax table formatting rules
4432
"MD060": false
4533
}

Taskfile.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ tasks:
181181
- poetry run mike serve -b {{.PUBLIC_BRANCH}}
182182

183183
format:fix:
184-
desc: markdownlit md files and apply possible style fixes
184+
desc: rumdl (md-lint) and apply possible style fixes
185185
cmds:
186186
- |
187187
{
@@ -190,18 +190,26 @@ tasks:
190190
191191
# no recursion (top-level only)
192192
find . -maxdepth 1 -type f -name '*.md' -print0
193-
} | xargs -0 markdownlint --config .markdownlint.jsonc --fix
193+
} | xargs -0 poetry run rumdl --config .markdownlint.jsonc check --fix
194194
195-
check:markdownlint:
196-
desc: run markdownlint on md files for style issues
195+
check:rumdl:
196+
desc: run rumdl (md-linter) for style issues
197197
cmds:
198-
#- mkdir -p ./dist
198+
- mkdir -p ./dist
199+
- rm -f ./dist/md-lint-issues.xml
199200
- |
200201
{
201202
# recurse
202203
find ./docs -type f -name '*.md' -print0
203204
204205
# no recursion (top-level only)
205206
find . -maxdepth 1 -type f -name '*.md' -print0
206-
} | xargs -0 markdownlint --config .markdownlint.jsonc
207-
# --json --output ./dist/markdownlint-issues.json
207+
} | xargs -0 poetry run rumdl --config .markdownlint.jsonc check --output-format junit > ./dist/md-lint-issues.xml || true
208+
- |
209+
{
210+
# recurse
211+
find ./docs -type f -name '*.md' -print0
212+
213+
# no recursion (top-level only)
214+
find . -maxdepth 1 -type f -name '*.md' -print0
215+
} | xargs -0 poetry run rumdl --config .markdownlint.jsonc check

0 commit comments

Comments
 (0)