← ClaudeAtlas

perl-patch-reviewlisted

Use when reviewing or writing a Perl patch against Bugzilla 5.0+/Harmony - a change touching Bugzilla/*.pm modules, a *.cgi script, or Bugzilla::Object subclasses. Covers Harmony's actual coding-style enforcement (perltidy/perlcritic config, tabs-vs-spaces, shebang and pragma rules from the t/ test suite), Bugzilla::Object validator/dependency patterns, and taint-safety idioms (detaint_natural/detaint_signed). Trigger for patch review, "does this follow Bugzilla conventions", or "will this pass perl -c / the test suite" questions.
topunix/bugzilla-skills · ★ 0 · Code & Development · score 64
Install: claude install-skill topunix/bugzilla-skills
# Bugzilla Perl Patch Review Reviews should check two independent things: does the patch pass Harmony's own automated style/compile checks, and does it follow the `Bugzilla::Object` conventions for data classes. Every rule here is sourced directly from the `bugzilla/harmony` repo (config files and `t/*.t` test sources) or the public Bugzilla Developer's Guide — see `reference/` for the full quotes. Don't apply a rule from general Perl folklore (e.g. "Bugzilla uses tabs") unless it's confirmed below; Harmony's actual enforced style has diverged from some older Bugzilla lore. ## Style and gating checks Harmony enforces style with a real test suite (`t/002goodperl.t`, `t/005whitespace.t`, `critic.t`, `011pod.t`), not just convention. A patch should satisfy all of: - **No tabs.** `t/005whitespace.t` fails any file containing a tab character ("contains tabs --WARNING"). Bugzilla/Harmony code is **space-indented**, not tab-indented — this reverses the "Bugzilla uses tabs" folklore from much older releases. - **2-space indent**, LF line endings, final newline — from `.editorconfig`, applied to `.pl`/`.pm`/`.cgi`/`.t` and to templates/CSS/JS/YAML. - **perltidy** with `-pbp` (Perl Best Practices) as the base profile, `-i=2 -ci=2` (2-space indent/continuation), 80-column lines, high paren/brace/bracket tightness (`.perltidyrc`). Run perltidy with the repo's own `.perltidyrc` before proposing a diff, don't hand-format. - **perlcritic** at `severity = 1` with the `freen