custom_linters is a tool to run multiple linters at once using the multichecker package.
go install github.com/snkrdunk/custom_linters/cmd/custom_linters@latestgo get github.com/path/to/moduleIf you want to add a private linter module, set GOPRIVATE to the repository or account path before executing go get command
export GOPRIVATE=github.com/snkrdunkIn this example, you can get private module from github.com/snkrdunk.
package main
import (
+ "path/to/linter/linter_pkg"
"github.com/snkrdunk/empty_err_checker"
"golang.org/x/tools/go/analysis/multichecker"
)
func main() {
multichecker.Main(
empty_err_checker.Analyzer,
+ linter_pkg.Analyzer,
)
} package main
import (
+ "path/to/linter/linter_pkg"
"github.com/snkrdunk/empty_err_checker"
"golang.org/x/tools/go/analysis"
)
func (analyzerPlugin) GetAnalyzers() []*analysis.Analyzer {
return []*analysis.Analyzer{
empty_err_checker.Analyzer,
+ linter_pkg.Analyzer,
}
}