<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Mads Storm Hansen</title> <link>https://world.optimizely.com/blogs/mads-storm-hansen/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>Introducing Code analyzers for Episerver</title>            <link>https://world.optimizely.com/blogs/mads-storm-hansen/dates/2019/11/introducing-code-analyzers-for-episerver/</link>            <description>&lt;p&gt;&lt;a href=&quot;https://nuget.episerver.com/package/?id=CodeAnalyzers.Episerver&quot;&gt;Code analyzers for Episerver&lt;/a&gt; is a new Roslyn-based plugin that analyzes your Episerver code as you type. It can help you avoid some problems with editor experience and code maintainability.&lt;br /&gt;The plugin will show live warnings (&quot;squiggles&quot;) in Visual Studio while you are typing.&lt;/p&gt;
&lt;h3&gt;Analyzers&lt;/h3&gt;
&lt;p&gt;Inspired by a &lt;a href=&quot;https://www.epinova.no/en/blog/episerver-content-types-hygiene-unit-tests/&quot;&gt;recent blog post&lt;/a&gt;, Code analyzers for Episerver looks for the correct use of content type and property attributes to ensure a good experience for your editors.&lt;a href=&quot;https://www.epinova.no/en/blog/episerver-content-types-hygiene-unit-tests/&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The analyzer rules can be configured individually and phased in gradually in a larger codebase.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/78830ea78e2142259d8f8aa7d254ad70.aspx&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Code analyzers for Episerver also looks for the use of known legacy types and &#39;Internal&#39; namespaces that should be avoided in your code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/ccccafb56bee4aeb88f5fc85fd021acb.aspx&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;Each analyzer rule severity can be configured in a &lt;a href=&quot;https://docs.microsoft.com/visualstudio/code-quality/using-rule-sets-to-group-code-analysis-rules&quot;&gt;ruleset file&lt;/a&gt; similar to Visual Studios built-in code analysis.&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;Code analyzers for Episerver is installed per-project as a NuGet package from the &lt;a href=&quot;https://nuget.episerver.com/package/?id=CodeAnalyzers.Episerver&quot;&gt;Episerver feed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Visual Studio automatically detects and executes the analyzers. Build servers will also execute the analyzer rules on every build.&lt;/p&gt;
&lt;h3&gt;Compatibility&lt;/h3&gt;
&lt;p&gt;Code analyzers for Episerver is compatible with the compilers in Visual Studio 2019 and Visual Studio 2017 (15.5+).&lt;/p&gt;
&lt;p&gt;If your project references an old version of the &lt;a href=&quot;https://www.nuget.org/packages/Microsoft.Net.Compilers/&quot;&gt;Microsoft.Net.Compilers&lt;/a&gt; package you may need to upgrade this to 2.6.1+ for compatibility with Code analyzers for Episerver.&lt;/p&gt;</description>            <guid>https://world.optimizely.com/blogs/mads-storm-hansen/dates/2019/11/introducing-code-analyzers-for-episerver/</guid>            <pubDate>Thu, 07 Nov 2019 08:22:19 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>