add markdownlint and run lychee in documentation CI workflow

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-07-03 03:32:18 -04:00
parent 1a64e42cfe
commit 74791642c1
6 changed files with 27 additions and 1 deletions

View file

@ -11,5 +11,10 @@ indent_style = space
insert_final_newline = true insert_final_newline = true
max_line_length = 120 max_line_length = 120
[*.{md,txt}]
indent_style = space
indent_size = 4
max_line_length = 80
[*.nix] [*.nix]
indent_size = 2 indent_size = 2

View file

@ -106,6 +106,11 @@ jobs:
run: | run: |
bin/nix-build-and-cache ci bin/nix-build-and-cache ci
- name: Run lychee and markdownlint
run: |
direnv exec . engage just lints lychee
direnv exec . engage just lints markdownlint
- name: Build documentation (book) - name: Build documentation (book)
run: | run: |
./bin/nix-build-and-cache just .#book ./bin/nix-build-and-cache just .#book

1
.markdownlintignore Symbolic link
View file

@ -0,0 +1 @@
.gitignore

View file

@ -37,6 +37,7 @@ The following binaries are used in [`engage.toml`][engage.toml]:
- [`cargo-audit`][cargo-audit] - [`cargo-audit`][cargo-audit]
- [`cargo-deb`][cargo-deb] - [`cargo-deb`][cargo-deb]
- [`lychee`][lychee] - [`lychee`][lychee]
- [`markdownlint-cli`][markdownlint-cli]
### Matrix tests ### Matrix tests
@ -86,6 +87,7 @@ By sending a pull request or patch, you are agreeing that your changes are allow
[sytest]: https://github.com/matrix-org/sytest/ [sytest]: https://github.com/matrix-org/sytest/
[cargo-deb]: https://github.com/kornelski/cargo-deb [cargo-deb]: https://github.com/kornelski/cargo-deb
[lychee]: https://github.com/lycheeverse/lychee [lychee]: https://github.com/lycheeverse/lychee
[markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli
[cargo-audit]: https://github.com/RustSec/rustsec/tree/main/cargo-audit [cargo-audit]: https://github.com/RustSec/rustsec/tree/main/cargo-audit
[direnv]: https://direnv.net/ [direnv]: https://direnv.net/
[mdbook]: https://rust-lang.github.io/mdBook/ [mdbook]: https://rust-lang.github.io/mdBook/

View file

@ -55,6 +55,11 @@ name = "lychee"
group = "versions" group = "versions"
script = "lychee --version" script = "lychee --version"
[[task]]
name = "markdownlint"
group = "versions"
script = "markdownlint --version"
[[task]] [[task]]
name = "cargo-audit" name = "cargo-audit"
group = "security" group = "security"
@ -138,6 +143,11 @@ name = "lychee"
group = "lints" group = "lints"
script = "lychee --verbose --offline docs *.md --exclude development.md" script = "lychee --verbose --offline docs *.md --exclude development.md"
[[task]]
name = "markdownlint"
group = "lints"
script = "markdownlint docs *.md"
[[task]] [[task]]
name = "cargo/all" name = "cargo/all"
group = "tests" group = "tests"

View file

@ -108,6 +108,9 @@
# Needed for finding broken markdown links # Needed for finding broken markdown links
lychee lychee
# Needed for linting markdown files
markdownlint-cli
# Useful for editing the book locally # Useful for editing the book locally
mdbook mdbook
]) ])