mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-13 20:16:30 +00:00
20 lines
442 B
Go
20 lines
442 B
Go
|
package golinters
|
||
|
|
||
|
import (
|
||
|
"github.com/tdakkota/asciicheck"
|
||
|
"golang.org/x/tools/go/analysis"
|
||
|
|
||
|
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
||
|
)
|
||
|
|
||
|
func NewAsciicheck() *goanalysis.Linter {
|
||
|
return goanalysis.NewLinter(
|
||
|
"asciicheck",
|
||
|
"Simple linter to check that your code does not contain non-ASCII identifiers",
|
||
|
[]*analysis.Analyzer{
|
||
|
asciicheck.NewAnalyzer(),
|
||
|
},
|
||
|
nil,
|
||
|
).WithLoadMode(goanalysis.LoadModeSyntax)
|
||
|
}
|