Functions | |
| argparse.Namespace | parse_args () |
| Parse command-line arguments. | |
| list[Path]|None | git_markdown (Path repo_root) |
| List tracked plus non-ignored untracked Markdown files, so the scan set is reproducible for a given commit regardless of local build or scratch output. | |
| iter_markdown_files (Path repo_root, bool include_readme) | |
| Yield every repository Markdown file the current commit would carry. | |
| bool | should_skip_link (str target) |
| Perform should skip link. | |
| str | normalize_target (str raw_target) |
| Remove Markdown angle brackets, fragments, and query strings before resolving a link target. | |
| int | main () |
| Entry point for this script. | |
Variables | |
| LINK_PATTERN = re.compile(r"!\[[^\]]*\]\(([^)\s]+)(?:\s+\"[^\"]*\")?\)|\[[^\]]*\]\(([^)\s]+)(?:\s+\"[^\"]*\")?\)") | |
| dict | SKIP_DIRS = {".git", "docs_build", "obj", "bin", "stubs", "runs", "studies", "__pycache__", ".pytest_cache"} |
Local markdown link checker across every Markdown file the current commit carries.
| argparse.Namespace check_markdown_links.parse_args | ( | ) |
Parse command-line arguments.
parse_args(). Definition at line 19 of file check_markdown_links.py.
| list[Path] | None check_markdown_links.git_markdown | ( | Path | repo_root | ) |
List tracked plus non-ignored untracked Markdown files, so the scan set is reproducible for a given commit regardless of local build or scratch output.
| [in] | repo_root | Repository root directory. |
Definition at line 54 of file check_markdown_links.py.
| check_markdown_links.iter_markdown_files | ( | Path | repo_root, |
| bool | include_readme | ||
| ) |
Yield every repository Markdown file the current commit would carry.
| [in] | repo_root | Repository root directory. |
| [in] | include_readme | Whether the top-level README participates in the scan. |
Definition at line 64 of file check_markdown_links.py.
| bool check_markdown_links.should_skip_link | ( | str | target | ) |
Perform should skip link.
| [in] | target | Argument passed to should_skip_link(). |
should_skip_link(). Definition at line 86 of file check_markdown_links.py.
| str check_markdown_links.normalize_target | ( | str | raw_target | ) |
Remove Markdown angle brackets, fragments, and query strings before resolving a link target.
| [in] | raw_target | Argument passed to normalize_target(). |
normalize_target(). Definition at line 101 of file check_markdown_links.py.
| int check_markdown_links.main | ( | ) |
Entry point for this script.
main(). Definition at line 111 of file check_markdown_links.py.
| check_markdown_links.LINK_PATTERN = re.compile(r"!\[[^\]]*\]\(([^)\s]+)(?:\s+\"[^\"]*\")?\)|\[[^\]]*\]\(([^)\s]+)(?:\s+\"[^\"]*\")?\)") |
Definition at line 16 of file check_markdown_links.py.
| dict check_markdown_links.SKIP_DIRS = {".git", "docs_build", "obj", "bin", "stubs", "runs", "studies", "__pycache__", ".pytest_cache"} |
Definition at line 51 of file check_markdown_links.py.