Skip to content

Releases: jgstew/pre-commit-jgstew

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 30 Jul 19:35

v2.3.0

Deprecation release: validate-bes follows check-bes-conventions out to jgstew/pre-commit-bigfix. All BigFix-specific hooks are now on their way out of this repo.

⚠️ Deprecated: validate-bes moved to jgstew/pre-commit-bigfix

  • validate-bes now lives at jgstew/pre-commit-bigfix alongside check-bes-conventions.
  • It still works in this release, but prints a deprecation banner on stderr on every run (verbose: true, so pre-commit shows it even on success), and will be removed in the next release.
  • Update your .pre-commit-config.yaml — both BigFix hooks in one repo entry:
repos:
  - repo: https://github.com/jgstew/pre-commit-bigfix
    rev: v0.3.1
    hooks:
      # validate-bes is now bes-schema-validate
      - id: bes-schema-validate
      # check-bes-conventions is now bes-conventions-check
      - id: bes-conventions-check
  • The check-bes-conventions banner now points at rev: v0.2.0 (was v0.1.0).
  • Validation logic is unchanged; only the banner, hook metadata, and README wording changed.
  • Removed the check-bes-conventions self-reference from this repo's own .pre-commit-config.yaml.

CI

  • Bumped actions/setup-python from v6.3.0 to v7.0.0 across all workflows.
  • Bumped lewagon/wait-on-check-action from v0.2 to v1.8.1.

Full Changelog: v2.2.0...v2.3.0

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Jul 19:18

v2.2.0

Deprecation release: check-bes-conventions has moved to its own repo. Plus CI speedups and a new dev-time git hygiene hook.

⚠️ Deprecated: check-bes-conventions moved to jgstew/pre-commit-bigfix

  • The hook now lives at jgstew/pre-commit-bigfix.
  • It still works in this release, but prints a loud deprecation banner on stderr on every run (the hook entry sets verbose: true so pre-commit shows it even when the hook passes), and it will be removed in the release after this one.
  • Update your .pre-commit-config.yaml:
repos:
  - repo: https://github.com/jgstew/pre-commit-bigfix
    rev: v0.3.1
    hooks:
      # check-bes-conventions is now bes-conventions-check
      - id: bes-conventions-check
  • The hook name/description in .pre-commit-hooks.yaml and the README table are marked DEPRECATED accordingly. No check logic changed.

Repo & tooling

  • Added .gitattributes: *.bes is now text eol=CRLF, tagged as XML for linguist, with blank-at-eol whitespace checks disabled; *.reg gets working-tree-encoding=UTF-16LE + eol=CRLF.
  • Added the git-check hook (jumanjihouse/pre-commit-hooks) to this repo's own config, configured via the new .gitattributes, and check-mailmap as a manual-stage hook.
  • Enabled fix-files-to-ascii on this repo's own config, and bumped its self-reference to v2.1.1.
  • .gitignore: ignore .DS_Store.

CI

  • Cache ~/.cache/pre-commit (keyed on the .pre-commit-config.yaml hash) in the pre-commit and tag-and-release workflows.
  • Pinned actions/setup-python to v6.3.0; bumped actions/cache from v4 to v6.
  • Standardized workflow Python on 3.11 (pre-commit workflow was 3.12, yamllint was 3.8).

Full Changelog: v2.1.1...v2.2.0

v2.1.1

Choose a tag to compare

@github-actions github-actions released this 15 Jul 12:28

v2.1.1

Major release: the project has been renamed from pre-commit-hooks to pre-commit-jgstew. No config changes needed for pre-commit users! This is a breaking change for anyone who installs or imports the package directly, which is why the version jumps to 2.x. It also substantially expands the BigFix BES convention checker.

⚠️ Breaking: project rename

  • The distribution/PyPI name is now pre-commit-jgstew (was pre-commit-hooks), and the import package is now pre_commit_jgstew (was pre_commit_hooks).
  • Update any direct installs (pip install pre-commit-jgstew) and any import pre_commit_hooks / from pre_commit_hooks import ... to the new name.
  • The wheel is now published as pre_commit_jgstew-2.1.1-py3-none-any.whl.
  • No config changes needed for pre-commit users: the hook ids and console-script entry-point names are unchanged, so .pre-commit-config.yaml files that reference this repo by URL keep working as-is.

Hook refinements

  • check-bes-conventions (BigFix .bes files): significantly expanded the content checks and in-place auto-fixes (bigfix_bes_check_conventions.py grew by ~450 lines), with matching new test coverage.

Tests & tooling

  • Added packaging-metadata tests that cross-validate setup.cfg console scripts, .pre-commit-hooks.yaml, and the package modules, plus guard tests for the rename and for setup.py --version emitting a valid version.

Full Changelog: v1.6.3...v2.1.1

v1.6.3

Choose a tag to compare

@github-actions github-actions released this 15 Jul 03:12

v1.6.3

Maintenance release: CI security hardening and refinements to the existing convention-check hooks. No new hooks and no breaking changes.

CI / security

  • Added zizmor GitHub Actions security scanning (.github/zizmor.yaml) and applied its fixes across the workflows.
  • Scoped least-privilege permissions: blocks on every workflow (contents: read, plus checks: write for misspell and contents: write for tag-and-release).
  • Set persist-credentials: false on checkout steps and passed the version through an env: var in tag-and-release to avoid template injection in the shell step.
  • Removed the standalone flake8 workflow (flake8 now runs via pre-commit) and dropped --hook-stage manual from the PR pre-commit run.
  • Bumped actions/checkout from v6 to v7 (dependabot).

Hook refinements

  • check-processor-conventions, check-recipe-conventions, and check-bes-conventions (AutoPkg processor .py, AutoPkg recipe .recipe/.recipe.yaml, and BigFix .bes files respectively): internal cleanups and fixes surfaced by ruff/slyp, with no change to the rule set.

Tooling

  • Enabled ruff, bandit, slyp, and zizmor in the repo's own .pre-commit-config.yaml; codespell config moved to pyproject.toml.

Full Changelog: v1.6.2...v1.6.3

v1.6.2

Choose a tag to compare

@github-actions github-actions released this 15 Jul 02:03

New hook

  • fix-files-to-ascii -- the auto-fixing companion to verify-files-are-ascii: transliterates non-ASCII content to ASCII in place via anyascii, with a pre-substitution table so directional arrows become -> / <- (and <->). Preserves line endings.

check-bes-conventions greatly expanded

  • New checks: DownloadSize value (auto-fix -> 0), Description boilerplate-placeholder, CPE-2.3 value, action-ui-metadata shape, entity-escaped </>/& that should be <![CDATA[...]]> (auto-fix unescapes + wraps), prefetch-line shape, ActionScript blank-line spacing, and CRLF line endings (auto-fix normalizes the whole file to CRLF).
  • Missing SourceReleaseDate / x-fixlet-modification-time are now auto-fixable.
  • Each content object (Task/Fixlet/...) in a <BES> is validated independently, with opt-out markers scoped per object.

regex-search-filter-replace hardened

  • Preserves line endings (no more CRLF -> LF).
  • Adds --encoding (default utf-8).
  • Reports non-UTF-8 reads and un-encodable writes as failures instead of silently skipping or crashing (and never truncates a file on a failed write).

Other

  • Line-ending-preserving fixers across the board.
  • CI: fold standalone black/isort/etc. GitHub Actions into pre-commit; rework workflow triggers.
  • Add pyproject.toml config: [tool.pytest.ini_options] (pythonpath/testpaths) and [tool.codespell].
  • Spelling fixes and assorted hook tweaks.

Full Changelog: v1.6.1...v1.6.2

v1.6.1

Choose a tag to compare

@github-actions github-actions released this 14 Jul 19:59

New hook

  • check-bes-conventions -- the content-level companion to validate-bes (which only checks XSD validity). Opinionated checks the schema cannot express:

    • ActionScript MIMEType must be one of the allowed set;
    • SourceReleaseDate must be YYYY-MM-DD;
    • x-fixlet-modification-time must be in the expected format;
    • Task/Fixlet content must carry a release date and a modification time.

    Unparsable files are skipped (validate-bes stays the authority on validity). Ships with a test suite.

Full Changelog: v1.5.1...v1.6.1

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 13 Jul 13:55

New hook

  • check-recipe-conventions -- picky, opinionated cross-field checks and auto-fixes for AutoPkg recipe files (YAML or plist) that a JSON schema cannot express: Identifier <-> Input NAME, ParentRecipe resolvability/cycles, duplicate Identifier/Description, filename <-> identifier type, MinimumVersion floor, Process-step blank-line spacing, http/https, regex validity, and shared-processor references. Auto-fixes the fixable ones; --strict also fails on remaining warnings. Ships with a test suite and README updates.

Maintenance

  • Bump actions/checkout (6 -> 7).

Full Changelog: v1.4.1...v1.5.1

v1.4.1

Choose a tag to compare

@github-actions github-actions released this 13 Jul 13:36

Testing / CI

  • Add a full pytest suite covering the hooks (tests/), a shared conftest.py, and a pre-commit GitHub Action.
  • Move example fixtures from test/ to tests/examples/.

Improvements

  • check-processor-conventions improvements and fixes.
  • Small fixes to revert-missing-change, verify-files-contain-entry, verify-files-contain-pattern, and local-hook wiring.

Full Changelog: v1.4.0...v1.4.1

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 23:10

New hook

  • check-processor-conventions -- picky, opinionated checks and auto-fixes for AutoPkg processor .py files (boilerplate, docstrings, input/output_variables, __main__ guard, naming, ...). Highlights:
    • auto-fixes the fixable issues in place;
    • can generate a new-processor / test-recipe stub;
    • --disable to skip specific checks;
    • defaults to checking all processor-like Python scripts.

Minor version bump (new feature).

Full Changelog: v1.3.2...v1.4.0

v1.3.2

Choose a tag to compare

@github-actions github-actions released this 30 Jun 17:46

Improvements

  • regex-search-filter-replace -- reworked search/filter/replace logic and reporting.

Maintenance

  • CI workflow updates; bump actions/checkout (4 -> 6) and reviewdog/action-misspell (1.26.3 -> 1.27.0).

Full Changelog: v1.3.1...v1.3.2