Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bkielbasa/cyclop
https://github.com/bkielbasa/cyclop
go golang linter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bkielbasa/cyclop
- Owner: bkielbasa
- License: mit
- Created: 2020-05-04T10:53:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-16T17:00:46.000Z (about 2 months ago)
- Last Synced: 2024-10-19T10:53:01.257Z (about 2 months ago)
- Topics: go, golang, linter
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 50
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-github-star - cyclop
README
# cyclop
[![Coverage Status](https://coveralls.io/repos/github/bkielbasa/cyclop/badge.svg?branch=master)](https://coveralls.io/github/bkielbasa/cyclop?branch=master)
Cyclop calculates cyclomatic complexities of functions or packages in Go source code.
## Why cyclop?
Cyclop, compared to [other alternative](https://github.com/fzipp/gocyclo), calculates both function and package cyclomatic complexity.
## Usage
```
go get github.com/bkielbasa/cyclop/cmd/cyclopcyclop .
```Available parameters:
* `-maxComplexity int` - the max complexity calculated for a single function. `10` by default
* `-packageAverage float64` - the average cyclomatic complexity for a package. If the value is higher than `0` it will raise an error if the average will be higher. `0` default.
* `-skipTests bool` - should checks be executed in tests files. `false` by default