Skip to content

Commit

Permalink
golangci-lint: enable errorlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 16, 2024
1 parent d594f7f commit d4ef2cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
linters:
enable:
- errname
- errorlint
- exhaustive
- gci
- gochecknoglobals
Expand Down
2 changes: 1 addition & 1 deletion cmd/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "..") {
Expand Down

0 comments on commit d4ef2cf

Please sign in to comment.