Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/18 21:13:46 (5 years ago)
Author:
gkronber
Message:

#2520: Adapted VS code fixes:

  • using HeuristicLab.Persistence -> using HEAL.Fossil
  • Made missing StorableCtor a Warning
  • Ignore StorableCtor for structs and interfaces
File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/MissingStorableConstructor/MissingStorableConstructorAnalyzer.cs

    r14985 r16469  
    1414    private const string Category = nameof(DiagnosticCategory.Persistence);
    1515
    16     private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
     16    private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description);
    1717
    1818    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } }
     
    2525      var namedTypeSymbol = (INamedTypeSymbol)context.Symbol;
    2626      if (namedTypeSymbol.IsStatic) return;
    27       if (namedTypeSymbol.TypeKind == TypeKind.Delegate || namedTypeSymbol.TypeKind == TypeKind.Enum) return;
     27      if (namedTypeSymbol.TypeKind == TypeKind.Delegate || namedTypeSymbol.TypeKind == TypeKind.Enum || namedTypeSymbol.TypeKind == TypeKind.Struct || namedTypeSymbol.TypeKind == TypeKind.Interface) return;
    2828
    2929      var attr = context.Symbol.GetAttributes();
Note: See TracChangeset for help on using the changeset viewer.