Expand Minimize

Farm/Sandboxed Solutions

Intention

The quality rules for SharePoint farm and sandboxed solutions are used to identify possible problems or coding errors in assemblies, XML files, ASPX files, CSS files etc. The rules check the artifacts and return violations as CriticalError, Error, CriticalWarning or Warning.

Rule Configuration

By default all recommended rules are checked. To disable rules or rule categories or to change the severity of a rule the SPCAF Settings Editor can be used.

Rule Severities

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.
Information Messages at Information level are returned by rules that report information about a target, as opposed to detecting errors in a target.

Category Index

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.
Supportability Checks if the farm solutions endanger the supportability of SharePoint.
Design Warnings that checking proper solution design.
Best Practice 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 artifacts 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 artifacts 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 artifacts whether they are compatible with SharePoint 2007.
SharePoint 2010 Compatibility Checks files and artifacts whether they are compatible with SharePoint 2010.
SharePoint 2013 Compatibility Checks files and artifacts whether they are compatible with SharePoint 2013.
Performance Checks for ascertaining performance level of the solution
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of RENCORE AB. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.