Automic VaultAutomic Vault

brew

使用 Homebrew, apt, Nix, zypper 安装 gnu-complexity

查看 gnu-complexity 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install gnu-complexity

local Homebrew formula metadata

Linux

Debian apt已验证 · 92%
sudo apt install complexity

Debian stable package indexes · complexity · 来源: deb.debian.org

Nix已验证 · 92%
nix profile install nixpkgs#complexity

nixpkgs package indexes · pkgs/by-name/co/complexity/package.nix · 来源: api.github.com

openSUSE zypper已验证 · 92%
sudo zypper install complexity

openSUSE Tumbleweed package metadata · complexity · 来源: download.opensuse.org

概览

软件包摘要

Measures complexity of C source

命令和别名

  • complexity
  • cx-vs-mc

历史

项目历史与用法

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.

时间线

  • 2011: GNU Complexity web page and manual documented version 0.4.
  • 2011: Manual rationale compared GNU Complexity with `pmccabe` and explained its scoring model.

Related projects

  • `pmccabe` is the comparison point used throughout the GNU Complexity manual.
  • `unifdef` is discussed in the parsing model as a way to handle preprocessor-conditional source.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 12 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
complexitycli全局可执行文件
cx-vs-mccli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本1.13
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://www.gnu.org/software/complexity/

安装元数据

软件包元数据

软件包键brew:gnu-complexity
版本1.13
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/gnu-complexity
主页https://www.gnu.org/software/complexity/
仓库https://git.savannah.gnu.org/cgit/complexity.git
上游文档https://www.gnu.org/software/complexity/manual
许可证GPL-3.0-or-later
源码归档https://ftpmirror.gnu.org/gnu/complexity/complexity-1.13.tar.xz
依赖autogen
构建依赖autoconf, automake
Bottle可用 (于 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未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namegnu-complexity
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt92%

complexity 1.13-1+b1

tool for analyzing the complexity of C program functions

https://gnu.org/software/complexity

sudo apt install complexity
  • Section: devel
  • Architecture: amd64
  • Source Package: complexity
  • 2 依赖
  • installed executable or alias match
  • 匹配方式:Complexity
Debian stable package indexes · deb.debian.org · Debian stable package indexes: complexity from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

complexity-doc 1.13-1

tool for analyzing the complexity of C program (documentation)

https://gnu.org/software/complexity

sudo apt install complexity-doc
  • Section: doc
  • Architecture: all
  • Source Package: complexity
  • installed executable or alias match
  • 匹配方式:Complexity
Debian stable package indexes · deb.debian.org · Debian stable package indexes: complexity-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix92%

complexity

nix profile install nixpkgs#complexity
  • installed executable or alias match
  • 匹配方式:Complexity
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/co/complexity/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt92%

complexity 1.13-1

tool for analyzing the complexity of C program functions

https://gnu.org/software/complexity

sudo apt install complexity
  • Section: universe/devel
  • Architecture: amd64
  • 2 依赖
  • installed executable or alias match
  • 匹配方式:Complexity
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: complexity from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt92%

complexity-doc 1.13-1

tool for analyzing the complexity of C program (documentation)

https://gnu.org/software/complexity

sudo apt install complexity-doc
  • Section: universe/doc
  • Architecture: all
  • Source Package: complexity
  • installed executable or alias match
  • 匹配方式:Complexity
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: complexity-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
zypper92%

complexity 1.13-1.7

C source code complexity computation utility

https://www.gnu.org/software/complexity/

sudo zypper install complexity
  • License: GPL-3.0-or-later
  • Category: Development/Tools/Other
  • Architecture: x86_64
  • Source Package: complexity
  • 4 依赖
  • 1 提供
  • installed executable or alias match
  • 匹配方式:Complexity
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: complexity from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment