Skip to content
Open
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
10 changes: 10 additions & 0 deletions .github/markdown-link-check.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
}
18 changes: 18 additions & 0 deletions .github/markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*):(\\d+)(:(\\d+))? (MD\\d+\\/[^ ]+) (.*)$",
"file": 1,
"line": 2,
"column": 4,
"code": 5,
"message": 6
}
]
}
]
}
11 changes: 11 additions & 0 deletions .github/markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"default": true,
"MD013": {
"line_length": 120
},
"MD014": false,
"MD029": false,
"MD025": false,
"MD034": false,
"MD041": false
}
47 changes: 47 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: markdown
on:
pull_request:
paths:
- '.github/workflows/markdown.yml'
- '.github/markdownlint.json'
- '.github/markdownlint.jsonc'
- '.github/markdown-link-check.jsonc'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Declare default permissions as read only.
permissions: read-all

jobs:
markdown-lint:
name: Lint markdown files
runs-on: ubuntu-22.04
steps:
- name: Checkout devtools
uses: actions/checkout@v4

- name: Register markdownlint warning matcher
run: |
echo "::add-matcher::.github/markdownlint.json"

- name: Lint markdown files
uses: avto-dev/markdown-lint@v1
with:
args: '**/*.md'
config: '.github/markdownlint.jsonc'

- name: Remove markdownlint warning matcher
if: always()
run: |
echo "::remove-matcher owner=markdownlint::"

- uses: gaurav-nelson/github-action-markdown-link-check@master
if: always()
with:
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
base-branch: ${{ github.base_ref }}
config-file: '.github/markdown-link-check.jsonc'
Loading