apme: mechanical lint sweep (L067 + L025 + L070) #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "apme/lint-sweep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First batch of fixes against the APME analysis of main (scan 8049d507f471, 1871 violations). Hand-rolled fixers since APME's autopatcher introduced behaviour-changing bugs (capitalized Jinja filters, mangled shell heredocs).
verbosity: 1to everyansible.builtin.debug:task that lacked it. 43 files.name:, EE image names, collection list items, AAP JT lookup names. 13 files.{{ Jinja }}in task names to the end of the string while preserving theRole | …prefix convention. 9 files.YAML safe-load + ansible-playbook --syntax-check pass on all modified files.
Next PRs will cover L043 (405 bare vars), M005 (59 untrusted templates), L060 + L049 + misc lints, and the R-series audit.
APME flagged 184 task names that had a `{{ … }}` Jinja expression in the middle or start of the name (rule L070 — "Jinja in task names should only appear at the end of the name string"). This commit rewrites 67 of them where the pattern is unambiguous: Before: `Role | {{ x.attr }} — verb` After: `Role | verb — {{ x.attr }}` Preserves the `Role | …` prefix our codebase uses for log filtering. Pure cosmetic — task semantics unchanged. The remaining ~117 L070 findings sit on names that don't match this fixed pattern (no role prefix, multiple Jinja expressions, or Jinja embedded in literal text); those need case-by-case rewrites and are left for a follow-up pass. Generated by /tmp/fix_l070.py. YAML safe-load passes on all 9 modified files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>