Skip to content

Commit 7252a65

Browse files
refactor(config): wrap config file parse errors
1 parent 4a88507 commit 7252a65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ func Parse(confPath string) (*lint.Config, error) {
2121
confPath = filepath.Clean(confPath)
2222
confBytes, err := os.ReadFile(confPath)
2323
if err != nil {
24-
return nil, err
24+
return nil, fmt.Errorf("config file error: %w", err)
2525
}
2626

2727
conf := &lint.Config{}
2828
err = yaml.UnmarshalStrict(confBytes, conf)
2929
if err != nil {
30-
return nil, err
30+
return nil, fmt.Errorf("config file error: %w", err)
3131
}
3232

3333
if conf.Formatter == "" {

0 commit comments

Comments
 (0)