deprecated-warnings.html 2.76 KB
Newer Older
1
2
3
4
5
<!doctype html>
<html>
    <head>
        <title>Collected deprecated warnings</title>
        <link href="css/style.css" rel="stylesheet" type="text/css">
6
7
8
        <style>
        {{ pygment_css }}
        </style>
9
10
11
12
13
    </head>
    <body>
        <h1>Collected deprecated warnings</h1>

        {% for warning_name, warning_data in warnings %}
14
        <h3>Warning: "{{ warning_name }}"</h4>
15

16
17
18
19
20
21
22
23
24
25
        <p>Number of occurences: {{ warning_data["count"] }}</p>

        {% if "full_warning" in warning_data %}
        <p>Structured data:</p>
        <ul>
            <li>kind: {{ warning_data["full_warning"]["kind"].split(".")[1].lower() }}</li>
            <li>operation: {{ warning_data["full_warning"]["operation"].split(".")[1].lower() }}</li>
            {% for key, value in warning_data["full_warning"].items() %}
            {% if key not in ("kind", "path", "args", "category", "count", "file_content",
                              "filename", "lineno", "reason", "test_file", "test_lineno",
26
                              "test_name", "operation", "dependencies") %}
27
28
29
30
31
            <li>{{ key }}: {{ value }}</li>
            {% endif %}
            {% endfor %}
        </ul>
        {% endif %}
32
33
34
35
36
37
38
39
40
41
42
43

        {% for path, lineno, file_content in warning_data["path"] %}
        <h5>In {{ path }} line {{ lineno }}</h5>
        {% if path in files_to_url %}
        <p>
        <a href="{{ files_to_url[path] }}#L{{ lineno }}" target="_blank">
            File on branch/default
        </a>
        </p>
        {% endif %}

        {% if file_content %}
44
        {{ highlight_code(file_content, lineno) }}
45
46
        {% endif %}

47
48
49
50
        {% endfor %}

        From those projects:
        <ul>
51
52
53
54
55
56
57
58
59
60
61
        {% for project, project_data in warning_data["projects"].items() %}
        <li>
            <a target="_blank" href="{{ project.web_url }}">{{ project.name }}</a>: {{ project_data["count"] }}
            (
            {%- for i in ("Cubicweb", "Yams", "RQL", "logilab-common", "logilab-database") -%}
            {%- if i.lower() in project_data["dependencies"] -%}
            <i>{{ i }}</i> {{ project_data["dependencies"][i.lower()] }}
            {%- if not loop.last %}, {% endif -%}
            {%- endif -%}
            {%- endfor -%}
            )
62
63
64
65
66
            {% if "full_warning" in project_data %}
            <ul>
                From at least this test: {{ project_data["full_warning"]["test_name"] }} (<a href="{{ project.web_url }}/-/blob/branch/default/{{ project_data["full_warning"]["test_file"] }}#L{{ project_data["full_warning"]["test_lineno"] + 1 }}" target="_blank">{{ project_data["full_warning"]["test_file"] }}:{{ project_data["full_warning"]["test_lineno"] + 1 }}</a>)
            </ul>
            {% endif %}
67
        </li>
68
69
70
71
72
73
74
        {% endfor %}
        </ul>


        {% endfor %}
    </body>
</html>