directorystructure

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: 7 Imported by: 0

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

func (r *Rule) ApplySettings(settings 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.

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