How to run analysis on command line |
How to run analysis on command line |
All tools (code check, dependency analysis, metrics analysis and inventory) can be executed separately on command line. SPCAF comes with the following command line tools
Command line tool | Description |
---|---|
spcop.exe | Rule Check |
spmetrics.exe | Metrics Analysis |
spinventory.exe | Inventory Analysis |
spdepend.exe | Dependency Analysis |
spcaf.exe | All analysis types |
The command line tools can be found in installation directory of SPCAF (typically 'C:\Program Files (x86)\SPAF\'). Open command prompt and switch to the SPCAF installation directory. Running one of the command line tools without arguments shows the following information:
NOTE: The SPCAF command line tools cannot be started from a DOS command path, e.g. 'C:\progra~2\SPCAF\spcop.exe'. Always use the windows path 'C:\Program Files (x86)\SPAF\spcop.exe'.
Start one of the command line tools with the following arguments:
Argument | Description |
---|---|
r, report | Report generator that will be used to generate the output file. V
isual Studio compatible console output will be generated regardless of this argument.
Possible values: None, HTML, XML, CSV. Default: HTML |
o, output | Output file with processed data when a report generator is specified.
Default: [WorkingDirectory]\SPCAFMetricsReport.[ReportType] |
i, inputfiles | Required. WSP files that should be included in the analysis. WSP files can be separated with a semincolon ;
Sample: test1.wsp;"test2 with spaces.wsp" |
s, settings | Name of SPCAF ruleset file. Possible ruleset files are store in installation folder of SPCAF, folder "RuleSets"
For a custom settings file the path to the settings could be provided ie. c:\settings.SPCAF. Default: no settings file |
t, tempdir | Directory into which all temporary files are extracted.
Sample: c:\temp\ Default: User Temp Folder |
l, logfile | Path where the log file should be written to
Sample: c:\temp\spcaf.log Default: Configured value in log4net.config file |
v, verbosity | Specifies the amount of information to display in the output window:
quiet: No output minimal: only notifications are listed (typically used in automated builds) normal: notifications and status information is listed Default: normal |
help | Display this help screen. |
The following command runs a code check for all WSP files in folder 'C:\wspfiles' and will create in directory 'C:\outputdir\' the 2 reports 'outputfilename.html' and 'outputfilename.xml'.
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |