()
| 46 | } |
| 47 | |
| 48 | func main() { |
| 49 | paths := os.Args[1:] |
| 50 | if len(paths) == 0 { |
| 51 | paths = []string{"."} |
| 52 | } |
| 53 | |
| 54 | r := runner.New(cops, config.DefaultConfig(), os.Stdout). |
| 55 | WithProgramCops(programCops) |
| 56 | offenseCount, err := r.Run(paths) |
| 57 | if err != nil { |
| 58 | fmt.Fprintf(os.Stderr, "Error: %v\n", err) |
| 59 | os.Exit(1) |
| 60 | } |
| 61 | if offenseCount > 0 { |
| 62 | os.Exit(1) |
| 63 | } |
| 64 | } |