Skip to content

Commit e374a88

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

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-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

0 commit comments

Comments
 (0)