class

Krikri::Lint::JinjaRule

Inherits Krikri::Lint::Rule < Reference < Object

Upstream parity: ansible-lint's jinja rule family (severity LOW, tags formatting). We implement two sub-rules:

  • jinja[invalid]: Jinja templates that fail to parse (via krikri-jinja)
  • jinja[spacing]: missing inner padding, {{ x }} not {{x}} Upstream additionally reformats expressions with black; that full reformat is a deliberate non-goal (black-based, not a parity gap this ruleset attempts to close).

Instance methods

applies_to
Source
check(file : PositionedFile, violations : Array(Violation)) : Nil
Source
marks_fixed?(violation : Violation) : Bool

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.

Source
severity
Source
tags
Source
task_scoped?

Task-oriented: violations belong to an enclosing task, so a # noqa: anywhere in that task's body suppresses them.

Source
transformable?

Upstream's jinja transform only fixes jinja[spacing] (and only when it can locate the templated value); jinja[invalid] gets the "not applied" ERROR.

Source