{% set gate_passed = (smells_by_severity.high == 0 and security_by_severity.critical == 0 and security_by_severity.high == 0 and test_coverage >= 60 and doc_coverage >= 80) %}
{% if gate_passed %}✓{% else %}✗{% endif %}
{% if gate_passed %}QUALITY GATE PASSED{% else %}QUALITY GATE FAILED{% endif %}
{% if not gate_passed %}
{% if test_coverage < 60 %}Coverage {{ test_coverage }}% < 60% · {% endif %}
{% if doc_coverage < 80 %}Docs {{ doc_coverage }}% < 80% · {% endif %}
{% if security_by_severity.critical > 0 %}{{ security_by_severity.critical }} critical · {% endif %}
{% if smells_by_severity.high > 0 %}{{ smells_by_severity.high }} high smells{% endif %}
{% endif %}
{% for metric in [
{'label': 'Test Coverage', 'value': test_coverage, 'detail': uncovered_count|string + ' uncovered'},
{'label': 'Documentation', 'value': doc_coverage, 'detail': ''},
{'label': 'Type Annotations', 'value': type_coverage, 'detail': ''}
] %}
{% set color = 'var(--accent)' if metric.value >= 60 else ('var(--warning)' if metric.value >= 30 else 'var(--danger)') %}
{{ metric.label }}
{% if metric.detail %}
{{ metric.detail }}
{% endif %}
{% endfor %}
{% for item in [
{'label': 'Critical', 'count': security_by_severity.critical, 'cls': 'critical'},
{'label': 'High', 'count': smells_by_severity.high + security_by_severity.high, 'cls': 'high'},
{'label': 'Medium', 'count': smells_by_severity.medium + security_by_severity.medium, 'cls': 'medium'},
{'label': 'Low', 'count': smells_by_severity.low + security_by_severity.get('low', 0), 'cls': 'low'}
] %}
{{ item.count }}
{{ item.label }}
{% endfor %}
{% if security %}
Security Findings
| Severity | Rule | File | Line | Message |
{% for f in security %}
| {{ f.severity }} |
{{ f.rule }} |
{{ f.file }} |
{{ f.line }} |
{{ f.message }} |
{% endfor %}
{% endif %}
{% if smells %}
Code Smells ({{ smells|length }})
{% set severities = ['high', 'medium', 'low'] %}
{% for sev in severities %}
{% set sev_smells = smells|selectattr('severity', 'equalto', sev)|list %}
{% if sev_smells %}
{{ sev }}
{{ sev_smells|length }} {{ sev }} severity smell{{ 's' if sev_smells|length != 1 }}
▾
{% for s in sev_smells %}
| {{ s.type }} |
{{ s.name }} |
{{ s.file }}:{{ s.line }} |
{{ s.message }} |
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if uncovered_symbols %}
Untested Symbols (top {{ uncovered_symbols|length }})
{% for sid in uncovered_symbols %}
{{ sid.split("::")[-1].split("#")[0] if "::" in sid else sid }}
{% endfor %}
{% endif %}