diff --git a/codecov.yml b/codecov.yml index 465cfd70..854ad482 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,11 +1,11 @@ coverage: precision: 5 round: down - range: "65...100" + range: "40...100" status: patch: default: - target: 65% - threshold: 5% + target: 40% + threshold: 35% base: auto diff --git a/pkg/config/config.go b/pkg/config/config.go index 13d457f5..a4d88939 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -614,7 +614,16 @@ func (c *Config) subPackages( } } - pathLog.Debug().Msg("subdirectory has a .go file, adding this path to packages config") + pathLog.Debug().Msg("subdirectory has a .go file") + goModExists, err := path.Parent().Join("go.mod").Exists() + if err != nil { + pathLog.Err(err).Msg("failed to determine if go.mod exists") + return err + } + if goModExists { + pathLog.Debug().Msg("found .go file, but go.mod exists. Skipping.") + return pathlib.ErrWalkSkipSubtree + } subdirectoriesWithGoFiles = append(subdirectoriesWithGoFiles, path.Parent()) visitedDirs[path.Parent().String()] = nil }