Even though the name is quite similar, there is a big difference between the
- SharePoint Code Analysis Framework (SPCAF) and the
- Microsoft SharePoint Online Code Analysis Framework (MSOCAF)
You can compare the features in detail on our MSOCAF vs. SPCAF comparison chart.
MSOCAF is a tool to check solutions against very limited quality guidelines of Microsoft in order to deploy the solution to SharePoint Online. It contains a subset of FxCop rules (not SharePoint specific) and runs also SPDisposeCheck, a deprecated code analysis tool checking for memory leaks which currently has no public release capable of analyzing SharePoint 2013 code.
MSOCAF, is very limited, not customizable and only analyses the assembly code. All other SharePoint solutions or app files are ignored. MSOCAF has not been updated since 2013.
Apart from integrating FXCop, SPDisposeCheck and several other 3rd party analyzers, it also has all memory disposal rules implemented.
Additionally it can create detailed dependency graphs to review the solution architecture, calculates metrics, generate a solution inventory to document your custom code and assess your farm solutions for the migration to the app model.
In SPCAF you can configure the applied rules according to your target environment, execute the analysis from within Visual Studio, a standalone client, command line, MSBuild or in a Team Build eg. in Team Foundation Server to regularly check the code quality while developing.
Microsoft is using SPCAF in their own projects and the Office Patterns & Practices team are working with RENCORE to provide up-to-date guidance rules for the migration from farm solutions to the app model. See more on the SPCAF custom rules project on the official Microsoft OfficeDev GitHub page.