As standard SPCAF comes preset with 6 pre-configured rulesets which you can use to analyze your project. It is possible to even use your own custom Ruleset. These rulesets are as follows:
- All Analyzers
- Minimum Settings
- Minimum Recommended Settings
- Extended Recommended Settings (default)
- SharePoint Framework - All Rules
- Angular Application
For more details of these rules please click here.
Depending on the interface that you use SPCAF to analyze your project, please follow the instructions below:
In order to select the ruleset for analysis in the Client Application you will need to:
- Open the client and choose either a file or folder to analyze.
- On the "Configure Analysis" screen click below settings.
- Depending on whether you wish to use a default ruleset or a custom ruleset you will need to follow the details below.
Default rulesetA drop-down menu will appear, from here select the ruleset, you wish to use for analysis.
Custom RulesetAlternatively, if you wish to use a custom ruleset, on the same screen click the "Folder" icon to open a custom ruleset.
- Then click "Save" and run the analysis as normal.
In order to select the ruleset for analysis in the Visual Studio you will need to:
- Click on "Tools"
- Go to "SharePoint Code Analysis"
- Then click on "Ruleset:<name of a ruleset>".
- A pop up will appear with a drop-down menu, from here select the ruleset, you wish to use for analysis.
- If you wish to use a custom ruleset, select <browse> a file dialog will appear, select the ruleset you wish to use.
- Then click "OK" and run the analysis as normal.
In order to select the ruleset for analysis in the PowerShell, you will need to make sure that the parameter "SettingsFile" is set, to the filename and location of the ruleset you wish to use.
In order to select the ruleset for analysis in the CmdLine, you will need to set the filename and path for the argument -s (for example the command line would be spcaf.exe -s "C:\Program Files (x86)\Rencore\SPCAF\Rulesets\RS00_AllRules.spruleset).
The recommended practice is to configure and store a settings file per project. This allows you to change the build requirements for that project without affecting other projects.
In order to select the ruleset for analysis in TFS2015, you can either type the file location in the field for "Settings File" or click the ellipses next to the next to the field and select the file directly.
Internal Note: CPic