Markdown-Checker 1.0.2__tar.gz → 1.0.3__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.
Files changed (85) hide show
  1. {markdown_checker-1.0.2/src/markdown_checker.egg-info → markdown_checker-1.0.3}/PKG-INFO +13 -47
  2. markdown_checker-1.0.3/docs/CODE_OF_CONDUCT.rst +138 -0
  3. markdown_checker-1.0.3/docs/CONTRIBUTING.rst +60 -0
  4. markdown_checker-1.0.3/docs/advanced.rst +388 -0
  5. markdown_checker-1.0.3/docs/api/checker.rst +7 -0
  6. markdown_checker-1.0.3/docs/api/checks.rst +42 -0
  7. markdown_checker-1.0.3/docs/api/cli.rst +7 -0
  8. markdown_checker-1.0.3/docs/api/main.rst +6 -0
  9. markdown_checker-1.0.3/docs/api/models.rst +26 -0
  10. markdown_checker-1.0.3/docs/api/reports.rst +26 -0
  11. markdown_checker-1.0.3/docs/api/utils.rst +26 -0
  12. markdown_checker-1.0.3/docs/automate.rst +9 -0
  13. markdown_checker-1.0.3/docs/changes.rst +4 -0
  14. markdown_checker-1.0.3/docs/conf.py +56 -0
  15. markdown_checker-1.0.3/docs/index.rst +71 -0
  16. markdown_checker-1.0.3/docs/license.rst +5 -0
  17. markdown_checker-1.0.3/docs/usage.rst +73 -0
  18. markdown_checker-1.0.3/pyproject.toml +217 -0
  19. markdown_checker-1.0.3/src/markdown_checker/__init__.py +13 -0
  20. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checker.py +4 -2
  21. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checks/__init__.py +4 -2
  22. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checks/base.py +10 -4
  23. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checks/broken_paths.py +5 -4
  24. markdown_checker-1.0.3/src/markdown_checker/checks/broken_urls.py +86 -0
  25. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checks/locale.py +5 -4
  26. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/checks/tracking.py +9 -7
  27. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/cli.py +70 -30
  28. markdown_checker-1.0.3/src/markdown_checker/models/__init__.py +17 -0
  29. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/models/base.py +2 -0
  30. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/models/config.py +8 -5
  31. markdown_checker-1.0.3/src/markdown_checker/models/url.py +155 -0
  32. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/__init__.py +2 -1
  33. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/base.py +2 -1
  34. markdown_checker-1.0.3/src/markdown_checker/utils/__init__.py +13 -0
  35. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/utils/spinner.py +2 -1
  36. markdown_checker-1.0.3/tests/conftest.py +106 -0
  37. markdown_checker-1.0.3/tests/resources/sample1.md +17 -0
  38. markdown_checker-1.0.3/tests/resources/sample2.md +17 -0
  39. markdown_checker-1.0.3/tests/resources/sample3.md +17 -0
  40. markdown_checker-1.0.3/tests/resources/sample4.md +17 -0
  41. markdown_checker-1.0.3/tests/smoke/test_cli_smoke.py +81 -0
  42. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_checker.py +2 -1
  43. markdown_checker-1.0.3/tests/test_checks_broken_urls.py +229 -0
  44. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_checks_locale.py +2 -1
  45. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_checks_tracking.py +2 -1
  46. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_cli.py +90 -2
  47. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_models_base.py +12 -0
  48. markdown_checker-1.0.3/tests/test_models_url.py +362 -0
  49. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_utils_extract_links.py +2 -1
  50. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_utils_spinner.py +2 -1
  51. markdown_checker-1.0.3/uv.lock +1759 -0
  52. markdown_checker-1.0.2/PKG-INFO +0 -162
  53. markdown_checker-1.0.2/pyproject.toml +0 -93
  54. markdown_checker-1.0.2/setup.cfg +0 -4
  55. markdown_checker-1.0.2/src/markdown_checker/__init__.py +0 -10
  56. markdown_checker-1.0.2/src/markdown_checker/checks/broken_urls.py +0 -67
  57. markdown_checker-1.0.2/src/markdown_checker/models/__init__.py +0 -6
  58. markdown_checker-1.0.2/src/markdown_checker/models/url.py +0 -64
  59. markdown_checker-1.0.2/src/markdown_checker/utils/__init__.py +0 -11
  60. markdown_checker-1.0.2/src/markdown_checker.egg-info/SOURCES.txt +0 -52
  61. markdown_checker-1.0.2/src/markdown_checker.egg-info/dependency_links.txt +0 -1
  62. markdown_checker-1.0.2/src/markdown_checker.egg-info/entry_points.txt +0 -2
  63. markdown_checker-1.0.2/src/markdown_checker.egg-info/requires.txt +0 -19
  64. markdown_checker-1.0.2/src/markdown_checker.egg-info/top_level.txt +0 -1
  65. markdown_checker-1.0.2/tests/test_checks_broken_urls.py +0 -109
  66. markdown_checker-1.0.2/tests/test_models_url.py +0 -124
  67. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/LICENSE +0 -0
  68. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/README.md +0 -0
  69. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/models/path.py +0 -0
  70. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/py.typed +0 -0
  71. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/format_output.py +0 -0
  72. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/markdown.py +0 -0
  73. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/templates/paths/broken.md +0 -0
  74. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/templates/paths/tracking.md +0 -0
  75. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/templates/urls/broken.md +0 -0
  76. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/templates/urls/locale.md +0 -0
  77. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/reports/templates/urls/tracking.md +0 -0
  78. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/utils/extract_links.py +0 -0
  79. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/src/markdown_checker/utils/list_files.py +0 -0
  80. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_checks_broken_paths.py +0 -0
  81. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_checks_registry.py +0 -0
  82. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_models_path.py +0 -0
  83. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_reports.py +0 -0
  84. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_utils_format_output.py +0 -0
  85. {markdown_checker-1.0.2 → markdown_checker-1.0.3}/tests/test_utils_list_files.py +0 -0
@@ -1,39 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-checker
3
- Version: 1.0.2
3
+ Version: 1.0.3
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>
7
- License: MIT License
8
-
9
- Copyright (c) 2023 John Aziz
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
29
- Project-URL: Homepage, https://github.com/john0isaac/markdown-checker
30
- Project-URL: Documentation, https://markdown-checker.readthedocs.io/en/latest/
31
- Project-URL: Issues, https://github.com/john0isaac/markdown-checker/issues
32
- Project-URL: Contributing, https://github.com/john0isaac/markdown-checker/pulls
33
- Project-URL: Releases, https://github.com/john0isaac/markdown-checker/releases
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-Expression: MIT
34
10
  Classifier: Development Status :: 5 - Production/Stable
35
11
  Classifier: Environment :: Console
36
- Classifier: License :: OSI Approved :: MIT License
37
12
  Classifier: Operating System :: OS Independent
38
13
  Classifier: Programming Language :: Python
39
14
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -41,27 +16,17 @@ Classifier: Programming Language :: Python :: 3.10
41
16
  Classifier: Programming Language :: Python :: 3.11
42
17
  Classifier: Programming Language :: Python :: 3.12
43
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Typing :: Typed
44
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
45
21
  Classifier: Topic :: Software Development :: Quality Assurance
46
- Requires-Python: >=3.10
47
- Description-Content-Type: text/markdown
48
22
  License-File: LICENSE
49
- Requires-Dist: click>=8.3.3
50
- Requires-Dist: httpx>=0.28.1
51
- Provides-Extra: dev
52
- Requires-Dist: pre-commit; extra == "dev"
53
- Requires-Dist: mypy; extra == "dev"
54
- Provides-Extra: lint
55
- Requires-Dist: ruff; extra == "lint"
56
- Provides-Extra: test
57
- Requires-Dist: pytest; extra == "test"
58
- Requires-Dist: pytest-cov; extra == "test"
59
- Provides-Extra: docs
60
- Requires-Dist: mkdocs; extra == "docs"
61
- Requires-Dist: mkdocs-material; extra == "docs"
62
- Requires-Dist: mkdocstrings[python]; extra == "docs"
63
- Requires-Dist: pymdown-extensions; extra == "docs"
64
- Dynamic: license-file
23
+ Requires-Dist: click>=8.3.1
24
+ Requires-Dist: httpx2>=2.0.0
25
+ Project-URL: Contributing, https://github.com/john0isaac/markdown-checker/pulls
26
+ Project-URL: Documentation, https://markdown-checker.readthedocs.io/en/latest/
27
+ Project-URL: Homepage, https://github.com/john0isaac/markdown-checker
28
+ Project-URL: Issues, https://github.com/john0isaac/markdown-checker/issues
29
+ Project-URL: Releases, https://github.com/john0isaac/markdown-checker/releases
65
30
 
66
31
  [![PyPi](https://img.shields.io/pypi/v/markdown-checker)](https://pypi.org/project/markdown-checker/)
67
32
  [![Documentation Status](https://readthedocs.org/projects/markdown-checker/badge/?version=latest)](https://markdown-checker.readthedocs.io/en/latest/?badge=latest)
@@ -160,3 +125,4 @@ Example:
160
125
  ```bash
161
126
  markdown-checker -d . -f check_urls_tracking -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md
162
127
  ```
128
+
@@ -0,0 +1,138 @@
1
+ Contributor Covenant Code of Conduct
2
+ ====================================
3
+
4
+ Our Pledge
5
+ ----------
6
+
7
+ We as members, contributors, and leaders pledge to make participation in our
8
+ community a harassment-free experience for everyone, regardless of age, body
9
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
10
+ identity and expression, level of experience, education, socio-economic status,
11
+ nationality, personal appearance, race, religion, or sexual identity and
12
+ orientation.
13
+
14
+ We pledge to act and interact in ways that contribute to an open, welcoming,
15
+ diverse, inclusive, and healthy community.
16
+
17
+ Our Standards
18
+ -------------
19
+
20
+ Examples of behavior that contributes to a positive environment for our
21
+ community include:
22
+
23
+ * Demonstrating empathy and kindness toward other people
24
+ * Being respectful of differing opinions, viewpoints, and experiences
25
+ * Giving and gracefully accepting constructive feedback
26
+ * Accepting responsibility and apologizing to those affected by our mistakes,
27
+ and learning from the experience
28
+ * Focusing on what is best not just for us as individuals, but for the overall
29
+ community
30
+
31
+ Examples of unacceptable behavior include:
32
+
33
+ * The use of sexualized language or imagery, and sexual attention or advances
34
+ of any kind
35
+ * Trolling, insulting or derogatory comments, and personal or political attacks
36
+ * Public or private harassment
37
+ * Publishing others' private information, such as a physical or email address,
38
+ without their explicit permission
39
+ * Other conduct which could reasonably be considered inappropriate in a
40
+ professional setting
41
+
42
+ Enforcement Responsibilities
43
+ ----------------------------
44
+
45
+ Community leaders are responsible for clarifying and enforcing our standards of
46
+ acceptable behavior and will take appropriate and fair corrective action in
47
+ response to any behavior that they deem inappropriate, threatening, offensive,
48
+ or harmful.
49
+
50
+ Community leaders have the right and responsibility to remove, edit, or reject
51
+ comments, commits, code, wiki edits, issues, and other contributions that are
52
+ not aligned to this Code of Conduct, and will communicate reasons for
53
+ moderation decisions when appropriate.
54
+
55
+ Scope
56
+ -----
57
+
58
+ This Code of Conduct applies within all community spaces, and also applies when
59
+ an individual is officially representing the community in public spaces.
60
+ Examples of representing our community include using an official e-mail
61
+ address, posting via an official social media account, or acting as an
62
+ appointed representative at an online or offline event.
63
+
64
+ Enforcement
65
+ -----------
66
+
67
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
68
+ reported to the community leaders responsible for enforcement at
69
+ johnaziz269@gmail.com. All complaints will be reviewed and investigated
70
+ promptly and fairly.
71
+
72
+ All community leaders are obligated to respect the privacy and security of the
73
+ reporter of any incident.
74
+
75
+ Enforcement Guidelines
76
+ ----------------------
77
+
78
+ Community leaders will follow these Community Impact Guidelines in determining
79
+ the consequences for any action they deem in violation of this Code of Conduct.
80
+
81
+ 1. Correction
82
+ ~~~~~~~~~~~~~
83
+
84
+ **Community Impact:** Use of inappropriate language or other behavior deemed
85
+ unprofessional or unwelcome in the community.
86
+
87
+ **Consequence:** A private, written warning from community leaders, providing
88
+ clarity around the nature of the violation and an explanation of why the
89
+ behavior was inappropriate. A public apology may be requested.
90
+
91
+ 2. Warning
92
+ ~~~~~~~~~~
93
+
94
+ **Community Impact:** A violation through a single incident or series of
95
+ actions.
96
+
97
+ **Consequence:** A warning with consequences for continued behavior. No
98
+ interaction with the people involved, including unsolicited interaction with
99
+ those enforcing the Code of Conduct, for a specified period of time. This
100
+ includes avoiding interactions in community spaces as well as external channels
101
+ like social media. Violating these terms may lead to a temporary or permanent
102
+ ban.
103
+
104
+ 3. Temporary Ban
105
+ ~~~~~~~~~~~~~~~~
106
+
107
+ **Community Impact:** A serious violation of community standards, including
108
+ sustained inappropriate behavior.
109
+
110
+ **Consequence:** A temporary ban from any sort of interaction or public
111
+ communication with the community for a specified period of time. No public or
112
+ private interaction with the people involved, including unsolicited
113
+ interaction with those enforcing the Code of Conduct, is allowed during this
114
+ period. Violating these terms may lead to a permanent ban.
115
+
116
+ 4. Permanent Ban
117
+ ~~~~~~~~~~~~~~~~
118
+
119
+ **Community Impact:** Demonstrating a pattern of violation of community
120
+ standards, including sustained inappropriate behavior, harassment of an
121
+ individual, or aggression toward or disparagement of classes of individuals.
122
+
123
+ **Consequence:** A permanent ban from any sort of public interaction within the
124
+ community.
125
+
126
+ Attribution
127
+ -----------
128
+
129
+ This Code of Conduct is adapted from the
130
+ `Contributor Covenant <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>`_,
131
+ version 2.0.
132
+
133
+ Community Impact Guidelines were inspired by the
134
+ `Mozilla code of conduct enforcement ladder <https://github.com/mozilla/diversity>`_.
135
+
136
+ For answers to common questions about this code of conduct, see the
137
+ `FAQ <https://www.contributor-covenant.org/faq>`_. Translations are available
138
+ at `https://www.contributor-covenant.org/translations <https://www.contributor-covenant.org/translations>`_.
@@ -0,0 +1,60 @@
1
+ Contribution
2
+ ============
3
+
4
+ How to `contribute to the project <https://docs.github.com/en/get-started/quickstart/contributing-to-projects>`_?
5
+
6
+ While contributing, each contributor should keep the
7
+ :doc:`Code of Conduct <CODE_OF_CONDUCT>` in mind.
8
+
9
+ This repository is open for everyone to contribute and is maintained by
10
+ `John Aziz <https://github.com/john0isaac>`_.
11
+
12
+ Develop Locally
13
+ ---------------
14
+
15
+ Install all dependencies and the package in editable mode:
16
+
17
+ .. code-block:: shell
18
+
19
+ uv sync
20
+
21
+ Activate the virtual environment:
22
+
23
+ .. code-block:: shell
24
+
25
+ source .venv/bin/activate
26
+
27
+ Any changes you make to the source will take effect immediately.
28
+
29
+ First Steps
30
+ -----------
31
+
32
+ These are the most common commands you will use:
33
+
34
+ - ``pytest``: Run the unit tests.
35
+ - ``mypy``: Run the type checker.
36
+ - ``ruff``: Run the linter and formatter tools.
37
+ - ``tox run -e docs``: Build the documentation.
38
+
39
+ These are some more specific commands if you need them:
40
+
41
+ - ``tox parallel``: Run all test environments that will be run in CI, in
42
+ parallel. Python versions that are not installed are skipped.
43
+ - ``pre-commit``: Run the linter and formatter tools. Only staged files are
44
+ checked, and this runs automatically before each commit.
45
+ - ``pre-commit run --all-files``: Run the pre-commit hooks against all files,
46
+ including unchanged and unstaged files.
47
+ - ``tox run -e py3.11``: Run unit tests with a specific Python version. The
48
+ version must be installed.
49
+ - ``tox run -e style``: Run all pre-commit hooks on all files via tox.
50
+ - ``tox run -e typing``: Run all typing checks.
51
+ - ``tox run -e docs``: Build the documentation in strict mode.
52
+ - ``tox run -e docs-auto``: Serve the documentation locally with auto-reload.
53
+ - ``tox run -e update-actions``: Update GitHub Actions pins.
54
+ - ``tox run -e update-pre_commit``: Update pre-commit hook pins.
55
+ - ``tox run -e update-requirements``: Update the ``uv.lock`` file.
56
+
57
+ .. tip::
58
+
59
+ ``tox run`` and ``tox parallel`` can be shortened to ``tox r`` and
60
+ ``tox p``.
@@ -0,0 +1,388 @@
1
+ Advanced Usage
2
+ ==============
3
+
4
+ To further customize your experience with Markdown Checker, you can use
5
+ additional command-line interface options.
6
+
7
+ .. contents:: On this page
8
+ :local:
9
+
10
+ Working with List Parameters
11
+ ----------------------------
12
+
13
+ Several CLI options accept lists of values, including ``--skip-domains``,
14
+ ``--skip-files``, ``--extensions``, ``--tracking-domains``, and
15
+ ``--skip-urls-containing``.
16
+
17
+ How to provide multiple values
18
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
+
20
+ Use comma-separated values without spaces:
21
+
22
+ .. code-block:: bash
23
+
24
+ markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com
25
+
26
+ Important formatting rules
27
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
28
+
29
+ - Values must be separated by commas with no spaces.
30
+ - Do not use square brackets.
31
+ - Do not add spaces after commas.
32
+ - Quotes are optional but not required.
33
+
34
+ Examples of correct and incorrect usage
35
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
+
37
+ - Wrong: ``--skip-domains=[example.com,test.com]``. Square brackets are not
38
+ allowed.
39
+ - Wrong: ``--skip-domains=example.com, test.com``. Spaces are not allowed.
40
+ - Wrong: ``--skip-domains example.com test.com``. Use ``=`` and commas.
41
+ - Correct: ``--skip-domains=example.com,test.com``.
42
+ - Correct: ``--skip-domains="example.com,test.com"``. Quotes are optional.
43
+
44
+ Command Line Options
45
+ --------------------
46
+
47
+ ``SRC ...``
48
+ ~~~~~~~~~~~
49
+
50
+ Type
51
+ ``click.Path``
52
+ Description
53
+ Source files or directories to check.
54
+ Required
55
+ No. Either ``SRC`` or ``--dir`` must be provided.
56
+
57
+ ``-d``, ``--dir``
58
+ ~~~~~~~~~~~~~~~~~
59
+
60
+ Type
61
+ ``click.Path``
62
+ Description
63
+ Path to the root directory to check.
64
+ Required
65
+ No. Either ``SRC`` or ``--dir`` must be provided.
66
+
67
+ ``-f``, ``--func``
68
+ ~~~~~~~~~~~~~~~~~~
69
+
70
+ Type
71
+ ``click.Choice``
72
+ Description
73
+ Function to execute.
74
+ Choices
75
+ ``check_broken_paths``, ``check_broken_urls``, ``check_paths_tracking``,
76
+ ``check_urls_tracking``, ``check_urls_locale``
77
+ Required
78
+ Yes.
79
+
80
+ ``-ext``, ``--extensions``
81
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
82
+
83
+ Type
84
+ ``list[str]``
85
+ Description
86
+ File extensions used to filter the files.
87
+ Default
88
+ ``.md``, ``.ipynb``
89
+ Required
90
+ No.
91
+
92
+ Usage examples
93
+ ^^^^^^^^^^^^^^
94
+
95
+ .. code-block:: bash
96
+
97
+ # Single value
98
+ markdown-checker -d . -f check_broken_paths --extensions=.md
99
+
100
+ # Multiple values (comma-separated, no spaces)
101
+ markdown-checker -d . -f check_broken_paths --extensions=.md,.ipynb,.txt
102
+
103
+ ``-td``, ``--tracking-domains``
104
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105
+
106
+ Type
107
+ ``list[str]``
108
+ Description
109
+ List of tracking domains to check.
110
+ Default
111
+ ``github.com``, ``microsoft.com``, ``visualstudio.com``, ``aka.ms``,
112
+ ``azure.com``
113
+ Required
114
+ No.
115
+
116
+ Usage examples
117
+ ^^^^^^^^^^^^^^
118
+
119
+ .. code-block:: bash
120
+
121
+ # Single value
122
+ markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com
123
+
124
+ # Multiple values (comma-separated, no spaces)
125
+ markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com,microsoft.com
126
+
127
+ ``-sf``, ``--skip-files``
128
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
129
+
130
+ Type
131
+ ``list[str]``
132
+ Description
133
+ List of file names to skip.
134
+ Default
135
+ ``CODE_OF_CONDUCT.md``, ``SECURITY.md``
136
+ Required
137
+ No.
138
+
139
+ Usage examples
140
+ ^^^^^^^^^^^^^^
141
+
142
+ .. code-block:: bash
143
+
144
+ # Single value
145
+ markdown-checker -d . -f check_broken_paths --skip-files=README.md
146
+
147
+ # Multiple values (comma-separated, no spaces)
148
+ markdown-checker -d . -f check_broken_paths --skip-files=README.md,CHANGELOG.md,LICENSE.md
149
+
150
+ ``-sd``, ``--skip-domains``
151
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
+
153
+ Type
154
+ ``list[str]``
155
+ Description
156
+ List of domains to skip during checking.
157
+ Default
158
+ ``[]``
159
+ Required
160
+ No.
161
+
162
+ Usage examples
163
+ ^^^^^^^^^^^^^^
164
+
165
+ .. code-block:: bash
166
+
167
+ # Single value
168
+ markdown-checker -d . -f check_broken_urls --skip-domains=example.com
169
+
170
+ # Multiple values (comma-separated, no spaces)
171
+ markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com
172
+
173
+ ``-suc``, ``--skip-urls-containing``
174
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175
+
176
+ Type
177
+ ``list[str]``
178
+ Description
179
+ List of URL substrings to skip.
180
+ Default
181
+ ``[]``
182
+ Required
183
+ No.
184
+
185
+ Usage examples
186
+ ^^^^^^^^^^^^^^
187
+
188
+ .. code-block:: bash
189
+
190
+ # Single value
191
+ markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/
192
+
193
+ # Multiple values (comma-separated, no spaces)
194
+ markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/,/preview/,video-embed.html
195
+
196
+ ``-gu``, ``--guide-url``
197
+ ~~~~~~~~~~~~~~~~~~~~~~~~
198
+
199
+ Type
200
+ ``str``
201
+ Description
202
+ Full URL of your contributing guide.
203
+ Required
204
+ No.
205
+
206
+ ``-to``, ``--timeout``
207
+ ~~~~~~~~~~~~~~~~~~~~~~
208
+
209
+ Type
210
+ ``Click.IntRange``
211
+ Description
212
+ Timeout in seconds for requests before retrying.
213
+ Default
214
+ ``20``
215
+ Range
216
+ ``0-50``
217
+ Required
218
+ No.
219
+
220
+ ``-rt``, ``--retries``
221
+ ~~~~~~~~~~~~~~~~~~~~~~
222
+
223
+ Type
224
+ ``Click.IntRange``
225
+ Description
226
+ Number of retries before flagging a URL as broken.
227
+ Default
228
+ ``3``
229
+ Range
230
+ ``0-10``
231
+ Required
232
+ No.
233
+
234
+ ``--retry-on-429`` / ``--no-retry-on-429``
235
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236
+
237
+ Type
238
+ ``bool``
239
+ Description
240
+ When enabled, the checker honours the ``Retry-After`` response header on
241
+ ``429 Too Many Requests`` (and any other non-success, non-redirect response
242
+ that carries the header). The indicated wait time is used instead of the
243
+ normal exponential backoff. Disable with ``--no-retry-on-429`` to fall back
244
+ to standard retry behaviour.
245
+ Default
246
+ Enabled (``--retry-on-429``)
247
+ Required
248
+ No.
249
+
250
+ Usage examples
251
+ ^^^^^^^^^^^^^^
252
+
253
+ .. code-block:: bash
254
+
255
+ # Enabled (default)
256
+ markdown-checker -d . -f check_broken_urls --retry-on-429
257
+
258
+ # Disabled
259
+ markdown-checker -d . -f check_broken_urls --no-retry-on-429
260
+
261
+ ``-frd``, ``--fallback-retry-delay``
262
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
263
+
264
+ Type
265
+ ``Click.IntRange``
266
+ Description
267
+ Number of seconds to wait before retrying when a ``429`` response is
268
+ received but carries no ``Retry-After`` header. Only applies when
269
+ ``--retry-on-429`` is enabled.
270
+ Default
271
+ ``30``
272
+ Range
273
+ ``0-300``
274
+ Required
275
+ No.
276
+
277
+ Usage examples
278
+ ^^^^^^^^^^^^^^
279
+
280
+ .. code-block:: bash
281
+
282
+ # Use a custom fallback delay of 45 seconds
283
+ markdown-checker -d . -f check_broken_urls --fallback-retry-delay=45
284
+
285
+ # Short-form alias
286
+ markdown-checker -d . -f check_broken_urls -frd 45
287
+
288
+ ``-o``, ``--output-file-name``
289
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290
+
291
+ Type
292
+ ``str``
293
+ Description
294
+ Name of the output file.
295
+ Default
296
+ ``comment``
297
+ Required
298
+ No.
299
+
300
+ URL Check Outcomes
301
+ ------------------
302
+
303
+ When ``check_broken_urls`` runs, each URL is evaluated by
304
+ ``MarkdownURL.check()``, which returns a ``URLCheckResult`` with one of five
305
+ statuses.
306
+
307
+ .. list-table::
308
+ :header-rows: 1
309
+ :widths: 20 80
310
+
311
+ * - Status
312
+ - Meaning
313
+ * - ``alive``
314
+ - A ``2xx`` HTTP response was received. The link is healthy.
315
+ * - ``broken``
316
+ - All retries returned non-``2xx`` responses (e.g. ``404 Not Found``).
317
+ The link is reported as an issue.
318
+ * - ``rate_limited``
319
+ - No hard HTTP failure was observed, and at least one retry encountered
320
+ ``429 Too Many Requests`` (with or without a ``Retry-After`` header).
321
+ The link is reported as a **warning-level issue**
322
+ (``issue_level="warning"``). It does not cause the CLI to exit with a
323
+ non-zero code.
324
+ * - ``transient_error``
325
+ - No hard HTTP failure or rate-limit response was observed, and the
326
+ attempts failed with network-level exceptions (e.g. DNS failure,
327
+ connection timeout). The link is reported as a **warning-level issue**
328
+ and does not cause the CLI to exit with a non-zero code.
329
+ * - ``unverifiable``
330
+ - Both HEAD and GET returned ``401 Unauthorized`` or ``403 Forbidden``.
331
+ The server is reachable but is blocking automated access (e.g.
332
+ Cloudflare bot protection). The real status of the resource cannot be
333
+ determined. The link is reported as a **warning-level issue** and does
334
+ not cause the CLI to exit with a non-zero code.
335
+
336
+ Rate limiting and access errors
337
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
338
+
339
+ When one or more URLs are rate-limited, unverifiable, or cannot be reached due
340
+ to transient network failures, the CLI prints a yellow warning summary followed
341
+ by one warning line per affected link, after the error-level issues (if any).
342
+
343
+ In local mode::
344
+
345
+ 🔍 Checked 42 links in 10 files.
346
+ ⚠ 3 links had warnings:
347
+ File '/path/to/file.md', line 12
348
+ https://example.com/api was skipped due to rate limiting.
349
+
350
+ File '/path/to/file.md', line 15
351
+ https://stackoverflow.com/a/123 could not be verified (access was forbidden by the server).
352
+
353
+ In CI mode (``$CI=true``), GitHub Actions ``::warning::`` annotations are
354
+ emitted instead::
355
+
356
+ 🔍 Checked 42 links in 10 files.
357
+ ::warning file=path/to/file.md,line=12::File path/to/file.md, line 12, Link https://example.com/api was skipped due to rate limiting.
358
+ ::warning file=path/to/file.md,line=15::File path/to/file.md, line 15, Link https://stackoverflow.com/a/123 could not be verified (access was forbidden by the server).
359
+
360
+ Warning-level issues do **not** cause the CLI to exit with a non-zero code.
361
+ Only error-level issues (broken links) cause a non-zero exit.
362
+
363
+ If a run mixes rate-limited responses with transient network failures, the
364
+ outcome is reported as ``rate_limited`` unless a hard HTTP failure is also
365
+ observed. Any hard HTTP failure causes the final outcome to be ``broken``.
366
+
367
+ Other Options
368
+ -------------
369
+
370
+ ``--version``
371
+ ~~~~~~~~~~~~~
372
+
373
+ Type
374
+ ``bool``
375
+ Description
376
+ Show the version and exit.
377
+ Required
378
+ No.
379
+
380
+ ``--help``
381
+ ~~~~~~~~~~
382
+
383
+ Type
384
+ ``bool``
385
+ Description
386
+ Show the help message and exit.
387
+ Required
388
+ No.
@@ -0,0 +1,7 @@
1
+ Checker
2
+ =======
3
+
4
+ .. automodule:: markdown_checker.checker
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance: