Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "consistentimports", Doc: "detect inconsistent import aliases, reports import paths and aliases count", Run: run, Flags: flag.FlagSet{}, Requires: []*analysis.Analyzer{inspect.Analyzer}, FactTypes: []analysis.Fact{new(pathAliasCountsFact)}, }
Analyzer for consistentimports. Inspired by analysis facts example: https://cs.opensource.google/go/x/tools/+/refs/tags/v0.9.3:go/analysis/passes/pkgfact/pkgfact.go
Functions ¶
This section is empty.
Types ¶
type PrefixPkgModuleChecker ¶ added in v0.3.0
type PrefixPkgModuleChecker struct {
NumSegments uint
}
PrefixPkgModuleChecker decides that packages are in same module by looking how many prefix segments in path they match
func (PrefixPkgModuleChecker) IsSameModule ¶ added in v0.3.0
func (s PrefixPkgModuleChecker) IsSameModule(packagePathA, packagePathB string) bool
Click to show internal directories.
Click to hide internal directories.