Skip to content

A C#-based due diligence tool that analyzes Git repositories for engineering health, contributor distribution, code churn hotspots, and maturity indicators. Designed for investors, architects, and engineering leaders who need objective insights into software quality and development practices.

Notifications You must be signed in to change notification settings

develop-brightly/repo-scan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoScan - Git Repository Analysis Tool

A comprehensive repository analysis tool that extracts metrics and insights from Git repositories to assess health, quality, and development patterns.

Features

Repository Health

  • Commit history analysis
  • Branch and tag statistics
  • Activity tracking (90-day windows)
  • Language detection and LOC estimation

Contributor Analytics

  • Bus factor calculation
  • Top contributor identification
  • Active contributor tracking
  • Contributor activity trends

Code Quality Metrics

  • Test-to-code ratio
  • Large file detection
  • Comment density analysis
  • Average file size metrics

Collaboration Insights

  • Knowledge silo detection
  • Dormant contributor identification
  • Onboarding effectiveness
  • Cross-contributor collaboration patterns

Commit Pattern Analysis

  • Commit size distribution
  • Merge vs. regular commits
  • Revert frequency
  • Commit message quality (conventional commits)
  • Time-based patterns (hour/day)
  • Bug fix tracking

Documentation Assessment

  • README presence
  • Architecture documentation
  • Runbooks and guides
  • API documentation
  • Onboarding score calculation

Dependencies & Architecture

  • Dependency detection (npm, NuGet, pip, Go modules, etc.)
  • Framework identification
  • Containerization usage
  • Infrastructure as Code detection
  • Cloud provider identification

CI/CD Analysis

  • CI system detection (GitHub Actions, Azure Pipelines, GitLab CI, etc.)
  • Configuration validation

Branch Management

  • Stale branch detection
  • Branch lifespan analysis
  • Active branch tracking

Trend Analysis

  • Monthly commit trends
  • Growth metrics (LOC, commits, contributors)
  • Historical patterns

Hotspot Identification

  • File churn analysis
  • High-change area detection

Architecture

The project follows clean architecture principles with clear separation of concerns:

RepoScan/
├── Program.cs                    # Entry point and orchestration
├── Models/                       # Data models
│   ├── AnalysisResult.cs        # Result models and DTOs
│   ├── ContributorStat.cs       # Contributor data model
│   └── RepoFile.cs              # File representation
├── Analyzers/                   # Analysis logic
│   ├── CommitAnalyzer.cs        # Commit pattern analysis
│   ├── ContributorAnalyzer.cs   # Contributor metrics
│   ├── FileAnalyzer.cs          # File and quality analysis
│   ├── DocumentationAnalyzer.cs # Documentation assessment
│   ├── ArchitectureAnalyzer.cs  # Architecture detection
│   ├── CiCdAnalyzer.cs          # CI/CD configuration
│   ├── DependencyAnalyzer.cs    # Dependency parsing
│   ├── BranchAnalyzer.cs        # Branch management
│   └── TrendAnalyzer.cs         # Trend calculation
├── Services/                    # Application services
│   ├── RepositoryAnalysisService.cs  # Main analysis orchestration
│   └── OutputService.cs         # JSON output formatting
└── Utilities/                   # Helper utilities
    ├── LanguageDetector.cs      # File extension to language mapping
    ├── FileClassifier.cs        # File type classification
    └── Logger.cs                # Logging utilities

Usage

# Analyze current directory
dotnet run

# Analyze specific repository
dotnet run /path/to/repository

# Save output to file (logs still visible)
dotnet run /path/to/repository > output.json

Output

The tool outputs comprehensive JSON containing:

  • Repository metadata
  • Health metrics
  • Contributor statistics
  • Quality indicators
  • Documentation scores
  • Architecture details
  • Commit patterns
  • Collaboration metrics
  • Dependency information
  • Branch analysis
  • Growth trends
  • Hotspot files

Logging

All progress and diagnostic messages are written to stderr, keeping the JSON output on stdout clean for piping or redirection.

Dependencies

  • LibGit2Sharp - Git repository access and analysis
  • .NET 10.0 - Runtime framework

Building

# Build
dotnet build

# Run tests (if available)
dotnet test

# Publish
dotnet publish

Extending

To add new analysis features:

  1. Create a new analyzer in Analyzers/
  2. Add corresponding model classes in Models/AnalysisResult.cs
  3. Update RepositoryAnalysisService to call the new analyzer
  4. The output will automatically include the new metrics in JSON

License

[Add your license here]

About

A C#-based due diligence tool that analyzes Git repositories for engineering health, contributor distribution, code churn hotspots, and maturity indicators. Designed for investors, architects, and engineering leaders who need objective insights into software quality and development practices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published