软件测试:StyleCop的命令行使用方法

发表于:2008-1-18 17:15

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:陈能技    来源:陈能技的博客

  StyleCop提供了简单和有效的方式来对项目的代码编写风格进行检查。StyleCop可以多种方式运行,可以插件的方式在Visual Studio的IDE中运行;也可以MSBuild任务的方式运行,可整合到程序构建流程中;或者以命令行的方式运行,可针对一个或多个代码文件进行检查。

StyleCop的命令行使用方法:

Usage:
   StyleCopCmd [options] [path]

Options:
   -a         Process all source files found under the start path (default)
   -cs {file} Analyze the specified file.
   -f         Perform a full analyze (ignore cached results)
   -u         Do not write results cache files.
   -o {file}  Apply the given StyleCop options file to all projects and files
   -l {file}  Save violation report at the given location. If omitted, saves
              StyleCopViolations.xml in the current directory.
   -p {path}  Attempts to discover StyleCop AddIn modules under the given
              path. This flag may be specified multiple times to search under
              multiple paths
   -i         Ignore the default StyleCop AddIn path under the All Users\Applica
tion Data folder

Conditional Compilation Flags:
   -define:FLAG1;FLAG2;FLAG3

Path:
   Specifies the path to begin search for source files.
   If this is omitted, uses the current directory as the
   start path.

《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号