diff --git a/.golangci.yml b/.golangci.yml index 2bbc988..45f3a7b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,7 @@ linters: enable: - errname + - errorlint - exhaustive - gci - gochecknoglobals diff --git a/cmd/format/format.go b/cmd/format/format.go index a781f11..7c053d5 100644 --- a/cmd/format/format.go +++ b/cmd/format/format.go @@ -136,7 +136,7 @@ func Run(v *viper.Viper, statz *stats.Stats, cmd *cobra.Command, paths []string) relativePath, err := filepath.Rel(cfg.TreeRoot, absolutePath) if err != nil { - return fmt.Errorf("error computing relative path from %s to %s: %s", cfg.TreeRoot, absolutePath, err) + return fmt.Errorf("error computing relative path from %s to %s: %w", cfg.TreeRoot, absolutePath, err) } if strings.HasPrefix(relativePath, "..") {