@cpplint/cli

中文文档
0.1.0发布于 2025/09/22BSD-3-Clause零依赖构建来源已验证近 30 天下载 2.2万

Fast, cross-platform C++ style checker using cpplint-cpp

原始使用文档

cpplint

Fast, cross-platform C++ style checker for Node.js compatible runtimes.

Under the hood you'll find cpplint-cpp, a C++ re-implementation of the original Python-based cpplint.

Prebuilt binaries are made available for Linux, macOS and Windows running on x64 and ARM64 CPUs. These are currently re-packaged copies of the upstream wheels for version 0.3.0.

There is no runtime dependency on Python or clang.

Install

To run from the command line:

npx @cpplint/cli --help

To add to a project's devDependencies:

npm install --save-dev @cpplint/cli

To use as a lifecycle script in package.json:

{
  "scripts": {
    "lint:cpp": "cpplint src/*"
  }
}

Configure

Rules are specified in one or more CPPLINT.cfg files, which typically contain a list of filters to apply or ignore.

set noparent

linelength=120

filter=-build/include
filter=+build/include_subdir
...

版本与发布记录

@cpplint/cli 共发布 4 个版本,首次发布于 2025/09/22;过去 12 个月发布了 0 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.0latest2025/09/221.1 年前
0.0.1-rc.2rc2025/09/221.1 年前
0.0.1-rc.12025/09/221.1 年前
0.0.1-rc.02025/09/221.1 年前

关于 @cpplint/cli 的常见问题

@cpplint/cli 是什么?

Fast, cross-platform C++ style checker using cpplint-cpp

如何安装 @cpplint/cli?

在项目目录运行 npm install @cpplint/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cpplint,可以用 npx cpplint 直接运行。

@cpplint/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cpplint__cli 是否存在。

@cpplint/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cpplint/cli 可以商用吗?

@cpplint/cli 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@cpplint/cli 的下载量有多少?

根据 npm 官方下载统计,@cpplint/cli 在 2026/10/11 – 2026/11/09 这 30 天内被下载 21,846 次,日均约 728 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cpplint/cli 还在维护吗?

最新版本 0.1.0 发布于 2025/09/22(1.1 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/09/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。