mirror of
https://github.com/linux-msm/qdl.git
synced 2026-10-07 06:29:17 -07:00
scripts: lint every tracked markdown file
The markdown lint wrapper names README.md and docs/ explicitly, so documents like AGENTS.md, CONTRIBUTING.md and RELEASING.md have never been linted and accumulated findings silently. Derive the file list from git ls-files instead, excluding CHANGELOG.md - generated by the release process, where long release-note URLs and per-release repeated section headers are part of the format - and CLAUDE.md, a symlink to the already-linted AGENTS.md. New documents are picked up automatically. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
This commit is contained in:
1 parent
6c47f1cb7c
commit
eca982a599
1 file changed
+5
-3
@@ -8,9 +8,11 @@ ROOT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )/../"
|
||||
# Run consistently from the repo root regardless of where the script is called
|
||||
cd "$ROOT_PATH"
|
||||
|
||||
# Files to lint. mdl scans directories recursively, so everything under
|
||||
# docs/ is covered automatically.
|
||||
MARKDOWN_FILES=("README.md" "docs/")
|
||||
# Lint every markdown file tracked in git, except:
|
||||
# - CHANGELOG.md: generated by the release process; long release-note
|
||||
# URLs and per-release repeated section headers are part of the format
|
||||
# - CLAUDE.md: a symlink to AGENTS.md, which is already linted
|
||||
mapfile -t MARKDOWN_FILES < <(git ls-files '*.md' ':!CHANGELOG.md' ':!CLAUDE.md')
|
||||
|
||||
run_lint() {
|
||||
if ! command -v mdl >/dev/null 2>&1; then
|
||||
|
||||
Reference in new issue
Block a user