Skip to content

Commit 5727692

Browse files
committed
Setup markdownlint Github Action
1 parent c909ede commit 5727692

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/workflows/pr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
- name: Write git diff to temp file
18+
run: |
19+
git fetch origin
20+
git diff origin/${{ github.base_ref }} --unified=0 *.md translations/*/*.md \
21+
> ${{ runner.temp }}/diff.md
1722
- uses: DavidAnson/markdownlint-cli2-action@v17
23+
with:
24+
globs: "${{ runner.temp }}/diff.md"

.markdownlint.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# MD013/line-length
21
MD013:
32
line_length: 120
43

@@ -13,3 +12,6 @@ MD033: false
1312

1413
# no-inline-html : Bare URL used (site should be attributed transparently, because otherwise we have to un-necesarily explain where the link directs)
1514
MD034: false
15+
16+
# first-line-h1 : First line in a file should be a top-level heading (Ignore because diff file will never have valid heading)
17+
MD041: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ If you're an experienced Python programmer, you can take it as a challenge to ge
2323
PS: If you're a returning reader, you can learn about the new modifications [here](https://github.com/satwikkansal/wtfpython/releases/) (the examples marked with asterisk are the ones added in the latest major revision).
2424

2525
So, here we go...
26+
[invalid link]()
2627

2728
# Table of Contents
2829

0 commit comments

Comments
 (0)