Skip to main content


Showing posts from February, 2017

Visual Studio 2015 Code Analyzer and configuration with StyleCop

What is Diagnostic/Code Analyzer? To put it simply it is something similar to Resharper or Telerik JustCode. It analyzes codes while writing on code editor and suggest for improvements of codes through Squiggles, light icon and based on various severity.
How it works?
I had mentioned that it is similar to Resharper and Telerik JustCode but internal infrastructure is completely different.
It is dependent on new compiler Roslyn. Roslyn has a clever compile technique, unlike older version which makes it faster and flexible for dynamic compilation without the need of the entire code base. The structure is basically divided into two categories Syntax Tree, and Semantic Model. The syntax tree is related to syntaxes only it does not require any reference check. It can be related to DOM elements structure in case of HTML.  Syntax Tree consists of very fine details as simple as WhiteSpace under the code. The Semantic Model is kind of references of Syntax Tree in which it tries to resolve any depen…