Documentation ¶
Overview ¶
forbidigo provides a linter for forbidding the use of specific identifiers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPatterns ¶
func DefaultPatterns() []string
Types ¶
type ApplyOptionFunc ¶ added in v1.1.0
type ApplyOptionFunc func(c *config) error
func OptionExcludeGodocExamples ¶ added in v1.1.0
func OptionExcludeGodocExamples(o bool) ApplyOptionFunc
OptionExcludeGodocExamples don't check inside Godoc examples (see https://blog.golang.org/examples)
func OptionIgnorePermitDirectives ¶ added in v1.1.0
func OptionIgnorePermitDirectives(o bool) ApplyOptionFunc
OptionIgnorePermitDirectives don't check for `permit` directives(for example, in favor of `nolint`)
type RunConfig ¶ added in v1.4.0
type RunConfig struct { // FSet is required. Fset *token.FileSet // TypesInfo is needed for expanding source code expressions. // Nil disables that step, i.e. patterns match the literal source code. TypesInfo *types.Info // DebugLog is used to print debug messages. May be nil. DebugLog func(format string, args ...interface{}) }
RunConfig provides information that the linter needs for different kinds of match patterns. Ideally, all fields should get set. More fields may get added in the future as needed.
Click to show internal directories.
Click to hide internal directories.