Documentation ¶
Index ¶
Constants ¶
View Source
const ( PrefixDisable = `protolint:disable` PrefixEnable = `protolint:enable` PrefixDisableNext = `protolint:disable:next` PrefixDisableThis = `protolint:disable:this` )
comment prefix
Variables ¶
View Source
var ( ReDisable = regexp.MustCompile(PrefixDisable + ` (.*)`) ReEnable = regexp.MustCompile(PrefixEnable + ` (.*)`) ReDisableNext = regexp.MustCompile(PrefixDisableNext + ` (.*)`) ReDisableThis = regexp.MustCompile(PrefixDisableThis + ` (.*)`) )
comment prefix regexp
Functions ¶
This section is empty.
Types ¶
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
Interpreter represents an interpreter for disable rule comments.
func NewInterpreter ¶
func NewInterpreter( ruleID string, ) *Interpreter
NewInterpreter creates an Interpreter.
func (*Interpreter) CallEachIfValid ¶
func (i *Interpreter) CallEachIfValid( lines []string, f func(index int, line string), )
CallEachIfValid calls a given function each time the line is not disabled.
Click to show internal directories.
Click to hide internal directories.