Hotspot is a CLI tool for inspecting source code in a git repository for possible hotpots you may want to look into to decrease maintenance and potential risk.
Support of multiple languages
Prerequisite: dotnet sdk
dotnet tool install -g hotspot
Navigate to your git repository and run:
hotspot recommend
For help, run:
hotspot --help
You can also install it locally. See the dotnet tool docs
Sometimes Hotspot will have some trouble finding your git binary. It needs access to this to run the commands on your git repository to get history to inspect.
This is easy enough to fix. Just add an ENVIRONMENT variable: HOTSPOT_GIT_EXECUTABLE
= path/to/git/binary/file.
- Recommendations based on git changes & complexity
- Consumption of SCC to contribute metrics for analysis
- Integrate test coverage report in analysis
- Detailed control of the files that are included in the analysis
- Multiple supported output channels (console, API?, file) and formats (text, markdown, html, json)
- Multiple metric sources: SCC, Visual Studio's Metric.exe, SonarQube
SCC is an awesome cli tool for getting info like LoC and cyclomatic complexity for many different code programming languages. You can use it as follows to generate a file that can then be used by Hotspot.
scc --by-file --format json > scc_out.json
dotnet hotspot recommend -r /GitRepo --scc-file /scc_out.json
If using SCC, all languages supported by SCC are supported. If an SCC file is not used, Hotspot will count lines of code, attempting to ignore comments. The comment ignore is currently very rudimentary. See Limitations for a more in-depth description.