Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
Max int
Mode string
TokensPerWord float64
Tokenizer string
Encoding string
Budgets []budgetOverride
}
Rule checks that a file does not exceed a configurable token budget. It supports a simple heuristic mode and a tokenizer mode.
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.