Documentation ¶
Overview ¶
Package 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 ¶
type ApplyOptionFunc func(c *config) error
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func OptionAnalyzeTypes ¶
OptionAnalyzeTypes enable to match canonical names for types and interfaces using type info
func OptionExcludeGodocExamples ¶
OptionExcludeGodocExamples don't check inside Godoc examples (see https://blog.golang.org/examples)
func OptionIgnorePermitDirectives ¶
OptionIgnorePermitDirectives don't check for `permit` directives(for example, in favor of `nolint`)
type RunConfig ¶
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.