# 使用 Homebrew, Nix 安装 cmake-lint

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

## 安装

```sh
sudo av install brew:cmake-lint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cmake-lint
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cmake-lint
```

  证据: nixpkgs package indexes: pkgs/by-name/cm/cmake-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:cmake-lint
- **软件包管理器:** Homebrew
- **版本:** 1.4.3
- **来源摘要:** Static code checker for CMake files
- **主页:** <https://github.com/cmake-lint/cmake-lint>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cmakelint (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.4.3
## 项目历史与用法

cmake-lint is a Python static style checker for CMake files. Its README describes a cmakelint command that parses CMake files, reports style issues, supports filters, and can be used directly or through pre-commit.

### 项目历史

The current GitHub repository describes itself as a fork of richq/cmake-lint created to continue maintenance. The bundled changelog records that version 1.2 moved to GitHub and version 1.2.01 was published on PyPI; the GitHub API reports the current maintenance repository was created in June 2019.

### 采用历史

The project is distributed as the cmakelint Python package and the README gives pip installation instructions. The batch input lists Homebrew and Nix packages, and the README includes a pre-commit hook configuration, which makes it easy to adopt in project-level lint workflows.

### 使用方式

Users run cmakelint with one or more CMake files and optional --config or --filter arguments. The README documents .cmakelintrc lookup in the working directory, XDG-style config paths, and the home directory, plus inline lint_cmake pragmas for per-file filter overrides.

### 为什么软件包爱好者会关心

cmake-lint matters as a small, packageable CMake hygiene tool: it gives package maintainers and CI pipelines a lightweight way to enforce CMake style without pulling in a full build-system rewrite or editor integration.

### 时间线

- 2012: changelog records version 1.2 moving to GitHub and 1.2.01 being published on PyPI.
- 2019: current maintenance fork repository is created.
- 2024: version 1.4.3 adds Python 3.12 support and is published as the latest GitHub release checked.

### Related projects

- cmake-lint is related to CMake, pre-commit, and other CMake formatting or editor tools such as cmake-format and cmake-language-server, but it remains focused on static lint checks.

### 来源

- <https://github.com/cmake-lint/cmake-lint#readme>
- <https://raw.githubusercontent.com/cmake-lint/cmake-lint/master/CHANGELOG.md>
- <https://api.github.com/repos/cmake-lint/cmake-lint>
- <https://api.github.com/repos/cmake-lint/cmake-lint/releases>
- <https://pypi.org/pypi/cmakelint/json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $PWD/.cmakelintrc, ~/.config/cmakelintrc, $XDG_CONFIG_DIR/cmakelintrc, ~/.cmakelintrc
## 其他软件包管理器记录

- Nix - cmake-lint: normalized package name match | nixpkgs package indexes: pkgs/by-name/cm/cmake-lint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/cmake-lint.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cmake-lint.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
