macOS
brew install gnu-complexitylocal Homebrew formula metadata
brew
Measures complexity of C source. Version 1.13 via Homebrew; verified from local package data.
install
brew install gnu-complexitylocal Homebrew formula metadata
sudo apt install complexityDebian stable package indexes · complexity · source: deb.debian.org
nix profile install nixpkgs#complexitynixpkgs package indexes · pkgs/by-name/co/complexity/package.nix · source: api.github.com
sudo zypper install complexityopenSUSE Tumbleweed package metadata · complexity · source: download.opensuse.org
overview
Measures complexity of C source
history
GNU Complexity is a small GNU static-analysis tool for measuring the complexity of C functions, designed as a more human-comprehension-oriented alternative to simple McCabe-style path counts.
The GNU Complexity manual documents version 0.4 as of May 2011 and describes a tool by Bruce Korb for analyzing C function complexity. Its rationale is explicit: McCabe-style scoring and `pmccabe` are useful for testing effort, but GNU Complexity tries to better rank functions that are difficult for humans to understand by considering length, nesting, switch bodies, and complicated boolean expressions.
GNU Complexity has a narrow adoption footprint compared with larger GNU developer tools. Its significance is in the code-review and maintenance niche: it gives C maintainers a command-line metric that can point to suspicious functions in unfamiliar code, estimate testing or comprehension effort, and produce sorted score tables and histograms.
Practitioners run `complexity` over C source files to report procedure scores, line counts, source locations, and optional histograms. The manual's example runs the tool against its own source with a low threshold, illustrating use as a quick audit tool for ranking functions before refactoring or review.
For package nerds, GNU Complexity is interesting because it embodies a Unix-tool approach to maintainability: one command, text output, tunable thresholds, and a documented scoring model. It is useful in distributions as a lightweight companion to older tools such as `pmccabe` rather than as a large static-analysis framework.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
complexity | cli | global executable | |
cx-vs-mc | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://www.gnu.org/software/complexity/
install metadata
| Package key | brew:gnu-complexity |
|---|---|
| Version | 1.13 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/gnu-complexity |
| Homepage | https://www.gnu.org/software/complexity/ |
| Repository | https://git.savannah.gnu.org/cgit/complexity.git |
| Upstream docs | https://www.gnu.org/software/complexity/manual |
| License | GPL-3.0-or-later |
| Source archive | https://ftpmirror.gnu.org/gnu/complexity/complexity-1.13.tar.xz |
| Dependencies | autogen |
| Build dependencies | autoconf, automake |
| Bottle | available (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gnu-complexity |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
complexity 1.13-1+b1
tool for analyzing the complexity of C program functions
https://gnu.org/software/complexity
sudo apt install complexitycomplexity-doc 1.13-1
tool for analyzing the complexity of C program (documentation)
https://gnu.org/software/complexity
sudo apt install complexity-doccomplexity
nix profile install nixpkgs#complexitycomplexity 1.13-1
tool for analyzing the complexity of C program functions
https://gnu.org/software/complexity
sudo apt install complexitycomplexity-doc 1.13-1
tool for analyzing the complexity of C program (documentation)
https://gnu.org/software/complexity
sudo apt install complexity-doccomplexity 1.13-1.7
C source code complexity computation utility
https://www.gnu.org/software/complexity/
sudo zypper install complexitysource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.