StyleCop的命令行使用方法

StyleCop提供了简单和有效的方式来对项目的代码编写风格进行检查。StyleCop可以多种方式运行,可以插件的方式在Visual StudioIDE中运行;也可以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.

 

 

你可能感兴趣的:(cache,File,report,search,Path,compilation)