Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dburriss/hotspot
A dotnet command-line tool for analysing code risks like high complexity, size, and bus factor.
https://github.com/dburriss/hotspot
analysis command-line-tool complexity dotnet
Last synced: 21 days ago
JSON representation
A dotnet command-line tool for analysing code risks like high complexity, size, and bus factor.
- Host: GitHub
- URL: https://github.com/dburriss/hotspot
- Owner: dburriss
- License: mit
- Created: 2020-10-19T17:22:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-30T06:16:12.000Z (over 3 years ago)
- Last Synced: 2024-08-31T22:39:12.587Z (4 months ago)
- Topics: analysis, command-line-tool, complexity, dotnet
- Language: F#
- Homepage:
- Size: 2.97 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](/docs/static/images/recommend-run1.png)
Support of multiple languages
## Installation
Prerequisite: [dotnet sdk](https://dotnet.microsoft.com/download)
`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](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install)
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
- [x] Recommendations based on git changes & complexity
- [x] Consumption of [SCC](https://github.com/boyter/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](https://github.com/boyter/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 supportIf using SCC, all [languages supported by SCC](https://github.com/boyter/scc/blob/master/LANGUAGES.md) 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](/limitations.html) for a more in-depth description.