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
31 changes: 31 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linting

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

# This identifies which files changed in the specific commit or PR
- uses: tj-actions/changed-files@v47
id: changed-files
with:
files: '**/*.md'
separator: ","

# This runs the linter ONLY on the files identified above
- uses: DavidAnson/markdownlint-cli2-action@v22
if: steps.changed-files.outputs.any_changed == 'true'
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ chore: update mkdocs dependencies

### Linting

The project uses [markdownlint](https://github.com/DavidAnson/markdownlint) with configuration in `.markdownlint.json`. Key settings:
The project uses [markdownlint](https://github.com/DavidAnson/markdownlint) with configuration in `.markdownlint.json`.

**Automated Checks:**
We have a GitHub Action that checks for formatting errors on Pull Requests. To follow best practices, **it only checks files that you have modified.** If the check fails, click the **Details** link next to the status check to view the error logs and see exactly what needs fixing.

**Key Rules:**

- 4-space indentation for lists (`MD007`).
- No hard tab restrictions disabled.
Expand All @@ -186,7 +191,8 @@ The project uses [markdownlint](https://github.com/DavidAnson/markdownlint) with
- Allowed code blocks without language specification (`MD040`).
- Allow fenced code blocks, as this commonly errors when indented (see [discussion](https://github.com/DavidAnson/markdownlint/issues/327)).

For faster PR review, you may want to run linting locally; we do have a PR Action in place as well. First install markdownlint, then run
**Local Testing**
For faster PR review, you may want to run linting locally. We recommend installing `markdownlint-cli` or the VS Code extension.

```console
markdownlint -c .markdownlint.json -f docs/wiki-guide/
Expand Down