Skip to content

Commit 15429d0

Browse files
authored
Merge pull request satwikkansal#354 from nifadyev/feature/satwikkansal#347/configure-markdown-linter-and-formatter
satwikkansal#347: Add markdownlint-cli2 as Github Action and pre-commit hook
2 parents ebfa77e + 77c978b commit 15429d0

File tree

4 files changed

+496
-308
lines changed

4 files changed

+496
-308
lines changed

.github/workflows/pr.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [pull_request]
2+
3+
permissions:
4+
contents: read
5+
pull-requests: read
6+
checks: write
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: DavidAnson/markdownlint-cli2-action@v17

.markdownlint.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# MD013/line-length
2+
MD013:
3+
line_length: 120
4+
5+
# no-duplicate-heading - Multiple headings with the same content (Ignore multiple `Explanation` headings)
6+
MD024: false
7+
8+
# no-trailing-punctuation - Trailing punctuation in heading (Ignore exclamation marks in headings)
9+
MD026: false
10+
11+
# no-inline-html : Inline HTML (HTML is used for centered and theme specific images)
12+
MD033: false
13+
14+
# no-inline-html : Bare URL used (site should be attributed transparently, because otherwise we have to un-necesarily explain where the link directs)
15+
MD034: false

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
default_language_version:
2+
python: python3.12
3+
repos:
4+
- repo: https://github.com/DavidAnson/markdownlint-cli2
5+
rev: v0.14.0
6+
hooks:
7+
- id: markdownlint-cli2

0 commit comments

Comments
 (0)