firstlineheading

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

This section is empty.

Types

type Rule

type Rule struct {
	Level        int      // expected heading level (default: 1)
	Placeholders []string // placeholder tokens to treat as opaque
}

Rule checks that the first line of the file is a heading of the configured level.

func (*Rule) ApplySettings

func (r *Rule) ApplySettings(s 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) ID

func (r *Rule) ID() string

ID implements rule.Rule.

func (*Rule) Name

func (r *Rule) Name() string

Name implements rule.Rule.

func (*Rule) SettingMergeMode added in v0.7.0

func (r *Rule) SettingMergeMode(key string) rule.MergeMode

SettingMergeMode implements rule.ListMerger. The placeholder vocabulary concatenates across config layers so a kind can extend the inherited token list without restating it.

Jump to

Keyboard shortcuts

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