Rules |
Rules |
The rule check for WSP packages and SharePoint 2013 apps is used to identify possible problems or coding errors in assemblies, XML files, ASPX files, CSS files etc. The rules check the artefacts and in case of violations they return the result as CriticalError, Error, CriticalWarning or Warning.
By default all recommended rules are applied. To disable rules or rule categories or to change the severity of a rule the SPCAF Ruleset Editor can be used.
Each rule has a severity by default to classify the impact of a violation against the rule.
Severity | Description |
---|---|
CriticalError | Issues reported on CriticalError level may lead to a failed solution deployment process or the SharePoint farm can become instable after deployment. The code contains syntax errors or files or referenced elements are missing. WSPs or Apps with critical errors should not be deployed to SharePoint because they can damage the farm or could have highly negative impact. |
Error | Issues reported at Error level should not impact the solution deployment process or the stability of the SharePoint farm. But deployed solutions may not work as expected. Future upgrades of the solution maybe impossible or may most likely fail. WSPs or Apps with errors should only be deployed to SharePoint very carefully after the detected issues have been reviewed. |
CriticalWarning | Issues reported at CriticalWarning level reflect issues that generally have little or no adverse effect on code behavior; they are primarily concerned with code maintainability, and correcting less-than-optimal choices for visible elements. However, for a minority of cases, these messages are considered errors. Therefore, they should be reviewed closely before they are excluded. |
Warning | Issues reported at Warning level are generally concerned with doing things correctly to keep your code base stable, extensible, and maintainable. |
Category | Description |
---|---|
Correctness | Correctness rules check the SharePoint XML code for syntax errors. This includes check for all required XML attributes, correct values and data types of attributes. |
Security | Checks if solutions pose security issues. |
SharePoint Supportability | Checks if solutions endanger the supportability of SharePoint. |
Design | Warnings that checking proper solution design. |
Best Practices | Rules to warn if best practices are not used. |
Deployment | The deployment process of SharePoint customizations is often a critical part. Deploying the wrong way or the wrong files can harm the SharePoint farm or make the farm inaccessible. Deployment rules check the code for these risks or potential problems. |
Localization | Localization is the process of customizing an application, webpage, or website for a given culture or locale. The localization rules check if all attributes in XML which support localization are localized in a proper way. |
Naming | Checks files and artefacts for violations against naming conventions. |
Customization | Rules which check violations against SharePoint customization guidelines. Note: For customization rules it depends on the specific practices and guidelines of the target farm if the rules are valid or not. Disable the rule if it does not apply in your case. |
Sandboxed Compatibility | Checks files and artefacts whether they are compatible with Sandboxed solutions requirements. |
Memory Disposal | Rules to warn for potential memory leaks due to wrong object disposal. |
SharePoint 2007 Compatibility | Checks files and artefacts whether they are compatible with SharePoint 2007. |
SharePoint 2010 Compatibility | Checks files and artefacts whether they are compatible with SharePoint 2010. |
SharePoint 2013 Compatibility | Checks files and artefacts whether they are compatible with SharePoint 2013. |
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 |