duplicatedcontent

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Include  []string
	Exclude  []string
	MinChars int
}

Rule detects paragraphs duplicated across Markdown files in the corpus.

func (*Rule) ApplySettings

func (r *Rule) ApplySettings(cfg map[string]any) error

ApplySettings implements rule.Configurable.

func (*Rule) Category

func (r *Rule) Category() string

Category implements rule.Rule.

func (*Rule) Check

func (r *Rule) Check(f *lint.File) []lint.Diagnostic

Check implements rule.Rule.

func (*Rule) DefaultSettings

func (r *Rule) DefaultSettings() map[string]any

DefaultSettings implements rule.Configurable.

func (*Rule) EnabledByDefault

func (r *Rule) EnabledByDefault() bool

EnabledByDefault implements rule.Defaultable. MDS037 is opt-in: in a project that intentionally shares prose across agent files (AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, include-expanded docs) the default behavior would fire on every boilerplate paragraph. Projects that want duplication checks enable it explicitly in `.mdsmith.yml`.

func (*Rule) ID

func (r *Rule) ID() string

ID implements rule.Rule.

func (*Rule) Name

func (r *Rule) Name() string

Name implements rule.Rule.

Jump to

Keyboard shortcuts

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