# square/cane

Code quality threshold checking as part of your build

Repository: https://github.com/square/cane
Canonical: https://ross.abutalabs.com/products/cane
Language: Ruby
License: NOASSERTION
License Family: other
Last push: 2023-02-06T23:14:03+00:00

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

## Adoption (not part of the score)
Stars 1305, forks 73 (observed 2026-08-28T04:04:18.668443+00:00)

## What it is
Cane is a Ruby CLI tool that fails your build if code quality thresholds (ABC complexity, style, documentation coverage) are not met. It is now in maintenance mode, with the README recommending RuboCop for new projects.

## Use cases
- fail CI build when code complexity exceeds a threshold
- enforce line length and style rules in a Ruby project
- require documentation comments on classes before merging
- add a code quality gate to a build task
- check that a metric value in a file stays under a limit

## When to choose
- you maintain a legacy Ruby project already using cane
- you want a minimal, fast quality threshold checker with zero config

## When to avoid
- starting a new Ruby project - use RuboCop instead
- you need comprehensive linting beyond simple thresholds

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: testing, linter, ci-cd
- domain: developer-tools, testing
- platform: ruby, cli
- tags: code-quality, quality-gate, abc-metric, ruby-gem, build-check, command-line

## Member repositories
- square/cane (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.668443+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-30T04:51:04.986276+00:00, confidence not recorded.
  - readme: https://github.com/square/cane (fetched 2026-08-28T04:04:18.668443+00:00, sha aac8c7b86687)
- Data as of 2026-08-30T08:39:29.467469+00:00.
