# fzipp/gocyclo

Calculate cyclomatic complexities of functions in Go source code.

Repository: https://github.com/fzipp/gocyclo
Canonical: https://ross.abutalabs.com/products/gocyclo
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: cyclomatic-complexity, code-metrics, go, golang, mccabe-metric, mccabe, software-metrics
Last push: 2025-12-27T21:31:09+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 59, release rhythm 35, longevity 100
- inputs: {"age_days": 4607, "days_push": 249, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1598, forks 97 (observed 2026-08-28T04:05:09.175147+00:00)

## What it is
gocyclo is a command-line tool that calculates the cyclomatic complexity of functions in Go source code. It helps identify complex functions that may need refactoring by measuring the number of linearly independent paths through each function.

## Use cases
- measure cyclomatic complexity of go functions
- find most complex functions in a go codebase
- enforce complexity thresholds in ci
- identify go code that needs refactoring
- compute average code complexity of a project
- exclude test or vendor files from complexity analysis

## When to choose
- you maintain a Go codebase and want to track code quality metrics
- you want a simple, fast CLI to flag overly complex functions
- you need to gate CI on a maximum complexity threshold

## When to avoid
- you need complexity analysis for languages other than Go
- you need broader static analysis beyond complexity metrics

## Facets
- artifact type: cli-tool
- maturity: stable
- function: developer-tools, linter, testing
- domain: developer-tools, performance
- platform: go, cli, cross-platform
- tags: cyclomatic-complexity, code-metrics, static-analysis, code-quality, mccabe, golang, command-line

## Member repositories
- fzipp/gocyclo (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.175147+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:53:16.741772+00:00, confidence not recorded.
  - readme: https://github.com/fzipp/gocyclo (fetched 2026-08-28T04:05:09.175147+00:00, sha b2581cff36ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
