Fix 9 bugs: ODT covered-cells, CSV BOM, HTML charset, stderr, dead code
- #13 (critical): Add CoveredTableCell elements to ODT for valid row spans (ODF 1.2) - #28: Move "Total issues" info message from stdout to stderr (clean pipe output) - #27: Wrap HTML export in full document with DOCTYPE and meta charset utf-8 - #26: Save CSV with utf-8-sig encoding (UTF-8 BOM for Excel compatibility) - #31: Document CSV uses full project/version values (not display_* like console/MD) - #30: Fix ODT header formatting when author is empty (no leading dot/space) - #36: Remove test_cli_smoke_empty testing unreachable code path (return []) - #37: Remove unused mock_path variable in ODT test fixture - #34: Remove unreachable len(parts) != 2 check in parse_date_range Closes #13, #28, #27, #26, #31, #30, #36, #37, #34
This commit is contained in:
@@ -16,6 +16,12 @@ class HTMLFormatter(Formatter):
|
||||
projects = group_rows_by_project_and_version(rows)
|
||||
|
||||
lines = [
|
||||
"<!DOCTYPE html>",
|
||||
'<html lang="ru">',
|
||||
"<head>",
|
||||
' <meta charset="utf-8">',
|
||||
"</head>",
|
||||
"<body>",
|
||||
'<table border="1" cellpadding="6" cellspacing="0" style="border-collapse: collapse; font-family: Arial, sans-serif;">',
|
||||
" <thead>",
|
||||
" <tr>",
|
||||
@@ -69,6 +75,8 @@ class HTMLFormatter(Formatter):
|
||||
|
||||
lines.append(" </tbody>")
|
||||
lines.append("</table>")
|
||||
lines.append("</body>")
|
||||
lines.append("</html>")
|
||||
return "\n".join(lines)
|
||||
|
||||
def save(self, rows: List[ReportRow], output_path: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user