SharePoint code analysis can also be executed through a YAML build. In order to run SPCAF, you must first upload it to your build environment. First, you will need to download SPCAF from our downloads page.
You will then need to upload the task to your build environment. Details are on doing this can be found below:
Once uploaded to your build you will then need to edit your build and paste the following code into your environment.
Once the code has been pasted in to the build, you will need to edit the parameters below before running the build:
|spcafinputdirectory||Enter the location to be used for analysis|
|spcafoutputdirectory||Enter the location to where you want your reports and results to go.|
|spcaflicense||Enter the location to the SPCAF License|
|spcafsettings||Enter the location to your custom ruleset or specify the name of a standard ruleset.|
|spcaflogfile||Enter the name of the log file.|
|spcafoutputfile||Enter the name for the results file|
|spcafverbosity||Specifies the amount of information to display in the output window:
|spcaftempfolder||Directory into which all temporary files are extracted.|
|spcafcustomrules||Enter the location to your custom rules.|
The following parameters can be omitted depending on how you want SPCAF to run in the build:
|spcafreportCSV||This parameter can be omitted if you do not want the report to be generated as .csv.|
|spcafreportXML||This parameter can be omitted if you do not want the report to be generated as .xml.|
|spcafreportDGML||This parameter can be omitted if you do not want the report to be generated as .dgml.|
|spcafcustomrules||This parameter can be omitted if you do not want to use custom rules.|
|spcaftreatErrorsAsWarnings||This parameter can be omitted if you do not want the build to stop if an error is found.|
Once all parameters have been edited or removed, save and run the build.