Skip to content

Commit b35f31a

Browse files
committed
More linting
1 parent 5c3b4cf commit b35f31a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.goreleaser.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ checksum:
3131
signs:
3232
- artifacts: checksum
3333
args:
34-
- "--batch"
35-
- "--local-user"
34+
- --batch
35+
- --local-user
3636
- "{{ .Env.GPG_FINGERPRINT }}"
37-
- "--output"
38-
- "${signature}"
39-
- "--detach-sign"
40-
- "${artifact}"
37+
- --output
38+
- ${signature}
39+
- --detach-sign
40+
- ${artifact}
4141
release:
4242
draft: true
4343
changelog:

tools/coverage-analyzer/json_coverage_to_html.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
import sys
33
from pathlib import Path
44

5+
56
def html_escape(text):
67
return (text or "").replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
78

9+
810
def render_schema(schema_name, schema):
911
html = f'<details><summary><b>{html_escape(schema_name)}</b> '
1012
html += f'({schema.get("covered_properties", 0)}/{schema.get("total_properties", 0)} couvertes)'
@@ -18,15 +20,17 @@ def render_schema(schema_name, schema):
1820
if schema.get("missing_properties"):
1921
html += '<li><b>Manquantes:</b> ' + ", ".join(html_escape(p) for p in schema["missing_properties"]) + '</li>'
2022
html += '</ul></details>\n'
23+
2124
return html
2225

26+
2327
def main():
2428
input_path = Path("coverage-report.json")
2529
output_path = Path("coverage-report.html")
2630
if not input_path.exists():
2731
print("coverage-report.json non trouvé.")
2832
sys.exit(1)
29-
with open(input_path, "r") as f:
33+
with open(input_path, "r", encoding="utf-8") as f:
3034
data = json.load(f)
3135

3236
html = [
@@ -47,7 +51,7 @@ def main():
4751
schema_analysis = data.get("schema_analysis", {})
4852
schema_details = schema_analysis.get("schema_details", {})
4953
html.append("<h2>Couverture des schémas</h2>")
50-
html.append(f"<p>Schémas couverts : {schema_analysis.get('covered_schemas',0)} / {schema_analysis.get('total_schemas',0)}</p>")
54+
html.append(f"<p>Schémas couverts : {schema_analysis.get('covered_schemas', 0)} / {schema_analysis.get('total_schemas',0)}</p>")
5155
html.append("<div>")
5256
for schema_name, schema in sorted(schema_details.items()):
5357
html.append(render_schema(schema_name, schema))
@@ -57,5 +61,6 @@ def main():
5761
output_path.write_text("\n".join(html), encoding="utf-8")
5862
print(f"Rapport HTML généré : {output_path}")
5963

64+
6065
if __name__ == "__main__":
61-
main()
66+
main()

0 commit comments

Comments
 (0)