GithubHelp home page GithubHelp logo

commentcop's Introduction

logo CommentCop

A Visual Studio 2015+ Extension to check and correct comments and mostly XML-comments in C# code.

There are a lot of rules which can be switched off and on.

Most of the rules are StyleCop conform. StyleCop can be found here

More description will follow.

commentcop's People

Contributors

mreu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

commentcop's Issues

System.ArgumentOutOfRangeException: CommentCop.Misc.MR8000XMLCommentMustBePreceededByBlankLine

Example of the class in question:

`
namespace Project.Foundation.SitecoreExtensions.Abstractions
{
using System.Collections.Generic;
using System.Linq;
using Sitecore.Data;
using Sitecore.Data.Items;

///


/// Represents a wrapper around an actual Sitecore data .
///

public class SitecoreTemplateItem : /CustomItemBase,/ ISitecoreTemplateItem
{
private readonly TemplateItem _item;

    /// <summary>
    /// for mocking purposes only
    /// </summary>
    public SitecoreTemplateItem()
    {
        // for mocking purposes only
    }
    /// <summary>
    /// Creates a wrapper around an actual Sitecore data <see cref="TemplateItem"/>.
    /// </summary>
    public SitecoreTemplateItem(TemplateItem templateItem)// : base(templateItem.InnerItem)
    {
        this._item = templateItem;
    }

    /// <summary>
    /// Gets a list of base templates.
    /// </summary>
    public virtual IEnumerable<SitecoreTemplateItem> BaseTemplates
    {
        get { return this._item.BaseTemplates.Select(ToSitecoreTemplateItem); }
    }

`

Exception:
`
Severity Code Description Project File Line Suppression State Detail Description
Error AD0001 Analyzer 'CommentCop.Misc.MR8000XMLCommentMustBePreceededByBlankLine' threw an exception of type 'System.ArgumentOutOfRangeException' with message 'Specified argument was out of the range of valid values.
Parameter name: index'. Onvz.Foundation.SitecoreExtensions 1 Active Analyzer 'CommentCop.Misc.MR8000XMLCommentMustBePreceededByBlankLine' threw the following exception:
'Exception occurred with following context:
Compilation: Onvz.Foundation.SitecoreExtensions
SyntaxTree: C:\Projects\OSP\src\foundation\SitecoreExtensions\code\Abstractions\SitecoreTemplateItem.cs
SyntaxNode:


Creates a wrapper around an actual Sitecore data ... [DocumentationCommentTriviaSyntax]@[641..767) (21,11)-(24,0)

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at Microsoft.CodeAnalysis.SyntaxTriviaList.get_Item(Int32 index)
at CommentCop.Misc.MR8000XMLCommentMustBePreceededByBlankLine.Check(SyntaxNodeAnalysisContext syntaxNodeAnalysisContext)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass42_11.<ExecuteSyntaxNodeAction>b__1() at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable1 info)

'.
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.