mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-13 03:56:39 +00:00
c28f7cb29f
Initial part of #435
17 lines
446 B
Go
17 lines
446 B
Go
package golinters
|
|
|
|
import (
|
|
"github.com/jirfag/go-printf-func-name/pkg/analyzer"
|
|
"golang.org/x/tools/go/analysis"
|
|
|
|
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
|
)
|
|
|
|
func NewGoPrintfFuncName() *goanalysis.Linter {
|
|
return goanalysis.NewLinter(
|
|
"goprintffuncname",
|
|
"Checks that printf-like functions are named with `f` at the end",
|
|
[]*analysis.Analyzer{analyzer.Analyzer},
|
|
nil,
|
|
).WithLoadMode(goanalysis.LoadModeSyntax)
|
|
}
|