Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SilenceConfigWarningForTesting ¶ added in v0.6.0
func SilenceConfigWarningForTesting()
SilenceConfigWarningForTesting consumes the package-level once- guard with a no-op, so later checks will not fire the "no allowed patterns" warning. Intended for tests that share a process and cannot tolerate a misconfigured-state leak from a previous rule's cleanup. Unlike resetting the sync.Once (which would race with a concurrent Rule.Check), Do is safe to call at any time: after the first call it is a no-op and never writes to the Once.
Types ¶
type Rule ¶
type Rule struct {
Allowed []string
// contains filtered or unexported fields
}
Rule checks that markdown files exist only in explicitly allowed directories.
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.