codelinter同时支持使用命令行执行代码检查与修复,可将codelinter工具集成到门禁或持续集成环境中。
codelinter命令行格式为:
codelinter [options] [dir]
options:可选配置,请参考表1。
dir:待检查的工程根目录;为可选参数,如不指定,默认为当前上下文目录。
指令 |
说明 |
---|---|
--config/-c <filepath> |
指定执行codelinter检查的规则配置文件,<filepath>指定执行检查的规则配置文件位置。 |
--fix |
设置codelinter检查同时执行QuickFix。 |
--format/-f |
设置检查结果的输出格式。目前支持default/json/xml/html四种格式;不指定时,默认是default格式(文本格式)。 |
--output/-o <filepath> |
指定检查结果保存位 |