dump errors that were never tested

This commit is contained in:
Jeff Carr 2025-01-30 13:35:01 -06:00
parent 891017f2f9
commit 9c7572ca45
2 changed files with 7 additions and 2 deletions

View File

@ -64,24 +64,28 @@ func doStrict(repo *gitpb.Repo) error {
return err return err
} }
if repo.Exists("go.mod") { if !repo.Exists("go.mod") {
// well, if go mod init fails, then we will just error since 'go mod init' almost never fails // well, if go mod init fails, then we will just error since 'go mod init' almost never fails
return err return err
} }
if _, err := repo.RunQuiet([]string{"go", "mod", "tidy", "-go=" + golangVersion}); err == nil { if _, err := repo.RunQuiet([]string{"go", "mod", "tidy", "-go=" + golangVersion}); err != nil {
// I guess the thing to do, if go mod tidy fails, is to just leave the repo alone // I guess the thing to do, if go mod tidy fails, is to just leave the repo alone
// it's either primitive or could be a go support project but not in go // it's either primitive or could be a go support project but not in go
return nil return nil
} }
// the first time, it'll attempt to fix some stuff // the first time, it'll attempt to fix some stuff
log.Info("Running: updateToNewestReleases()")
cleanGoDepsCheckOk(repo) cleanGoDepsCheckOk(repo)
// try to trim junk // try to trim junk
log.Info("Running: trimGoSum()")
if err := trimGoSum(repo); err != nil { if err := trimGoSum(repo); err != nil {
log.Info(repo.GetGoPath(), "trimGoSum() failed", err) log.Info(repo.GetGoPath(), "trimGoSum() failed", err)
return err return err
} }
if repo.ParseGoSum() { if repo.ParseGoSum() {
log.Info(repo.GetGoPath(), "ParseGoSum() ok") log.Info(repo.GetGoPath(), "ParseGoSum() ok")
} else { } else {

View File

@ -53,6 +53,7 @@ func main() {
} }
if argv.Strict { if argv.Strict {
log.Info("Starting --strict mode")
if err := doStrict(check); err != nil { if err := doStrict(check); err != nil {
badExit(check, err) badExit(check, err)
} }