diff --git a/source/Analyzers/KanColleViewer.PluginAnalyzer/InvalidGuidMetadataAnalyzer.cs b/source/Analyzers/KanColleViewer.PluginAnalyzer/InvalidGuidMetadataAnalyzer.cs index ad76c8eb5..31c41b35c 100644 --- a/source/Analyzers/KanColleViewer.PluginAnalyzer/InvalidGuidMetadataAnalyzer.cs +++ b/source/Analyzers/KanColleViewer.PluginAnalyzer/InvalidGuidMetadataAnalyzer.cs @@ -53,7 +53,7 @@ private static void AnalyzeCompilation(CompilationAnalysisContext context) // GUID として解釈できない値か、IPlugin で未定義の GUID が指定されてたらアウト var guidMetadata = syntax.GetGuidMetadata(semanticModel); if (!guidMetadata.HasValue - || plugins.All(x => x.GetGuidMetadataValueSyntax()?.GetGuidMetadata(semanticModel) != guidMetadata)) + || plugins.All(x => x.GetGuidMetadataValueSyntax()?.GetGuidMetadata(compilation.GetSemanticModel(x.SyntaxTree)) != guidMetadata)) { context.ReportDiagnostic(Diagnostic.Create(InvalidGuidMetadataRule, p.GetLocation())); } diff --git a/source/Analyzers/KanColleViewer.PluginAnalyzer/Properties/AssemblyInfo.cs b/source/Analyzers/KanColleViewer.PluginAnalyzer/Properties/AssemblyInfo.cs index 4654394ef..32798a2f9 100644 --- a/source/Analyzers/KanColleViewer.PluginAnalyzer/Properties/AssemblyInfo.cs +++ b/source/Analyzers/KanColleViewer.PluginAnalyzer/Properties/AssemblyInfo.cs @@ -24,4 +24,4 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.1.1.0")] diff --git a/source/Analyzers/KanColleViewer.PluginAnalyzer/Utility.cs b/source/Analyzers/KanColleViewer.PluginAnalyzer/Utility.cs index 48abde86e..651e87a9a 100644 --- a/source/Analyzers/KanColleViewer.PluginAnalyzer/Utility.cs +++ b/source/Analyzers/KanColleViewer.PluginAnalyzer/Utility.cs @@ -134,7 +134,7 @@ private static string GetGuidMetadataConstantValue(this AttributeArgumentSyntax { if (syntax == null) return null; var constantValue = semanticModel.GetConstantValue(syntax.Expression); - return constantValue.Value?.ToString() ?? null; + return constantValue.Value?.ToString(); } public static AttributeArgumentSyntax GetGuidMetadataValueSyntax(this ClassDeclarationSyntax classDeclaration)