Skip to content

Commit 3c5b16f

Browse files
committed
switch to Node.js markdownlint
And rework and reduce the list of excluded files for linting. Signed-off-by: Daniel Maslowski <[email protected]>
1 parent d0c3aa6 commit 3c5b16f

File tree

7 files changed

+26
-45
lines changed

7 files changed

+26
-45
lines changed

.github/workflows/lazy-lint.bash

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

.github/workflows/markdownlint.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ jobs:
1313
uses: actions/checkout@v4
1414

1515
- name: Install markdown lint
16-
run: sudo gem install mdl
17-
18-
- name: Lint markdown
19-
run: .github/workflows/lazy-lint.bash
16+
uses: DavidAnson/markdownlint-cli2-action@v9
17+
with:
18+
# keep in sync with Makefile
19+
globs: |
20+
src/**/*.md
21+
!src/SUMMARY.md
22+
!src/{case_studies/TiogaPass,coreboot.u-root.systemboot/index,u-root,utilities/dut,utilities/UEFI_Tool_Kit}.md

.markdownlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"default": true,
3+
"MD013": { "code_blocks": false, "tables": false },
4+
"MD029": { "style": "ordered" },
5+
"MD033": false,
6+
"MD045": false
7+
}

.mdl_style.rb

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

.mdlrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
MARKDOWNLINT?=markdownlint-cli2
2+
13
build: book i18n
24
# linkcheck causes output files to end up in html/, so move them to root
35
mv book/html/* book/
@@ -19,3 +21,12 @@ prepare: prepare_i18n
1921
cargo install mdbook-mermaid
2022
mdbook-mermaid install
2123
cargo install mdbook-linkcheck
24+
25+
lint_install:
26+
npm i -g --prefix ~/bin/node/ markdownlint-cli2
27+
28+
# keep in sync with .github/workflows/markdownlint.yml
29+
lint:
30+
# NOTE: SUMMARY.md is the ToC, which has no headline
31+
$(MARKDOWNLINT) src/**/*.md !src/SUMMARY.md \
32+
'!src/{case_studies/TiogaPass,coreboot.u-root.systemboot/index,u-root,utilities/dut,utilities/UEFI_Tool_Kit}.md'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ make run
3030

3131
The book is linted with markdownlint and Vale. Follow the official
3232
documentation to [install
33-
markdownlint](https://github.com/markdownlint/markdownlint?tab=readme-ov-file#installation)
33+
markdownlint](https://github.com/DavidAnson/markdownlint-cli2)
3434
and [install Vale](https://vale.sh/docs/install). Then run `vale sync` to
3535
download the necessary styles.
3636

0 commit comments

Comments
 (0)