在軟件測試中有關StyleCop的命令行使用方法
StyleCop提供了簡單和有效的方式來對項目的代碼編寫風格進行檢查。StyleCop可以多種方式運行,可以插件的方式在VisualStudio的IDE中運行;也可以MSBuild任務的方式運行,可整合到程序構建流程中;或者以命令行的方式運行,可針對一個或多個代碼文件進行檢查。
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.
原文轉自:http://www.kjueaiud.com