From 1111d12ac541016eeaf5e53d20ea680c7810310f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Csord=C3=A1s?= Date: Thu, 6 Jan 2022 12:03:12 +0100 Subject: [PATCH] [html] Fix static HTML report files Previously `id` attribute was not set for source files when generated static HTML report files for example with the `CodeChecker parse` command. The JavaScript part used this attributes but it was always `undefined`. This way if a user opened a report which bug step referenced mulitple different source files, changing between the bug steps didn't change the source file. --- .../codechecker_report_converter/report/output/html/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/report-converter/codechecker_report_converter/report/output/html/html.py b/tools/report-converter/codechecker_report_converter/report/output/html/html.py index d2fabfc5d1..f896fbe932 100644 --- a/tools/report-converter/codechecker_report_converter/report/output/html/html.py +++ b/tools/report-converter/codechecker_report_converter/report/output/html/html.py @@ -170,7 +170,7 @@ def _add_source_file(self, file: File) -> FileSource: file_content = InvalidFileContentMsg self.files[file.id] = { - 'filePath': file.path, 'content': file_content} + 'id': file.id, 'filePath': file.path, 'content': file_content} return self.files[file.id]