Skip to content

dburriss/hotspot

Repository files navigation

Hotspot

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.

Run of hotspot recommend

Support of multiple languages

Installation

Prerequisite: dotnet sdk

dotnet tool install -g hotspot

Basic Usage

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.

Features

  • 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

Using SCC

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

Usage

dotnet hotspot recommend -r /GitRepo --scc-file /scc_out.json

Language support

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.

About

A dotnet command-line tool for analysing code risks like high complexity, size, and bus factor.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published