summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-14 00:48:16 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2026-05-14 05:08:37 +0000
commit41341ac4d4cb89328b456ea8f7b0fdeef45e9d39 (patch)
tree3fa06625e204cd4d74afdb971dbbb86f4de25438 /.github/workflows
parentb0f65e129d8bc90ba733fa1a18dcd6cf392431e7 (diff)
downloadvyos-documentation-41341ac4d4cb89328b456ea8f7b0fdeef45e9d39.tar.gz
vyos-documentation-41341ac4d4cb89328b456ea8f7b0fdeef45e9d39.zip
ci(doc-linter): exclude docs/_rst_legacy/ and docs/_build/ from lint scope
`is_docs_path()` returned True for any path under `docs/`, including the archived RST shadows under `docs/_rst_legacy/` and the build output under `docs/_build/`. Sphinx excludes both from the build (per `docs/conf.py`'s exclude_patterns) and AGENTS marks `_rst_legacy` as reference-only. The linter shouldn't process either. Add a `DOCS_EXCLUDED_SUBDIRS = ('_build', '_rst_legacy')` constant. After confirming a path is under `docs/`, walk each excluded subtree and reject the path if it's contained. Also unify the auto-discover walk fallback to call `is_docs_path()` for the filter — previously it had its own hand-rolled `"_build" not in path` check that didn't handle `_rst_legacy` at all and would have walked the entire legacy archive. Prune `dirs[:]` in-place at each walk level so we don't descend into the excluded subtrees in the first place — optimization on top of correctness. Reverted the `_dirs` -> `dirs` rename here because we now mutate it. Test coverage: 10 hand-coded `is_docs_path()` cases — all pass: - `docs/configuration/foo.md` -> True - `docs/_rst_legacy/foo.rst` -> False (was True) - `docs/_rst_legacy/subdir/rst-foo.rst` -> False (was True) - `docs/_build/html/index.html` -> False (was True) - `docs/_include/foo.txt` -> True (live snippets stay in scope) - `docs` -> True - `AGENTS.md`, `README.md`, `.github/copilot-instructions.md`, `scripts/doc-linter.py` -> False (already correct) Tracked as item 4 of the rolling-side cleanup backlog from PR #2014 / #2019 / #2020 reviews. 🤖 Generated by [robots](https://vyos.io) (cherry picked from commit 379ed4757b62a7c1df965a59bc4f1fd0cef2d3e8)
Diffstat (limited to '.github/workflows')
0 files changed, 0 insertions, 0 deletions