diff --git a/check/check.go b/check/check.go index 6ac029c..df3df81 100644 --- a/check/check.go +++ b/check/check.go @@ -49,9 +49,8 @@ func Run(dir string) (ChecksResult, error) { err = RenameFiles(skipped) if err != nil { - log.Println("Could not remove files:", err) + log.Println("Could not rename files:", err) } - defer RevertFiles(skipped) checks := []Check{ GoFmt{Dir: dir, Filenames: filenames}, diff --git a/check/utils.go b/check/utils.go index 72e8183..6ce6991 100644 --- a/check/utils.go +++ b/check/utils.go @@ -82,19 +82,6 @@ func RenameFiles(names []string) (err error) { return err } -// RevertFiles removes the ".grc.bk" extension from files -func RevertFiles(names []string) (err error) { - for i := range names { - tmpErr := os.Rename(names[i]+".grc.bk", names[i]) - if tmpErr != nil { - // save this error, but still continue with other files - err = tmpErr - } - } - - return err -} - // lineCount returns the number of lines in a given file func lineCount(filepath string) (int, error) { out, err := exec.Command("wc", "-l", filepath).Output()