cmake文件的静态代码检查器

cmakelint的Python项目详细描述


cmakelint

Build StatusPyPIPyPI - DownloadsPyPI - Downloads

cmakelint分析cmake文件并报告样式问题。

cmakelint需要python。

安装

要从pypi安装cpplint,请运行:

。代码块::bash

$ pip install cmakelint

用法

Syntax: cmakelint [--config=file] [--filter=-x,+y] <file> [file] ...
filter=-x,+y,...
  Specify a comma separated list of filters to apply

config=file
  Use the given file for configuration. By default the file
  $HOME/.cmakelintrc is used if it exists.  Use the value "None" to use no
  configuration file (./None for a file called literally None)
  Only the option "filter=" is currently supported in this file.

运行不带筛选器的--filter=选项以查看可用选项。目前 这些是:

convention/filename
linelength
package/consistency
readability/logic
readability/mixedcase
readability/wonkycase
syntax
whitespace/eol
whitespace/extra
whitespace/indent
whitespace/mismatch
whitespace/newline
whitespace/tabs

例如.cmakelintrc文件如下:

filter=-whitespace/indent

使用主目录中的这个文件,运行这些命令将 相同效果:

cmakelint.py CMakeLists.txt
cmakelint.py --filter=-whitespace/indent CMakeLists.txt

输出状态代码

程序应退出以下状态代码:

  • 0如果一切顺利
  • 1如果发出错误消息
  • 32关于使用错误

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java IntelliJ找不到依赖项选项卡   java向字符串数组string[]添加元素并在Junit中测试结果   如何在eclipse中获取活动java项目的名称   如何使用java在mysql中插入时间   java ArrayList更新了插入一行,但Jtable仍然没有刷新   如何在JavaSwing中命名坐标(点)   java Matcher/模式不打印   java错误地设置了arraylist   使用UsernamePasswordCredential提供程序的java列表Azure AD   java在HTTP请求中设置UTC时间   未加载事件:jquery完整日历Java集成   java Maven插件依赖项无法从内部repo解析依赖项   Maven更新重置Java版本   java如何向中添加图片。带有Apache POI XWPF的docx,但不指定其大小   Java最大函数递归