rules

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupRule

func LookupRule(query string) (string, error)

LookupRule finds a rule by ID (e.g. "MDS001") or name (e.g. "line-length") and returns its README content with front matter stripped.

Types

type RuleInfo

type RuleInfo struct {
	ID          string
	Name        string
	Status      string
	Description string
	Content     string
}

RuleInfo holds metadata extracted from a rule README's front matter.

func ListRules

func ListRules() ([]RuleInfo, error)

ListRules returns all embedded rules sorted by ID.

Directories

Path Synopsis
Package all is a blank-import barrel that registers every production rule with the rule registry.
Package all is a blank-import barrel that registers every production rule with the rule registry.
Package ambiguousemphasis implements MDS047, which flags emphasis runs whose meaning a human cannot predict at a glance.
Package ambiguousemphasis implements MDS047, which flags emphasis runs whose meaning a human cannot predict at a glance.
Package build implements MDS039, which validates <?build?> directive parameters and keeps the body in sync with the recipe's body-template.
Package build implements MDS039, which validates <?build?> directive parameters and keeps the body in sync with the recipe's body-template.
Package duplicatedcontent implements MDS037, which flags substantial paragraphs that also appear verbatim in another Markdown file in the project root after whitespace and case normalization.
Package duplicatedcontent implements MDS037, which flags substantial paragraphs that also appear verbatim in another Markdown file in the project root after whitespace and case normalization.
Package githooksync implements MDS048, the git-hook-sync rule.
Package githooksync implements MDS048, the git-hook-sync rule.
Package listmarkerstyle implements MDS045, which pins the bullet character for unordered lists.
Package listmarkerstyle implements MDS045, which pins the bullet character for unordered lists.
Package markdownflavor implements MDS034, which validates Markdown against a declared target flavor (commonmark, gfm, goldmark, pandoc, phpextra, multimarkdown, myst, or any) and flags syntax the target renderer will not understand.
Package markdownflavor implements MDS034, which validates Markdown against a declared target flavor (commonmark, gfm, goldmark, pandoc, phpextra, multimarkdown, myst, or any) and flags syntax the target renderer will not understand.
ext
Package ext implements detection-only goldmark extensions used by MDS034 (markdown-flavor) to flag syntax that varies across Markdown flavors.
Package ext implements detection-only goldmark extensions used by MDS034 (markdown-flavor) to flag syntax that varies across Markdown flavors.
Package noreferencestyle implements MDS043, which forbids reference-style links and footnotes.
Package noreferencestyle implements MDS043, which forbids reference-style links and footnotes.
Package nospaceincodespans implements MDS052, which flags inline code spans with leading or trailing whitespace inside the backticks.
Package nospaceincodespans implements MDS052, which flags inline code spans with leading or trailing whitespace inside the backticks.
Package noundefinedreferencelabels implements MDS054, which flags reference-style links and images whose label has no matching link reference definition in the file.
Package noundefinedreferencelabels implements MDS054, which flags reference-style links and images whose label has no matching link reference definition in the file.
Package nounusedlinkdefinitions implements MDS053, which flags link reference definitions that are never used by any reference-style link or image, and definitions that duplicate an existing label.
Package nounusedlinkdefinitions implements MDS053, which flags link reference definitions that are never used by any reference-style link or image, and definitions that duplicate an existing label.
Package orderedlistnumbering implements MDS046, which pins how ordered list items are numbered in the source: literal sequential (1.
Package orderedlistnumbering implements MDS046, which pins how ordered list items are numbered in the source: literal sequential (1.
Package propernames implements MDS050, which checks that proper names (e.g.
Package propernames implements MDS050, which checks that proper names (e.g.
Package recipesafety implements MDS040, which validates every command in build.recipes for shell-safety at lint time.
Package recipesafety implements MDS040, which validates every command in build.recipes for shell-safety at lint time.
Package settings provides shared helpers for coercing rule-configuration values decoded from YAML/CUE into Go types.
Package settings provides shared helpers for coercing rule-configuration values decoded from YAML/CUE into Go types.
Package toc implements MDS038, the <?toc?> generated-section directive that emits a nested heading list linked to GitHub-style anchors.
Package toc implements MDS038, the <?toc?> generated-section directive that emits a nested heading list linked to GitHub-style anchors.
Package tocdirective implements MDS035, which flags renderer-specific table-of-contents directives that render as literal text on CommonMark and goldmark.
Package tocdirective implements MDS035, which flags renderer-specific table-of-contents directives that render as literal text on CommonMark and goldmark.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL