Skip to content

bellmano/dotnet-hotspots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ dotnet-hotspots

Coverage Security Rating Maintainability Rating Reliability Rating Bugs Vulnerabilities Code Smells

dotnet-hotspots is a .NET global tool that analyzes your Git repository's commit history to identify the most frequently changed files β€” often a sign of bug-prone areas, architectural bottlenecks, or critical business logic that needs extra attention.

πŸ“· Example

Top 10 Hot Files β€” Code Files Only
================================================================================
Rank   Changes  File Path
--------------------------------------------------------------------------------
1      312      src/Services/UserService.cs
2      287      src/Data/ApplicationDbContext.cs
3      201      src/Controllers/AuthController.cs
4      198      src/Services/OrderService.cs
5      176      src/Models/User.cs
6      154      src/Services/PaymentService.cs
7      143      src/Controllers/OrderController.cs
8      121      src/Repositories/UserRepository.cs
9      115      src/Services/EmailService.cs
10     98       src/Models/Order.cs
================================================================================
Code files found: 143  |  Total files in repo: 381  |  Use --all to see everything

πŸš€ Quick Start

Installation

Install as a .NET global tool:

dotnet tool install --global dotnet-hotspots-tool

Basic Usage

Navigate to any Git repository and run:

dotnet-hotspots

That's it! You'll see the top 30 most frequently changed files.

πŸ“š Usage Examples

Show top 10 hot files

dotnet-hotspots --10

Note: --<number> accepts any positive integer β€” --10, --50, --100, etc. Without this flag the default is top 30.

Show top 50 hot files

dotnet-hotspots --50

Show all files (including docs, configs, build artifacts, etc.)

dotnet-hotspots --all

Get help

dotnet-hotspots --help

Show version

dotnet-hotspots --version

πŸ› οΈ Requirements

  • .NET 8.0+ (for installation)
  • Git repository (the tool analyzes Git history)
  • Works on Windows, macOS, and Linux

πŸ“¦ Installation Options

Global Tool (Recommended)

dotnet tool install --global dotnet-hotspots-tool

Update to Latest Version

dotnet tool update --global dotnet-hotspots-tool

Uninstall

dotnet tool uninstall --global dotnet-hotspots-tool

Local Installation (Per Project)

dotnet tool install dotnet-hotspots-tool

🧠 How It Works

dotnet-hotspots analyzes your repository's commit history using git log to:

  1. Extract file paths from all commits
  2. Count occurrences of each file across commits
  3. Rank files by frequency of changes
  4. Display results in a clean, readable format

The tool focuses on commit frequency rather than lines changed, giving you insight into which files require the most attention from developers.

πŸ” Smart Filtering

By default, dotnet-hotspots filters out non-code files so the results focus on what matters. Use --all to disable filtering and see everything.

Excluded folders: bin, obj, dist, build, publish, packages, .git, .vs, .idea, .nuget, .vscode, node_modules

Excluded extensions: .md, .txt, .pdf, .log, .lock, .sum

Excluded files: .gitignore, .gitattributes, .editorconfig, .csharpierignore, .dockerignore, .env, Makefile, LICENSE, Dockerfile (and Dockerfile.* variants)

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

πŸ“£ Issues or Suggestions

Any issues or suggestions, please create an issue on Github.

β˜• Buy me a coffee

Donations are welcome to appreciate my work and to keep this project alive, but isn't required at all.

About

.NET global tool that analyzes your Git repository's commit history to identify the most frequently changed files

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages