Rulesets |
Rulesets |
Rulesets in SPCAF are files with extension '.spruleset' which configure the analysis process and define, which rules are disabled during analysis.
To edit existing rulesets or to create custom rulesets the tool 'SPCAF.RulesetEditor.exe' can be used. The tool can be found in the installation directory of SPCAF.
With the ruleset editor you can:
Sometimes WSP solutions contains third party files (like assemblies or JavaScript files) which should be excluded from the analysis. To allow this SPCAF uses the configuration parameter "IgnoredFiles" which contains a semikolon separated list of excluded file names.
SPCAF uses for instance the value "jquery*.js;knockout*.js;angular*.js" for "IgnoredFiles" in JSHint analyzer to exclude typical third party JavaScript files.
NOTE: If you want to include these third party files for a certain rule you can set the configuration value "IgnoredFiles" for this rule in a ruleset file and the configuration value which is assigned on a higher level will be overriden.
Some rules can be configured via rulesets. For instance the rules for integration of FxCop allows you to configure the FxCop ruleset or configure the path to FxCop installation directory. The configuration is stored as a key value pair within the ruleset file.
Ruleset | Description |
---|---|
All Rules | All available rules are used for the analysis. Filename: RS00_AllRules.spruleset |
Minimum Rules | These rules focus on the most critical problems in your code for which Code Analysis is the most accurate. Only rules from the categories Correctness, Security and Supportability are applied. Filename: RS01_MinimumRules.spruleset |
Minimum Recommended Rules | These rules focus on the most critical problems in your code and violations against best practices. The rule set extends the MinimumRules with rules from the categories Design, Best Practices and Deployment. Filename: RS02_MinimumRecommendedRules.spruleset |
Extended Recommended Rules | These rules focus on a detailed check of your code. The rule set extends the MinimumRecommendedRules with rules from the categories Localization and Naming. Filename: RS10_ExtendedRecommendedRules.spruleset |
Compatibility Rules | These rules focus on compatibility to different SharePoint versions and Sandboxed Compatibility of your code. The rule set extends the MinimumRecommendedRules. Filename: RS20_CompatibilityRules.spruleset |
Customization Policy Silver Rules | These rules focus on conformance of your code to the Silver Service Hosting model (Utility Hosting/Shared Web Applications). The rule set extends the MinimumRecommendedRules. Filename: RS50_CustomizationPolicySilverRules.spruleset |
Customization Policy Gold Rules | These rules focus on conformance of your code to the Gold Service Hosting model (Shared Hardware/Dedicated Web Applications). The rule set extends the MinimumRecommendedRules. Filename: RS51_CustomizationPolicyGoldRules.spruleset |
Customization Policy Platinum Rules | These rules focus on conformance of your code to the Platinum Service Hosting model (Dedicated Hardware). The rule set extends the MinimumRecommendedRules. Filename: RS52_CustomizationPolicyPlatinumRules.spruleset |
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 |