This presentation was held at the SharePoint Saturday Oslo, 1st of June 2013
Title: Automated Code Quality Analysis of SharePoint Solutions
SharePoint development and fun do not always have much in common! Everyone who has ever developed for SharePoint in Visual Studio might know what I mean. Even a small SharePoint solution consist already of a large amount of different files (xml, cs, js, css, resx, jpg, aspx, etc) which may be structured differently depending on the preferences and experience of the developer.
Particularly the extensive XML Schema for manifest.xml, feature.xml, element.xml, Content Types, List Definitions, etc. is an endless source of surprise and cannot be debugged at all in Visual Studio. As a way out, many developers choose to develop standard SharePoint artifacts programmatically rather than following the declarative approach which make the solutions even more complex.
As a result it is really hard to analyze SharePoint solutions, find violations against the XML schema, ensure best practices, enforce coding guidelines or pinpoint performance sinks and cyclomatic dependencies of artifacts.
Neither Visual Studio nor other tools like FXCop, StyleCop etc. allow you to perform a SharePoint specific static code analysis.
This session will highlight the challenges when analyzing SharePoint code and shows a solution by demoing the SharePoint code analysis framework (SPCAF) (www.spcaf.com) which addresses this gap. Additionally you will learn how easy SPCAF can be extended by developing your own custom rules.