lint-qmd.yml
Lint the prose sections of tracked .qmd Quarto files with markdownlint. Quarto code chunks (```{lang} / ```{=fmt}) are replaced with blank lines before linting so only prose is checked; YAML front matter is skipped natively by markdownlint. A default 80-character line-length ceiling (MD013) encourages semantic line breaks - one sentence or clause per source line - without requiring a separate rule for them.
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
config-file |
string | '' |
Path (in the caller repo) to a markdownlint config file (.jsonc/.json/.yml/.yaml). Falls back to the bundled default when empty or the file does not exist. |
globs |
string | '*.qmd' |
Space-separated git pathspecs of tracked files to lint (recursive by default). |
paths-ignore |
string | '' |
Comma/newline-separated glob patterns (relative paths) to skip. Supports *, ?, and recursive **. |
fail |
boolean | true |
Fail the workflow when markdownlint reports an error. |
max-line-length |
string | '80' |
Maximum prose line length (MD013). Applied on top of the resolved config. Set 0 to disable the line-length check. |
Permissions
Only contents: read (the default), so no permissions: block is needed.
Example
# Copy to .github/workflows/lint-qmd.yml in your repo.
# Lints the prose sections of tracked .qmd Quarto files with markdownlint.
# Code chunks are stripped before linting; only prose is checked.
# Only contents:read is needed (the default), so no permissions block is required.
name: Lint QMD Prose
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
lint:
uses: Morrison-Lab/gha/.github/workflows/lint-qmd.yml@v2
# with:
# config-file: '.markdownlint.jsonc' # override the bundled default config
# globs: '*.qmd' # git pathspecs to lint (recursive)
# paths-ignore: 'docs/' # skip generated output directories
# fail: false # warn instead of failing on errors
# max-line-length: '100' # override the default 80-char ceilingSee the examples/ directory for the full caller stub (lint-qmd.yml).