Markdown-Checker 1.2.1__tar.gz → 1.2.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.
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/PKG-INFO +3 -4
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/README.md +2 -3
- markdown_checker-1.2.2/docs/api/index.rst +20 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/github-actions.rst +3 -32
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/index.rst +1 -2
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/report-formats.rst +1 -1
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/__init__.py +1 -1
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/cli.py +24 -9
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/conftest.py +1 -1
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_json.py +1 -1
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/test_cli.py +1 -1
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/LICENSE +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/CODE_OF_CONDUCT.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/CONTRIBUTING.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/checker.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/checks.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/cli.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/main.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/models.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/patterns.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/reports.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/api/utils.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/changes.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/conf.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/explanation/index.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/explanation/link-detection.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/explanation/url-checking.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/index.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/pyproject-config.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/rate-limits.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/report-formats.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/select-files.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/shell-completions.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/howto/skip-links.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/license.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/checks.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/cli.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/configuration.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/exit-codes.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/reference/index.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/docs/tutorial.rst +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/pyproject.toml +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checker.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/broken_paths.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/broken_urls.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/locale.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/tracking.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/models/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/models/base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/models/config.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/models/path.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/models/url.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/patterns.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/py.typed +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/model.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/registry.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/annotations.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/console.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/json.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/markdown.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/templates/paths/broken.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/templates/paths/tracking.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/templates/urls/broken.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/templates/urls/locale.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/templates/urls/tracking.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/writer.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/extract_links.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/github_env.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/list_files.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/pyproject_config.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/spinner.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/url_pipeline.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_broken_paths.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_broken_urls.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_checks.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_locale.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/checks/test_tracking.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/conftest.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/test_base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/test_config.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/test_models.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/test_path.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/models/test_url.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_annotations.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_console.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_markdown.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_renderers.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/test_base.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/test_model.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/test_registry.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/test_reports.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/test_writer.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/resources/sample1.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/resources/sample2.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/resources/sample3.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/resources/sample4.md +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/smoke/test_cli_smoke.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/test_checker.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/test_markdown_checker.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/test_patterns.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/__init__.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_extract_links.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_github_env.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_list_files.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_pyproject_config.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_spinner.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_url_pipeline.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/utils/test_utils.py +0 -0
- {markdown_checker-1.2.1 → markdown_checker-1.2.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-checker
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: A markdown link validation reporting tool.
|
|
5
5
|
Author-email: John Aziz <johnaziz269@gmail.com>
|
|
6
6
|
Maintainer-email: John Aziz <johnaziz269@gmail.com>
|
|
@@ -87,7 +87,7 @@ Run this tool within a GitHub workflow using the
|
|
|
87
87
|
GitHub Action, which posts the report as a pull request comment:
|
|
88
88
|
|
|
89
89
|
```yaml
|
|
90
|
-
- uses: john0isaac/action-check-markdown@v1.
|
|
90
|
+
- uses: john0isaac/action-check-markdown@v1.3.0
|
|
91
91
|
with:
|
|
92
92
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
93
93
|
command: check_broken_paths
|
|
@@ -96,8 +96,7 @@ GitHub Action, which posts the report as a pull request comment:
|
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
See the [GitHub Actions how-to](https://markdown-checker.readthedocs.io/en/latest/howto/github-actions/)
|
|
99
|
-
for the full workflow
|
|
100
|
-
supported by the wrapper action) directly as a step.
|
|
99
|
+
for the full workflow.
|
|
101
100
|
|
|
102
101
|
## Documentation
|
|
103
102
|
|
|
@@ -58,7 +58,7 @@ Run this tool within a GitHub workflow using the
|
|
|
58
58
|
GitHub Action, which posts the report as a pull request comment:
|
|
59
59
|
|
|
60
60
|
```yaml
|
|
61
|
-
- uses: john0isaac/action-check-markdown@v1.
|
|
61
|
+
- uses: john0isaac/action-check-markdown@v1.3.0
|
|
62
62
|
with:
|
|
63
63
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
64
64
|
command: check_broken_paths
|
|
@@ -67,8 +67,7 @@ GitHub Action, which posts the report as a pull request comment:
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
See the [GitHub Actions how-to](https://markdown-checker.readthedocs.io/en/latest/howto/github-actions/)
|
|
70
|
-
for the full workflow
|
|
71
|
-
supported by the wrapper action) directly as a step.
|
|
70
|
+
for the full workflow.
|
|
72
71
|
|
|
73
72
|
## Documentation
|
|
74
73
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
API Reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
If you are looking for information on a specific function, class or
|
|
5
|
+
method, this part of the documentation is for you. These pages are
|
|
6
|
+
generated from the docstrings in ``markdown_checker`` and are meant for
|
|
7
|
+
programmatic/library use. For the command-line interface, see
|
|
8
|
+
:doc:`../reference/cli` instead.
|
|
9
|
+
|
|
10
|
+
.. toctree::
|
|
11
|
+
:maxdepth: 1
|
|
12
|
+
|
|
13
|
+
main
|
|
14
|
+
checker
|
|
15
|
+
cli
|
|
16
|
+
models
|
|
17
|
+
checks
|
|
18
|
+
patterns
|
|
19
|
+
reports
|
|
20
|
+
utils
|
|
@@ -35,48 +35,19 @@ replacing ``guide-url`` with the URL of your own contribution guide:
|
|
|
35
35
|
contents: read
|
|
36
36
|
steps:
|
|
37
37
|
- uses: actions/checkout@v7
|
|
38
|
-
- uses: john0isaac/action-check-markdown@v1.
|
|
38
|
+
- uses: john0isaac/action-check-markdown@v1.3.0
|
|
39
39
|
with:
|
|
40
40
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
41
|
command: check_broken_paths
|
|
42
42
|
directory: ./
|
|
43
43
|
guide-url: "https://github.com/<owner>/<repo>/blob/main/CONTRIBUTING.md"
|
|
44
44
|
|
|
45
|
-
The ``command`` input selects which check to run
|
|
45
|
+
The ``command`` input selects which check to run it
|
|
46
46
|
supports ``check_broken_paths``, ``check_paths_tracking``,
|
|
47
|
-
``check_urls_tracking``, and ``check_urls_locale``
|
|
47
|
+
``check_urls_tracking``, and ``check_urls_locale``
|
|
48
48
|
``check_broken_urls``. Add a separate job (or step) per command if you want
|
|
49
49
|
to run more than one check in the same workflow.
|
|
50
50
|
|
|
51
|
-
Run ``check_broken_urls`` directly (no wrapper action)
|
|
52
|
-
------------------------------------------------------------
|
|
53
|
-
|
|
54
|
-
Since the wrapper action doesn't support URL checking yet, install and
|
|
55
|
-
invoke markdown-checker directly as a workflow step instead. Use
|
|
56
|
-
``--report-format github-annotations`` so failures show up as inline
|
|
57
|
-
annotations on the PR diff, the same way the action's output does:
|
|
58
|
-
|
|
59
|
-
.. code-block:: yaml
|
|
60
|
-
|
|
61
|
-
jobs:
|
|
62
|
-
check-broken-urls:
|
|
63
|
-
runs-on: ubuntu-latest
|
|
64
|
-
permissions:
|
|
65
|
-
contents: read
|
|
66
|
-
steps:
|
|
67
|
-
- uses: actions/checkout@v7
|
|
68
|
-
- uses: actions/setup-python@v6
|
|
69
|
-
with:
|
|
70
|
-
python-version: "3.11"
|
|
71
|
-
- run: pip install markdown-checker
|
|
72
|
-
- run: >
|
|
73
|
-
markdown-checker . -f check_broken_urls
|
|
74
|
-
-rf github-annotations -o -
|
|
75
|
-
|
|
76
|
-
Because ``$CI=true`` is set automatically in GitHub Actions, warnings
|
|
77
|
-
(rate-limited/unverifiable links) are emitted as ``::warning`` annotations
|
|
78
|
-
rather than failing the job; only broken links (an error-level issue) fail it.
|
|
79
|
-
|
|
80
51
|
Verify it worked
|
|
81
52
|
------------------
|
|
82
53
|
|
|
@@ -46,7 +46,7 @@ A structured document including both errors and warnings:
|
|
|
46
46
|
.. code-block:: json
|
|
47
47
|
|
|
48
48
|
{
|
|
49
|
-
"tool": {"name": "markdown-checker", "version": "1.2.
|
|
49
|
+
"tool": {"name": "markdown-checker", "version": "1.2.2"},
|
|
50
50
|
"check": "check_broken_urls",
|
|
51
51
|
"summary": {
|
|
52
52
|
"files_checked": 10,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import platform
|
|
5
|
+
import sys
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
from typing import Any
|
|
7
8
|
|
|
@@ -38,6 +39,23 @@ class PyprojectCommand(click.Command):
|
|
|
38
39
|
return super().make_context(info_name, args, parent, **extra)
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
def _echo_safe(message: str, *, fg: str | None = None, err: bool = False) -> None:
|
|
43
|
+
"""Echo a (optionally styled) message, dropping characters the output stream can't encode.
|
|
44
|
+
|
|
45
|
+
On Windows, piping stdout/stderr to another process (e.g. ``| grep``) can make Python
|
|
46
|
+
fall back to a legacy code page (e.g. cp1252) that can't represent emoji. Retry without
|
|
47
|
+
those characters instead of crashing the whole command.
|
|
48
|
+
"""
|
|
49
|
+
styled = click.style(message, fg=fg) if fg else message
|
|
50
|
+
try:
|
|
51
|
+
click.echo(styled, err=err)
|
|
52
|
+
except UnicodeEncodeError:
|
|
53
|
+
stream = sys.stderr if err else sys.stdout
|
|
54
|
+
encoding = getattr(stream, "encoding", None) or "ascii"
|
|
55
|
+
safe_message = styled.encode(encoding, errors="ignore").decode(encoding)
|
|
56
|
+
click.echo(safe_message, err=err)
|
|
57
|
+
|
|
58
|
+
|
|
41
59
|
class ListOfStrings(click.Option):
|
|
42
60
|
"""
|
|
43
61
|
Helper class to parse a comma-separated list of strings from the command line.
|
|
@@ -309,9 +327,9 @@ def main(
|
|
|
309
327
|
progress_callback=lambda: bar.update(1),
|
|
310
328
|
)
|
|
311
329
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
330
|
+
_echo_safe(
|
|
331
|
+
f"\n🔍 Checked {check_result.links_checked} links in {len(files_paths)} files.",
|
|
332
|
+
fg="blue",
|
|
315
333
|
)
|
|
316
334
|
|
|
317
335
|
if check_result.issues:
|
|
@@ -328,13 +346,10 @@ def main(
|
|
|
328
346
|
renderer = get_renderer(report_format)
|
|
329
347
|
out_path = None if output_file_name == "-" else Path(f"{output_file_name}{renderer.file_extension}")
|
|
330
348
|
write_report(renderer.render(report), output_path=out_path)
|
|
331
|
-
|
|
349
|
+
_echo_safe(f"😭 Found {report.error_count} issues in the following files:", fg="red", err=True)
|
|
332
350
|
|
|
333
351
|
if report.has_warnings:
|
|
334
|
-
|
|
335
|
-
click.style(f"⚠ {report.warning_count} links had warnings:", fg="yellow"),
|
|
336
|
-
err=True,
|
|
337
|
-
)
|
|
352
|
+
_echo_safe(f"⚠ {report.warning_count} links had warnings:", fg="yellow", err=True)
|
|
338
353
|
|
|
339
354
|
terminal_renderer = GitHubAnnotationsRenderer() if config.output_mode == "ci" else ConsoleRenderer()
|
|
340
355
|
for message, level in terminal_renderer.render_lines(report):
|
|
@@ -342,5 +357,5 @@ def main(
|
|
|
342
357
|
|
|
343
358
|
ctx.exit(1 if report.has_errors else 0)
|
|
344
359
|
|
|
345
|
-
|
|
360
|
+
_echo_safe("All files are compliant with the guidelines. 🎉", fg="green")
|
|
346
361
|
ctx.exit(0)
|
|
@@ -32,5 +32,5 @@ def sample_report():
|
|
|
32
32
|
),
|
|
33
33
|
),
|
|
34
34
|
)
|
|
35
|
-
context = ReportContext(check_name="check_broken_urls", tool_version="1.2.
|
|
35
|
+
context = ReportContext(check_name="check_broken_urls", tool_version="1.2.2")
|
|
36
36
|
return Report(context=context, files=(file_report,), links_checked=2, files_checked=1)
|
|
@@ -16,7 +16,7 @@ def test_json_renderer_produces_valid_json(sample_report):
|
|
|
16
16
|
def test_json_renderer_includes_tool_version(sample_report):
|
|
17
17
|
"""JsonRenderer includes tool metadata from the report context."""
|
|
18
18
|
data = json.loads(JsonRenderer().render(sample_report))
|
|
19
|
-
assert data["tool"]["version"] == "1.2.
|
|
19
|
+
assert data["tool"]["version"] == "1.2.2"
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def test_json_renderer_respects_custom_indent(sample_report):
|
|
@@ -138,7 +138,7 @@ def test_cli_version(runner):
|
|
|
138
138
|
"""Displays version information."""
|
|
139
139
|
result = runner.invoke(main, ["--version"])
|
|
140
140
|
assert result.exit_code == 0
|
|
141
|
-
assert "1.2.
|
|
141
|
+
assert "1.2.2" in result.output
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
def test_cli_ci_mode(runner, resources_dir, monkeypatch, tmp_path):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/broken_paths.py
RENAMED
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/checks/broken_urls.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/console.py
RENAMED
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/json.py
RENAMED
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/reports/renderers/markdown.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/extract_links.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/pyproject_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/src/markdown_checker/utils/url_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{markdown_checker-1.2.1 → markdown_checker-1.2.2}/tests/reports/renderers/test_annotations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|