Skip to content

Commit

Permalink
add markdownlint and run lychee in documentation CI workflow
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo committed Jul 3, 2024
1 parent 1a64e42 commit 7479164
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ indent_style = space
insert_final_newline = true
max_line_length = 120

[*.{md,txt}]
indent_style = space
indent_size = 4
max_line_length = 80

[*.nix]
indent_size = 2
indent_size = 2
5 changes: 5 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ jobs:
run: |
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)
run: |
./bin/nix-build-and-cache just .#book
Expand Down
1 change: 1 addition & 0 deletions .markdownlintignore
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The following binaries are used in [`engage.toml`][engage.toml]:
- [`cargo-audit`][cargo-audit]
- [`cargo-deb`][cargo-deb]
- [`lychee`][lychee]
- [`markdownlint-cli`][markdownlint-cli]

### Matrix tests

Expand Down Expand Up @@ -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/
[cargo-deb]: https://github.com/kornelski/cargo-deb
[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
[direnv]: https://direnv.net/
[mdbook]: https://rust-lang.github.io/mdBook/
Expand Down
10 changes: 10 additions & 0 deletions engage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ name = "lychee"
group = "versions"
script = "lychee --version"

[[task]]
name = "markdownlint"
group = "versions"
script = "markdownlint --version"

[[task]]
name = "cargo-audit"
group = "security"
Expand Down Expand Up @@ -138,6 +143,11 @@ name = "lychee"
group = "lints"
script = "lychee --verbose --offline docs *.md --exclude development.md"

[[task]]
name = "markdownlint"
group = "lints"
script = "markdownlint docs *.md"

[[task]]
name = "cargo/all"
group = "tests"
Expand Down
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
# Needed for finding broken markdown links
lychee

# Needed for linting markdown files
markdownlint-cli

# Useful for editing the book locally
mdbook
])
Expand Down

0 comments on commit 7479164

Please sign in to comment.