Analyzers For Optimizely CMSAvoid some easy misstakes when building Optimizely sites with these analyzers.If you have been working with Optimizely CMS (previously Episerver) you have probably at least once forgotten that little "virtual" keyword when adding a new property to a page or block type. You wont know that something is wrong until you try to run the project. That was true, until now! Analyzers For Optimizely CMS will also warn about when an attribute is expected but not found. (For example on Initializable modules, content types, scheduled jobs.) Read more on available analyzers below. No hard dependenciesAnalyzers For Optimizely CMS will not error if no Optimizely packages are present, it does not require any specific version. In fact, the analyzers SOA1001 to SOA1005 have been tested to work with CMS 12.6, 11.12 and even 8.11! While analyzers may work on very old versions, focus will only be on supporting CMS 11 and later. Learn from the analyzersMy goal is for all analyzers to not just tell you what you did wrong but also explain why its wrong, what may be happening in the background and how to fix the issue if a fix is not offered as a code fix. Just click on the Analyzer id in the Error List tool window, the popup when hovering over the warning or code fix preview in Visual Studio to learn more. See for example the help documentation for SOA1002 and SOA1003 How to getYou can get Analyzers For Optimizely CMS both as an extension to Visual Studio 2022 for use with all your projects and as a NuGet package to bring the analyzer to everyone working on a project. Available analyzersHere are a quick overview of some of the things the analyzers test for:
More will come! ContributeDo you want to report a bug or suggest a feature? Do you see something in the documentation that can be improved? Do you want to help creating new analyzers, tests or writing documentation? Create an issue and let us take it from there. |