From 971659f292166faa8eecc046ca007756b57520ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20R=C3=BChl?= Date: Mon, 9 Sep 2024 09:25:19 +0200 Subject: [PATCH] fix: display path on error (#163) --- reviser/dir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reviser/dir.go b/reviser/dir.go index 69275b2..fb7613f 100644 --- a/reviser/dir.go +++ b/reviser/dir.go @@ -135,7 +135,7 @@ func (d *SourceDir) walk(callback walkCallbackFunc, options ...SourceFileOption) if isGoFile(path) && !dirEntry.IsDir() && !d.isExcluded(path) { content, _, hasChange, err := NewSourceFile(d.projectName, path).Fix(options...) if err != nil { - return fmt.Errorf("failed to fix: %w", err) + return fmt.Errorf("failed to fix %s: %w", path, err) } return callback(hasChange, path, content) }