deprecated-warnings.html 3.41 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
15
16
        {% if not loop.first %}
        <hr>
        {% endif %}
17
        <h3>Warning: "{{ warning_name }}"</h4>
18

19
        <p>Total number of occurences: {{ warning_data["count"] }}</p>
20
21
22
23
24
25
26
27
28

        {% 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",
29
30
                              "test_name", "operation", "dependencies", "traceback",
                              "formatted_traceback") %}
31
32
33
34
35
            <li>{{ key }}: {{ value }}</li>
            {% endif %}
            {% endfor %}
        </ul>
        {% endif %}
36

37
38
            {% for project, project_data in warning_data["projects"].items() %}
            <h4>Project <a target="_blank" href="{{ project.web_url }}">{{ project.name }}</a> ({{ project_data["count"] }} occurences)</h4>
39

40
            <p>Dependencies (detected during tests execution):</p>
41

42
43
44
45
46
47
48
            <ul>
                {%- for i in ("Cubicweb", "Yams", "RQL", "logilab-common", "logilab-database") -%}
                {%- if i.lower() in project_data["dependencies"] -%}
                <li><i>{{ i }}</i> {{ project_data["dependencies"][i.lower()] }}</li>
                {%- endif -%}
                {%- endfor -%}
            </ul>
49

50
51
52
            {% with warning_id=loop.index %}
                {% for (path, lineno), warning in project_data["warnings"].items() %}
                <p>
53

54
55
56
57
58
59
60
61
62
63
                {% with %}
                {% set traceback_id = str(warning_id) + "_" + str(project.id) + "_" + path.replace("/", "_") + "_" + str(lineno) %}

                {{- render_traceback(traceback_id, warning["traceback"], warning_name, project.id) or "" -}}

                {% if "file_content" in warning %}
                {% set file_uri_path = str(project.id) + "_" + path.replace("/", "_") %}
                {{- render_source_code_file(warning["file_content"], file_uri_path, path, warning["lineno"]) or "" -}}
                In <a href="file/{{ file_uri_path }}.html#{{ warning["lineno"] }}">{{ path }}</a> line {{ lineno }} (<a href="traceback/{{ traceback_id }}.html">full traceback</a>)
                {% else %}
64
                In <u>{{ path }}</u> line {{ lineno }} (<a href="traceback/{{ traceback_id }}.html">full traceback</a>)
65
66
                {% endif %}

67
                {% endwith %}
68

69
70
71
72
73
74
                {% if path in files_to_url %}(<a href="{{ files_to_url[path] }}#L{{ lineno }}" target="_blank">file on branch/default</a>){% endif %}
                </p>

                {% if "file_content" in warning %}
                {{ highlight_code(warning["file_content"], lineno) }}
                {% endif %}
75

76
77
                {% endfor %}
            {% endwith %}
78
79
        {% endfor %}

80
81
82
83

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