Skip to content

Commit

Permalink
Merge pull request #354 from nifadyev/feature/#347/configure-markdown…
Browse files Browse the repository at this point in the history
…-linter-and-formatter

#347: Add markdownlint-cli2 as Github Action and pre-commit hook
  • Loading branch information
satwikkansal authored Nov 5, 2024
2 parents ebfa77e + 77c978b commit 15429d0
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 308 deletions.
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

0 comments on commit 15429d0

Please sign in to comment.