Contract checks for documentation integrity.
Registered byDocsPluginwhen mounted. Each check receives the
ContractCheckSnapshot and appends issues to the CheckResult.
Checks:
check_docs_parseable— all.mdfiles in content_dir parsecheck_docs_no_duplicate_slugs— no slug collisionscheck_docs_cross_references— internal[text](slug)links resolvecheck_docs_no_drafts_exposed— drafts excluded unless include_drafts
docs.checks
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Read the live collection from the holder stored in extras.
Verify all.mdfiles in the content directory are parseable.
Detect duplicate slugs across markdown and autodoc pages.
Verify internal markdown links resolve to existing slugs.
Warn if draft pages are included in the live collection.
_get_collection
function
def _get_collection(snapshot: ContractCheckSnapshot)
Read the live collection from the holder stored in extras.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
snapshot
|
ContractCheckSnapshot
|
— |
check_docs_parseable
function
def check_docs_parseable(snapshot: ContractCheckSnapshot, result: CheckResult) -> None
Verify all.mdfiles in the content directory are parseable.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
snapshot
|
ContractCheckSnapshot
|
— | |
result
|
CheckResult
|
— |
check_docs_no_duplicate_slugs
function
def check_docs_no_duplicate_slugs(snapshot: ContractCheckSnapshot, result: CheckResult) -> None
Detect duplicate slugs across markdown and autodoc pages.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
snapshot
|
ContractCheckSnapshot
|
— | |
result
|
CheckResult
|
— |
check_docs_cross_references
function
def check_docs_cross_references(snapshot: ContractCheckSnapshot, result: CheckResult) -> None
Verify internal markdown links resolve to existing slugs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
snapshot
|
ContractCheckSnapshot
|
— | |
result
|
CheckResult
|
— |
check_docs_no_drafts_exposed
function
def check_docs_no_drafts_exposed(snapshot: ContractCheckSnapshot, result: CheckResult) -> None
Warn if draft pages are included in the live collection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
snapshot
|
ContractCheckSnapshot
|
— | |
result
|
CheckResult
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/docs/checks.py:1