Krikri::Lint::NameRule
Inherits Krikri::Lint::Rule < Reference < Object
Upstream parity: ansible-lint's name rule family
(severity MEDIUM, tags idiom), implemented as three sub-rules
matching upstream's message tags:
- name[missing]: task has no name
- name[casing]: name does not start with an uppercase letter
- name[template]: Jinja expression not at the end of the name
Instance methods
Mirrors upstream's name[casing] transform: capitalize the first character of the name (prefix "file | " names keep their prefix) and update any handler notify references using the old name.
Autofix support, mirroring upstream's TransformMixin: a rule opts in by overriding fixable? (and carrying the "autofix" tag like upstream does) and implementing fix. fix must only make line-local edits through the FixBuffer (replace spans within existing lines, delete whole lines, add the final newline); returning true marks the violation fixed so the CLI drops it from the report.
Whether upstream's transform marks the given violation fixed. Transformable rules that do not mark it fixed get an "Rule specific fix not applied for" ERROR logged for the match.
Task-oriented: violations belong to an enclosing task, so a
# noqa: anywhere in that task's body suppresses them.
Upstream's name transform only rewrites name[casing] matches and marks them fixed; the other sub-tags get the "not applied" ERROR.