include

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	// contains filtered or unexported fields
}

Rule checks that include sections contain the correct file content.

visited / chain are per-Check state, but the rule is a registered singleton so concurrent callers (notably the LSP server, which schedules lint runs on a timer and may invoke Check from multiple goroutines) would otherwise race on these fields. mu serialises Check/Fix on a single Rule instance; the lock is held only for the duration of one call so concurrent lints on different rules remain unaffected.

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) Fix

func (r *Rule) Fix(f *lint.File) []byte

Fix implements rule.FixableRule.

func (*Rule) Generate

func (r *Rule) Generate(
	f *lint.File, filePath string, line int,
	params map[string]string,
	columns map[string]gensection.ColumnConfig,
) (string, []lint.Diagnostic)

Generate implements gensection.Directive.

func (*Rule) ID

func (r *Rule) ID() string

ID implements rule.Rule.

func (*Rule) Name

func (r *Rule) Name() string

Name implements rule.Rule.

func (*Rule) RuleID

func (r *Rule) RuleID() string

RuleID implements gensection.Directive.

func (*Rule) RuleName

func (r *Rule) RuleName() string

RuleName implements gensection.Directive.

func (*Rule) Validate

func (r *Rule) Validate(
	filePath string, line int,
	params map[string]string,
	columns map[string]gensection.ColumnConfig,
) []lint.Diagnostic

Validate implements gensection.Directive.

Jump to

Keyboard shortcuts

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