diff --git a/.golangci.yaml b/.golangci.yaml index bb1b199..0d39c79 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -32,6 +32,8 @@ linters-settings: - '8' - '9' - '10' + - '100' + - '1000' ignored-functions: - strings.SplitN - os.OpenFile @@ -82,6 +84,9 @@ linters: - exhaustruct - forcetypeassert - godox + - nakedret + - tagalign + - maligned # remove for new projects - errname - goerr113 diff --git a/housekeeping.go b/housekeeping.go index 52a8a45..13eb2e6 100644 --- a/housekeeping.go +++ b/housekeeping.go @@ -36,7 +36,7 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error { buildManager.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg} continue } else if err != nil { - log.Warningf("[HK] Problem fetching %s->%q from db: %v", fullRepo, path, err) + log.Warningf("[HK] error fetching %s->%q from db: %v", fullRepo, path, err) continue } diff --git a/utils.go b/utils.go index 99b534a..7df8246 100644 --- a/utils.go +++ b/utils.go @@ -132,7 +132,8 @@ func statusID2string(s dbpackage.Status) string { func cleanBuildDir(dir, chrootDir string) error { if stat, err := os.Stat(dir); err == nil && stat.IsDir() { - err = os.RemoveAll(dir) + rmCmd := exec.Command("sudo", "rm_chroot.py", dir) + _, err := rmCmd.CombinedOutput() if err != nil { return err }