Repository navigation
v1.8.0
Results of reviewing every check that had no auto-fix. A fix was added only where the right rewrite can be worked out from the file itself and keeps the author's intent. Anything that needs a person to decide what was meant stays report-only. That covers block pairing, duplicate IDs, E400's hashes and everything in bes-relevance-lint. Each new fix was run over jgstew/bigfix-content (1,108 files) and a BigFix server export (2,987 files), every resulting diff was reviewed, and a second run changed nothing.
⚠️ Upgrade notes
- More files get rewritten, and fail the hook once. Auto-fix is on by default when files are given, which is how pre-commit runs hooks. Content that passed with only warnings on v1.7.0 can now be rewritten, for example a
RUNverb,RunAs=or aHIGHseverity. The hook exits 1 so the change is reviewed and re-staged. Passargs: ["--auto-fix", "no"]to report without rewriting. bes-actionscript-lint-schclassnow changes files. Its new--auto-fixlowercasesW302/W303. Before this release the hook never rewrote anything, and it exited 0 on warnings.W504is retired (bes-actionscript-validate-script).dosis no longer reported. A leftover--disable W504only prints the unknown-code notice.
Added: auto-fixes
bes-conventions-check
E200: a missing ActionScriptMIMETypeis set toapplication/x-Fixlet-Windows-Shell, which every ActionScript hook already assumes. An allowed MIMEType in the wrong case is respelled.<ActionScript ...>text inside a CDATA body, such as relevance that generates BES XML, is never touched.E201: an unambiguous year-first SourceReleaseDate becomesYYYY-MM-DD:2026-7-4,2026/07/14,2026.07.14or2026-07-14T10:20:30Z. A month-first or day-first date such as07/14/2026is never guessed at.E202/E216: a timestamp that is only badly formatted is respelled. That covers zero-padding, capitalization, full month or day names, aGMT/UTC/UT/Zzone (becomes+0000) and a+HH:MMoffset. A day-of-week that is wrong for the date is dropped, not recomputed; RFC 5322 makes it optional. An unparsable value is left alone.E209: a lowercase or mixed-casecve-prefix is uppercased. Several<CVENames>elements are not merged.E219: an evaluation period is zero-padded (6:5:0→06:05:00) when minutes and seconds are already below 60.W216: a SourceSeverity that differs from an allowed value only in case is respelled (HIGH→High). This also works with--severity-values.W220: DownloadSize is set to the prefetches' total, with the unzip utility left out. This happens only when the check can know the total.
bes-actionscript-validate-script
E524:else ifbecomeselseif, unless the body has a strayendif(E501). A secondendifmeans anifreally was nested inside theelse.W505: a waiting cmd.exe's/kbecomes/c. A missing/cis inserted after cmd's own leading switches (/q,/d,/e:on, ...). Lines with/ror an unknown leading switch are left alone.E521: a bracketed but unquoted registry key is quoted:regset [HKEY_...\x]→regset "[HKEY_...\x]". A key with no brackets is left alone.
bes-actionscript-lint-schclass
W302/W303: new--auto-fixlowercases a non-lowercase command verb, or an override option keyword or value. It changes case only, and a{...}value is never touched. This is the hook's first auto-fix. Its scope is otherwise unchanged: the lexical grammar decides only which text is the verb.
bes-actionscript-validate-prefetch
-
E403: two stray-text shapes have exactly one meaning each, and are fixed offline.sha2:/sha2=in front of a 64-hex value becomessha256, and a space directly after the URL becomes%20. Stray text anywhere else is left for a human. -
http → https under
--auto-fix-network(opt-in, the fix forbes-conventions-check'sW207). Anhttp://prefetch URL is switched tohttps://only after the https copy is proven to be the same file:- A HEAD request must report a
Content-Lengthequal to the line's size. This is checked before anything is downloaded, so a mismatch costs no download. - The request must not redirect off https.
- The download is capped one byte past the expected size, and its size and every hash on the line (sha1 and/or sha256) must match.
Only the URL's scheme changes. Each URL is checked at most once per run. In a live test on 28 real prefetches across 22 hosts, 12 were switched (software.bigfix.com, downloads.dell.com, support.bigfix.com, 7-zip.org, ...). The other 16 were left on http: 404s, dead hosts, TLS or certificate errors, and two newer files served under the same name that were caught by the size check without being downloaded.
- A HEAD request must report a
Added: codes
W407(bes-actionscript-validate-prefetch):--auto-fix-networkcould not switch an http prefetch URL to https, and the line stays on http. The message says why: the host was unreachable, a redirect left https, the Content-Length differed, or the size or a hash differed.--disable W407turns the https switch off.
Removed
bes-actionscript-validate-scriptW504: it warned thatdoswas deprecated and suggestedwaithidden cmd.exe /c. The BigFix reference doesn't deprecatedos, and the suggested replacement behaves differently:dosshows its window and ends the action script when the command fails. The code will not be reused.
Fixed
bes-relevance-lintW605(an ActionScript substitution whose value is an opaque object with no text form) was reported but missing from the module docstring and the hook description. A new test now fails if any reported code is missing from the docstring, the hook description, or the README table.
Docs
- README,
.pre-commit-hooks.yamldescriptions and module docstrings updated for every new fix,W407and theW504retirement.RELEASE_NOTES.mdhas new "auto-fix review" sections.
Full Changelog: v1.7.0...v1.8.0