Bulk mode currently reviews every lecture under lectures-path with no way to hold files back. Some files should not be style-checked — generated or vendored content, in-progress drafts, _admonition/ style includes and other partials, or lectures deliberately exempted from a rule family — and today the only options are to check them anyway or to not run the action.
This was part of the original request in QuantEcon/meta#226, which asked for exclusion with regex support. It was not carried over when the checker shipped, and it has no home in style-guide either — that repo's schema has per-rule exclusions, which is a different granularity: it answers "which rules never apply", not "which files are never read".
Proposal: a new optional exclude-files input taking a comma-separated list of glob patterns, matched against paths relative to lectures-path, applied in both single and bulk mode so an excluded file is skipped even when named explicitly.
- uses: QuantEcon/action-style-guide@main
with:
mode: bulk
lectures-path: lectures/
exclude-files: '_static/**,**/draft_*.md,_admonition/**'
Globs are suggested over the regex in #226 because they match how lectures-path is already consumed and are easier to get right in YAML — but regex is a reasonable alternative if the more expressive form is wanted.
Touch points: action.yml (new input), style_checker/action.py (thread through review_single_lecture and review_bulk_lectures), and github_handler.find_lecture_file.
Bulk mode currently reviews every lecture under
lectures-pathwith no way to hold files back. Some files should not be style-checked — generated or vendored content, in-progress drafts,_admonition/style includes and other partials, or lectures deliberately exempted from a rule family — and today the only options are to check them anyway or to not run the action.This was part of the original request in QuantEcon/meta#226, which asked for exclusion with regex support. It was not carried over when the checker shipped, and it has no home in
style-guideeither — that repo's schema has per-ruleexclusions, which is a different granularity: it answers "which rules never apply", not "which files are never read".Proposal: a new optional
exclude-filesinput taking a comma-separated list of glob patterns, matched against paths relative tolectures-path, applied in both single and bulk mode so an excluded file is skipped even when named explicitly.Globs are suggested over the regex in #226 because they match how
lectures-pathis already consumed and are easier to get right in YAML — but regex is a reasonable alternative if the more expressive form is wanted.Touch points:
action.yml(new input),style_checker/action.py(thread throughreview_single_lectureandreview_bulk_lectures), andgithub_handler.find_lecture_file.