📜 ⬆️ ⬇️

SharePoint Code Check (SPCop) is a free code analysis tool.

spcop Each SharePoint developer uses different tools to check the code, for example, it can be a combination of StyleCop and SPDisposeCheck.

This article will discuss the SharePoint Code Check (SPCop) - a SharePoint code analyzer that is a free version of the SharePoint Code Analysis Framework (SPCAF) .

List of some features:

')


In the future, SPCop developers plan to expand the list of rules for analyzing SharePoint applications (apps) in order to improve the process of their creation.

Clarification: Additional features such as HTML, XML reports, third-party parsers for CSS and JavaScript, dependencies, client applications and integration with TFS Team Build / TeamCity are only available in the paid version of the SharePoint Code Analysis Framework (SPCAF) .

What about SPDisposeCheck?


The latest version of SPDisposeCheck was released in 2010, and was intended for SharePoint 2010. As you understand, SPDisposeCheck is based on the .NET Framework 3.5. And now, at the time of SharePoint 2013, there may be some difficulties with analyzing assemblies based on the .NET Framework 4.5. If SPDisposeCheck does not show errors for your project for SharePoint 2013, it is better to check it again with SPCop.

In addition, many of the rules SPDisposeCheck caused false positives or simply outdated. Therefore, a special “ Memory Disposal ” rule set has been added to SPCop.

Integration with Visual Studio


A special section will appear in the context menu of SharePoint projects.

clip_image004

After starting the analysis, you can understand the current state of your decision.

clip_image006

As you can see, SPCop not only allows you to find potential problems in your code before deploying solutions, but also helps you write more stable and correct code.

Links


SharePoint Code Check (SPCop) in Visual Studio Gallery
SPCop Documentation

Source: https://habr.com/ru/post/205218/


All Articles