1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

refactor: replace panic with error in rules (#1126)

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
This commit is contained in:
Marcin Federowicz
2024-12-11 19:35:58 +01:00
committed by GitHub
parent 10d9697cc2
commit 9b15f3fcb6
35 changed files with 514 additions and 239 deletions

View File

@@ -106,7 +106,7 @@ func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-cha
for n := range packages {
go func(pkg []string, gover *goversion.Version) {
if err := l.lintPackage(pkg, gover, ruleSet, config, failures); err != nil {
fmt.Fprintln(os.Stderr, err)
fmt.Fprintln(os.Stderr, "error during linting: "+err.Error())
os.Exit(1)
}
wg.Done()