pre-commit-html 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/PKG-INFO +1 -1
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/__init__.py +17 -16
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/__main__.py +4 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pyproject.toml +3 -1
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/LICENSE +0 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/README.md +0 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/nothing +0 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/code_error.jinja +0 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/code_part.jinja +0 -0
- {pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/html_content.jinja +0 -0
@@ -56,24 +56,25 @@ class PreCommitParser:
|
|
56
56
|
if "\\" in line and ":" in line and len(code_part) == 0:
|
57
57
|
h3_file = line.replace("\\", "/")
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
(
|
69
|
-
|
70
|
-
|
59
|
+
if len(h3_file.split(":")) == 4:
|
60
|
+
path_code_file = h3_file.split(":")[0]
|
61
|
+
line_code = h3_file.split(":")[1]
|
62
|
+
column_code = h3_file.split(":")[2]
|
63
|
+
message = h3_file.split(":")[3]
|
64
|
+
|
65
|
+
ruff_ref = message.split(" ")[1]
|
66
|
+
|
67
|
+
code_error.append(
|
68
|
+
"".join(
|
69
|
+
(
|
70
|
+
f'<h3>File: <a href="./{path_code_file}:{line_code}:',
|
71
|
+
f'{column_code}">{path_code_file}:{line_code}:{column_code}</a></h3>',
|
72
|
+
)
|
71
73
|
)
|
72
74
|
)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
)
|
75
|
+
code_error.append(
|
76
|
+
f'<p>Error: <a href="https://docs.astral.sh/ruff/rules/#{ruff_ref}">{ruff_ref}</a>{message}</p>'
|
77
|
+
)
|
77
78
|
|
78
79
|
elif "\\" in line and ":" in line and len(code_part) > 0:
|
79
80
|
h3_file = line.replace("\\", "/")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "pre_commit_html"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.2"
|
4
4
|
description = "Format results from pre-commit cmd to HTML file"
|
5
5
|
authors = [{ name = "Robotz213", email = "nicholas@robotz.dev" }]
|
6
6
|
readme = "README.md"
|
@@ -8,6 +8,8 @@ license = "MIT"
|
|
8
8
|
requires-python = ">=3.13"
|
9
9
|
dependencies = ["pre-commit (>=4.1.0,<5.0.0)", "jinja2 (>=3.1.5,<4.0.0)"]
|
10
10
|
|
11
|
+
[tool.poetry.scripts]
|
12
|
+
pre_commit_html = "pre_commit_html:__main__"
|
11
13
|
|
12
14
|
[build-system]
|
13
15
|
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
File without changes
|
File without changes
|
File without changes
|
{pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/code_error.jinja
RENAMED
File without changes
|
{pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/code_part.jinja
RENAMED
File without changes
|
{pre_commit_html-0.1.1 → pre_commit_html-0.1.2}/pre_commit_html/site/templates/html_content.jinja
RENAMED
File without changes
|