Documentation
¶
Overview ¶
Package revivelib provides revive's linting functionality as a lib.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayFlags ¶
type ArrayFlags []string
ArrayFlags type for string list.
func (*ArrayFlags) String ¶
func (i *ArrayFlags) String() string
type ExtraRule ¶
type ExtraRule struct {
Rule lint.Rule
DefaultConfig lint.RuleConfig
}
ExtraRule configures a new rule to be used with revive.
func NewExtraRule ¶
func NewExtraRule(rule lint.Rule, defaultConfig lint.RuleConfig) ExtraRule
NewExtraRule returns a configured extra rule.
type LintPattern ¶
type LintPattern struct {
// contains filtered or unexported fields
}
LintPattern indicates a pattern to be included/excluded when linting.
func (*LintPattern) GetPattern
deprecated
func (p *LintPattern) GetPattern() string
GetPattern returns the actual pattern
Deprecated: Use [Pattern].
func (*LintPattern) IsExclude ¶
func (p *LintPattern) IsExclude() bool
IsExclude determines should this pattern be included or excluded when linting.
func (*LintPattern) Pattern ¶ added in v1.10.0
func (p *LintPattern) Pattern() string
Pattern returns the actual pattern.
type Revive ¶
type Revive struct {
// contains filtered or unexported fields
}
Revive is responsible for running linters and formatters and returning a set of results.
func New ¶
func New( conf *lint.Config, setExitStatus bool, maxOpenFiles int, extraRules ...ExtraRule, ) (*Revive, error)
New creates a new instance of Revive lint runner.
Click to show internal directories.
Click to hide internal directories.