Skip to content

Commit daf4b8d

Browse files
add error handling
Signed-off-by: Denis Tingaikin <[email protected]>
1 parent f50a3f4 commit daf4b8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/golinters/goheader/goheader.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/golangci/golangci-lint/v2/pkg/config"
1010
"github.com/golangci/golangci-lint/v2/pkg/goanalysis"
11+
"github.com/golangci/golangci-lint/v2/pkg/golinters/internal"
1112
)
1213

1314
const linterName = "goheader"
@@ -22,7 +23,9 @@ func New(settings *config.GoHeaderSettings, replacer *strings.Replacer) *goanaly
2223
}
2324
}
2425
var goheaderSettings goheader.Settings
25-
_ = conf.FillSettings(&goheaderSettings)
26+
if err := conf.FillSettings(&goheaderSettings); err != nil {
27+
internal.LinterLogger.Fatalf("%s: invalid toolchain pattern: %s", linterName, err.Error())
28+
}
2629
return goanalysis.NewLinter(
2730
linterName,
2831
"Checks if file header matches to pattern",

0 commit comments

Comments
 (0)