Documentation
¶
Index ¶
- func ARI(text string) float64
- type IndexFunc
- type Rule
- func (r *Rule) ApplySettings(s map[string]any) error
- func (r *Rule) Category() string
- func (r *Rule) Check(f *lint.File) []lint.Diagnostic
- func (r *Rule) DefaultSettings() map[string]any
- func (r *Rule) ID() string
- func (r *Rule) Name() string
- func (r *Rule) SettingMergeMode(key string) rule.MergeMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IndexFunc ¶ added in v0.5.0
IndexFunc computes a readability index from plain text. Higher values mean harder to read.
type Rule ¶
type Rule struct {
MaxIndex float64
MinWords int
Index IndexFunc
Placeholders []string // placeholder tokens to treat as opaque
}
Rule checks that the paragraph readability index does not exceed a configured maximum. Uses the Automated Readability Index by default.
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.
Click to show internal directories.
Click to hide internal directories.