A CLI tool that calculates the CRAP score (cyclomatic complexity x coverage) for Go projects.
- Repository: github.com/padiazg/go-crap
- Commit:
e38ff206b7f1920299e779d62a58ed094a261531· HEAD up to date - Analyzed: 2026-08-24T01:49:29-03:00 (6.7s)
- Engine: local · go-crap 0.5.1
go-crap command
go-crap scan --format json --no-progress --verbose -o tmp.json --coverage-profile .go-crap-cover.out ./...
Trend
History
| Date | Commit | Combined | Average | Funcs | Exceeded | Engine |
|---|---|---|---|---|---|---|
| 2026-08-24 | e38ff20 | 884.60 | 4.66 | 190 | 0 | local |
Top offenders
| Crap | Complexity | Coverage | Function | File |
|---|---|---|---|---|
| 19.12 | 6 | 28.6% | exprString | internal/complexity/analyze.go:196 |
| 19.00 | 19 | 100.0% | runScan | cmd/scan.go:116 |
| 17.12 | 17 | 92.6% | *TableFormatter.Format | internal/report/table.go:34 |
| 17.00 | 17 | 100.0% | *Scanner.Scan | internal/coverage/scanner.go:64 |
| 12.49 | 12 | 85.0% | *GithubFormatter.Format | internal/report/github.go:13 |
| 12.00 | 3 | 0.0% | *GoPrettyReporter.SetDetail | internal/progress/gopretty.go:69 |
| 12.00 | 3 | 0.0% | *PRCommentFormatter.writeNewFunctionsSection | internal/report/pr_comment.go:127 |
| 12.00 | 3 | 0.0% | filterNewFunctions | internal/report/pr_comment.go:255 |
| 12.00 | 3 | 0.0% | *Entries.ForTable | internal/scan/entries.go:137 |
| 11.00 | 11 | 100.0% | AnalyzeFiles | internal/complexity/analyze.go:66 |