{% extends 'django_cotton_gallery/base.html' %} {% load i18n catalog_tags %} {% block title %}{% trans "Lint" %}{% endblock %} {% block content %}

{% trans "Annotation lint" %}

{% blocktranslate %}Cross-checks each component's @prop comments against its <c-vars> declaration. Errors mean the prop won't reach the template; warnings flag undocumented or under-documented props.{% endblocktranslate %}

{{ report.clean_components }} {% blocktranslate %}clean{% endblocktranslate %} {{ report.total_errors }} {% blocktranslate count counter=report.total_errors %}error{% plural %}errors{% endblocktranslate %} {{ report.total_warnings }} {% blocktranslate count counter=report.total_warnings %}warning{% plural %}warnings{% endblocktranslate %} {% if report.total_hints %} {{ report.total_hints }} {% blocktranslate count counter=report.total_hints %}hint{% plural %}hints{% endblocktranslate %} {% endif %}
{% if report.total_errors == 0 and report.total_warnings == 0 %}

{% trans "Every component is properly annotated." %}

{% else %}
{% comment %} Single state-aware toggle — flips between Expand / Collapse based on whether any visible section is currently open. {% endcomment %}
{# ─── Cards view (default) ─── #}
{% for c in report.components %} {% if not c.is_clean %}
{{ c.path }} {% if c.errors %}{{ c.errors|length }} {% blocktranslate count counter=c.errors|length %}err{% plural %}err{% endblocktranslate %}{% endif %} {% if c.warnings %}{{ c.warnings|length }} {% blocktranslate count counter=c.warnings|length %}warn{% plural %}warn{% endblocktranslate %}{% endif %} {% if c.hints %}{{ c.hints|length }} {% blocktranslate count counter=c.hints|length %}hint{% plural %}hints{% endblocktranslate %}{% endif %}
    {% for issue in c.issues %}
  • {% lint_message issue %} {% if issue.suggestion %} {% endif %} {% if issue.line %}L{{ issue.line }}{% endif %}
  • {% endfor %}
{% endif %} {% endfor %}
{% endif %} {% endblock %}