Skip to content

ENH: add exclude-files input to skip paths from style checking #27

Description

@mmcky

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions