Documentation
¶
Overview ¶
Package requiredtextpatterns implements MDS057, which flags heading-bounded sections whose body text does not match a configured regex.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
Patterns []Pattern
}
Rule flags heading-bounded sections whose plain text does not match a configured regular expression. Walks every heading in the document and, for each one, gathers the prose under the heading (paragraphs, including those in nested sub-sections) and tests each configured pattern against the gathered text. A failing pattern emits one diagnostic anchored at the heading line so the per-scope override from plan 146 keeps only diagnostics that fall inside the configured scope's line range.
func (*Rule) ApplySettings ¶
ApplySettings implements rule.Configurable.
func (*Rule) Check ¶
func (r *Rule) Check(f *lint.File) []lint.Diagnostic
Check implements rule.Rule.
func (*Rule) DefaultSettings ¶
DefaultSettings implements rule.Configurable.
func (*Rule) EnabledByDefault ¶
EnabledByDefault implements rule.Defaultable.