{% if error %} {% else %}
{{ query_results|length }} quer{% if query_results|length == 1 %}y{% else %}ies{% endif %} {% set passed = query_results | selectattr('is_valid') | list | length %} {% set failed = query_results | rejectattr('is_valid') | list | length %} {{ passed }} passed {{ failed }} failed {% if warning_count %} {{ warning_count }} warning{{ warning_count|pluralize }} {% endif %} {{ duration_ms }} ms ยท {{ dialect }} {% if full_report_json %} {% endif %}
{% if query_results %}
    {% for q in query_results %}
  1. Query {{ q.query_index }} {% if q.is_valid %} Valid {% else %} {{ q.error_count }} error{{ q.error_count|pluralize }} {% endif %} {% if q.warning_count %} {{ q.warning_count }} warning{{ q.warning_count|pluralize }} {% endif %}
    {{ q.sql_pretty }}
    {% if q.violations %}
      {% for v in q.violations %}
    • {{ v.severity }} {{ v.rule_id }}

      {{ v.issue }}

      {% if v.fix is mapping %}

      Fix ({{ v.fix.action }}): {% if v.fix.action == 'REPLACE' %} replace span [{{ v.fix.span[0] }}, {{ v.fix.span[1] }}) with {{ v.fix.text }} {% elif v.fix.action == 'ADD' %} insert {{ v.fix.text }} at offset {{ v.fix.at }} {% elif v.fix.action == 'REMOVE' %} remove span [{{ v.fix.span[0] }}, {{ v.fix.span[1] }}) {% else %} {{ v.fix.text or v.fix }} {% endif %}

      {% elif v.fix %}

      Fix: {{ v.fix }}

      {% endif %}
    • {% endfor %}
    {% endif %}
    {{ q.json_str }}
  2. {% endfor %}
{% endif %} {% endif %}