Heading checks#

Checks related to expectations about headings and content within them.

class gh_issue_validator.checks.headings.HeadingRequirement[source]#

Specification of expectations for a heading and its contents.

heading: str#
min_words: NotRequired[int]#
max_words: NotRequired[int]#
class gh_issue_validator.checks.headings.CheckMissingHeadings(*, requirements)[source]#

Validate that expected headings are present.

Parameters:

requirements (list[HeadingRequirement])

check(*, segments, report)[source]#

Apply the check to the document and report issues.

Parameters:
Return type:

None

class gh_issue_validator.checks.headings.CheckUnexpectedHeadings(*, requirements, freeform_headings=None)[source]#

Validate that no unexpected headings are present.

Parameters:
check(*, segments, report)[source]#

Apply the check to the document and report issues.

Parameters:
Return type:

None

class gh_issue_validator.checks.headings.CheckDisorderedHeadings(*, requirements, freeform_headings=None)[source]#

Validate that headings appear in the expected order.

Parameters:
check(*, segments, report)[source]#

Apply the check to the document and report issues.

Parameters:
Return type:

None

class gh_issue_validator.checks.headings.CheckWordCount(*, requirements)[source]#

Check that each heading has the expected number of words.

Parameters:

requirements (list[HeadingRequirement])

check(*, segments, report)[source]#

Apply the check to the document and report issues.

Parameters:
Return type:

None