Checks¶
Base¶
- class markdown_checker.checks.base.BaseCheck¶
-
Abstract base class for all link checks.
- abstractmethod run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type:
list[TLink]
Broken Paths¶
- class markdown_checker.checks.broken_paths.BrokenPathsCheck¶
Bases:
BaseCheck[MarkdownPath]Check for relative paths in markdown files that do not exist on disk.
- run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type:
Broken URLs¶
- class markdown_checker.checks.broken_urls.BrokenURLsCheck¶
Bases:
BaseCheck[MarkdownURL]Check for URLs in markdown files that return non-2xx responses.
- run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type:
Locale¶
- class markdown_checker.checks.locale.URLsLocaleCheck¶
Bases:
BaseCheck[MarkdownURL]Check that URLs do not contain a country/language locale segment.
- run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type:
Tracking¶
- class markdown_checker.checks.tracking.URLsTrackingCheck¶
Bases:
BaseCheck[MarkdownURL]Check that URLs on configured tracking domains include a tracking ID.
- run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type:
- class markdown_checker.checks.tracking.PathsTrackingCheck¶
Bases:
BaseCheck[MarkdownPath]Check that relative paths include a tracking ID.
- run(links, config=None)¶
Run the check against the extracted links.
- Args:
links (MarkdownLinks): Extracted URLs and paths from a file. config: Runtime configuration for the check run.
- Returns:
List of links that failed the check, each with an .issue set.
- Parameters:
links (MarkdownLinks)
config (Config | None)
- Return type: