Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#347: Add markdownlint-cli2 as Github Action and pre-commit hook #354

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on: [pull_request]

permissions:
contents: read
pull-requests: read
checks: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v17
15 changes: 15 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# MD013/line-length
MD013:
line_length: 120

# no-duplicate-heading - Multiple headings with the same content (Ignore multiple `Explanation` headings)
MD024: false

# no-trailing-punctuation - Trailing punctuation in heading (Ignore exclamation marks in headings)
MD026: false

# no-inline-html : Inline HTML (HTML is used for centered and theme specific images)
MD033: false

# no-inline-html : Bare URL used (site should be attributed transparently, because otherwise we have to un-necesarily explain where the link directs)
MD034: false
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default_language_version:
python: python3.12
repos:
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.14.0
hooks:
- id: markdownlint-cli2
Loading