Skip to content
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
9 changes: 8 additions & 1 deletion .github/workflows/_markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Reusable: Markdown Lint
# Generic markdown linting — uses the calling repo's own markdownlint config.
# Uses the calling repo's own markdownlint config, falling back to org defaults.
name: _markdown-lint

on:
Expand All @@ -20,6 +20,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Apply org-default markdownlint config
if: hashFiles('.markdownlint-cli2.jsonc', '.markdownlint-cli2.yaml', '.markdownlint-cli2.cjs', '.markdownlint-cli2.mjs', '.markdownlint.jsonc', '.markdownlint.json', '.markdownlint.yaml', '.markdownlint.yml', '.markdownlint.cjs', '.markdownlint.mjs') == ''
run: |
curl -sSfL --retry 3 --retry-connrefused \
"https://raw.githubusercontent.com/${{ github.repository_owner }}/.github/main/configs/.markdownlint-cli2.yaml" \
-o .markdownlint-cli2.yaml

- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v22
with:
Expand Down
22 changes: 22 additions & 0 deletions configs/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Organization-wide markdownlint defaults
# Repos inherit this via the _markdown-lint.yml reusable workflow.
# To override: add a .markdownlint-cli2.yaml to your repo root.
config:
MD013:
line_length: 160
heading_line_length: 80
code_block_line_length: 80
tables: true
strict: true

# Allow duplicate headings in different sections (standard for changelogs)
MD024:
siblings_only: true

# Per-file overrides
overrides:
- files:
- "CHANGELOG.md"
config:
# release-please generates long lines with PR links
MD013: false