summaryrefslogtreecommitdiff
path: root/goSrcScan.go
diff options
context:
space:
mode:
Diffstat (limited to 'goSrcScan.go')
-rw-r--r--goSrcScan.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/goSrcScan.go b/goSrcScan.go
index 6670259..5599c46 100644
--- a/goSrcScan.go
+++ b/goSrcScan.go
@@ -51,7 +51,6 @@ func (f *Forge) ScanGoSrc() (bool, error) {
func gitDirectoriesNew(srcDir string) ([]string, error) {
var all []string
var trip bool
- reposfile := filepath.Join(srcDir, "repos.pb")
err := filepath.WalkDir(srcDir, func(path string, d os.DirEntry, err error) error {
if err != nil {
// Handle possible errors, like permission issues
@@ -62,9 +61,11 @@ func gitDirectoriesNew(srcDir string) ([]string, error) {
if d.IsDir() {
// log.Info("path is dir", path)
} else {
- if path == reposfile {
- // ignore repos.pb // todo: also ignore go.work // add config option to not warn about this
- } else {
+ _, fname := filepath.Split(path)
+ switch fname {
+ case "repos.pb":
+ case "go.work":
+ default:
// todo: figure out a way to do padding for init()
log.Info("WARNING: you have an untracked file outside of any .git repository:", path)
trip = true