
* Initial commit * Fixed goimports * Update pkg/golinters/mnd.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> * Run goimports * Update pkg/golinters/mnd.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> * Add prefix for goimport local * Run make README.md * Incorporate review comments Add test cases * Update readme * Update the description * Removed subpath in local-prefixes * Update readme
22 lines
426 B
Go
22 lines
426 B
Go
package golinters
|
|
|
|
import (
|
|
magic_numbers "github.com/tommy-muehle/go-mnd"
|
|
"golang.org/x/tools/go/analysis"
|
|
|
|
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
|
)
|
|
|
|
func NewGomnd() *goanalysis.Linter {
|
|
analyzers := []*analysis.Analyzer{
|
|
magic_numbers.Analyzer,
|
|
}
|
|
|
|
return goanalysis.NewLinter(
|
|
"gomnd",
|
|
"checks whether magic number is used",
|
|
analyzers,
|
|
nil,
|
|
).WithLoadMode(goanalysis.LoadModeSyntax)
|
|
}
|