Skip to content

Fix/scan recursive multiple repos#11

Merged
anIcedAntFA merged 2 commits intomainfrom
fix/scan-recursive-multiple-repos
Jan 15, 2026
Merged

Fix/scan recursive multiple repos#11
anIcedAntFA merged 2 commits intomainfrom
fix/scan-recursive-multiple-repos

Conversation

@anIcedAntFA
Copy link
Copy Markdown
Owner

📝 Description

  • Refactor ScanGitRepos() to use scanRecursive() helper function
  • Support nested directory structures like github.com/{org}/{repo}
  • Scan up to 2 levels deep to detect repos in subdirectories
  • Skip scanning inside git repos to avoid nested repo detection
  • Improve error handling: continue scanning even if subdirectory fails
  • Add unit test for scanner
  • Support --max-depth flag option

🔗 Related Issue

Closes #(issue number)

👥 Reviewers

@anIcedAntFA

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Code refactoring (no functional changes)
  • 🎨 Style/UI update
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Configuration update (CI/CD, linters, build tools)
  • 🧹 Chore (dependencies, cleanup, maintenance)
  • 🔒 Security fix
  • ♿ Accessibility improvement

🧪 How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing

Test Configuration:

  • OS: Arch Linux
  • Go version: 1.25.5

📸 Screenshots (if applicable)

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have run gofumpt -l -w . to format my code
  • I have run golangci-lint run and fixed any issues

📚 Additional Notes

- Refactor ScanGitRepos() to use scanRecursive() helper function
- Support nested directory structures like github.com/{org}/{repo}
- Scan up to 2 levels deep to detect repos in subdirectories
- Skip scanning inside git repos to avoid nested repo detection
- Improve error handling: continue scanning even if subdirectory fails

Before: Only scanned 1 level (root + immediate subdirs)
After: Scans up to 2 levels recursively

Example impact:
- ~/workspace/github.com: 0 repos → 23 repos ✅
- ~/workspace/github.com/anIcedAntFA: 20 repos → 21 repos ✅
- ~/workspace/github.com/anIcedAntFA/gohome: 1 repo ✅ (unchanged)
@anIcedAntFA anIcedAntFA self-assigned this Jan 15, 2026
@anIcedAntFA anIcedAntFA added the bug Something isn't working label Jan 15, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/scanner/scanner.go 73.91% 3 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@anIcedAntFA anIcedAntFA merged commit 42c45a0 into main Jan 15, 2026
7 checks passed
@anIcedAntFA anIcedAntFA deleted the fix/scan-recursive-multiple-repos branch January 15, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant