mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
support gocyclo
This commit is contained in:
parent
b3f856af80
commit
d02ef1b633
10 changed files with 345 additions and 2 deletions
|
@ -49,6 +49,9 @@ func (e *Executor) initRun() {
|
|||
|
||||
runCmd.Flags().BoolVar(&rc.Gofmt.Simplify, "gofmt.simplify", true, "Gofmt: simplify code")
|
||||
|
||||
runCmd.Flags().IntVar(&rc.Gocyclo.MinComplexity, "gocyclo.min-complexity",
|
||||
20, "Minimal complexity of function to report it")
|
||||
|
||||
runCmd.Flags().StringSliceVarP(&rc.EnabledLinters, "enable", "E", []string{}, "Enable specific linter")
|
||||
runCmd.Flags().StringSliceVarP(&rc.DisabledLinters, "disable", "D", []string{}, "Disable specific linter")
|
||||
runCmd.Flags().BoolVar(&rc.EnableAllLinters, "enable-all", false, "Enable all linters")
|
||||
|
@ -94,8 +97,8 @@ func (e Executor) executeRun(cmd *cobra.Command, args []string) {
|
|||
runner := pkg.SimpleRunner{
|
||||
Processors: []processors.Processor{
|
||||
processors.MaxLinterIssuesPerFile{},
|
||||
processors.UniqByLineProcessor{},
|
||||
processors.NewExcludeProcessor(fmt.Sprintf("(%s)", strings.Join(e.cfg.Run.ExcludePatterns, "|"))),
|
||||
processors.UniqByLineProcessor{},
|
||||
processors.NewPathPrettifier(),
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue