Changeset 16469 for misc/tools/PersistenceCodeFix
- Timestamp:
- 12/29/18 21:13:46 (6 years ago)
- Location:
- misc/tools/PersistenceCodeFix/PersistenceCodeFix
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix.Vsix/PersistenceCodeFix.Vsix.csproj
r14933 r16469 3 3 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 4 4 <PropertyGroup> 5 <MinimumVisualStudioVersion>1 4.0</MinimumVisualStudioVersion>5 <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> 6 6 <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> 7 <FileUpgradeFlags> 8 </FileUpgradeFlags> 9 <UpgradeBackupLocation> 10 </UpgradeBackupLocation> 11 <OldToolsVersion>14.0</OldToolsVersion> 7 12 </PropertyGroup> 8 13 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> -
misc/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/MissingStorableConstructor/MissingStorableConstructorAnalyzer.cs
r14985 r16469 14 14 private const string Category = nameof(DiagnosticCategory.Persistence); 15 15 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); 17 17 18 18 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } … … 25 25 var namedTypeSymbol = (INamedTypeSymbol)context.Symbol; 26 26 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; 28 28 29 29 var attr = context.Symbol.GetAttributes(); -
misc/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/MissingStorableType/MissingStorableTypeFix.cs
r14989 r16469 100 100 var newRoot = root.ReplaceNode(baseTypeDecl, newBaseTypeDecl); 101 101 102 // add using of H euristicLab.Persistenceif the document does not already have it102 // add using of HEAL.Fossil if the document does not already have it 103 103 var oldUsings = root.Usings; 104 if (oldUsings.All(x => x.Name.WithoutTrivia().ToString() != "H euristicLab.Persistence")) {105 var persistenceUsing = SyntaxFactory.UsingDirective(SyntaxFactory.IdentifierName("H euristicLab.Persistence"));104 if (oldUsings.All(x => x.Name.WithoutTrivia().ToString() != "HEAL.Fossil")) { 105 var persistenceUsing = SyntaxFactory.UsingDirective(SyntaxFactory.IdentifierName("HEAL.Fossil")); 106 106 newRoot = newRoot.WithUsings(oldUsings.Add(persistenceUsing)); 107 107 } -
misc/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Analyzers/ObsoleteStorableClass/ObsoleteStorableClassFix.cs
r14989 r16469 82 82 var newRoot = root.ReplaceNode(attrDecl, newAttrDecl); 83 83 84 // add using of H euristicLab.Persistenceif the document does not already have it84 // add using of HEAL.Fossil if the document does not already have it 85 85 var oldUsings = root.Usings; 86 if (oldUsings.All(x => x.Name.WithoutTrivia().ToString() != "H euristicLab.Persistence")) {87 var persistenceUsing = SyntaxFactory.UsingDirective(SyntaxFactory.IdentifierName("H euristicLab.Persistence"));86 if (oldUsings.All(x => x.Name.WithoutTrivia().ToString() != "HEAL.Fossil")) { 87 var persistenceUsing = SyntaxFactory.UsingDirective(SyntaxFactory.IdentifierName("HEAL.Fossil")); 88 88 newRoot = newRoot.WithUsings(oldUsings.Add(persistenceUsing)); 89 89 }
Note: See TracChangeset
for help on using the changeset viewer.