A lot of work was done to keep simplicity and zero learning curve for writing Analysis Plugs. Steps to create a Hello World Plug mentioned below

  • Using Visual Studio or Visual Studio Express create a 'Class Library' project
  • Add reference to Debug.Analyzer.API
  • Inherit the Class from AnalysisPlug
  • Override the method called RunAnalysis()
  • Build the DLL and copy to 'Analysis' folder
  • Add to any Analysis Template!
// *** Hello World Analysis Plug *** //
using DebugAnalyzer.ObjectModel;

namespace Analysis.Sample
{
    public class SamplePlug : AnalysisPlug
    {
        public override void RunAnalysis()
        {
            // Begin Report and specify Title for Report Island
            BeginReport("Hello World!");

            // Normal report line using fixed width font
            WriteDataLine("This is in Fixed width Font!");

            // Add blank line in the report
            WriteBlankLine();

            // Add Bold line for headings
            WriteHeadLine("Drawing Graph has become easy as well...");

            // Add Graph with color, percentage and label
            WriteGraphLine(GraphColors.LightGreen, 70, "System.String - 70%");
            WriteGraphLine(GraphColors.Orange, 50, "System.Byte[] - 50%");

            // Adding HTML content in the report
            WriteHtmlLine("Testing for HTML content inline like <b>bold</b> <i>italics</i> <u>underline</u> words");

            // Write Recommendation
            WriteRecommendation(ResultSeverity.Error,
                                "Here goes the description for the issue...",
                                "Here goes the recommendation for fixing the issue...");
            
            EndReport();
        }
    }
}

This is a sample plug to show the different reporting functions available. Keep in mind no analysis is done in this Plug!


Above screenshot shows how the Report looks like for the above Analysis code.
Every Analysis Plug has it's own analysis container called 'Report Island'.

 

How to change Author Name in the Analysis Plug 'Report Island' to get credit for your own Analysis Plug?

Author Information comes from Analysis Plug's assembly attribute called 'Company'. You can get to this from Project properties (see screenshots below)


Above screenshot shows Project properties


Above screenshot shows Assembly Information window and where you can set Author details.