Added diagnostics for multiple shader type implementations

このコミットが含まれているのは:
Sergio Pedri committed 2021-05-11 01:54:37 +02:00
1 親 49d73b675f
コミット 5a4e05ba94
4ファイル変更
+49 -1

検索条件に一致するファイルはありません

+16
ファイルの表示
@@ -646,5 +646,21 @@ namespace ComputeSharp.SourceGenerators.Diagnostics
isEnabledByDefault: true,
description: "The compute shader of type {0} has exceeded the maximum allowed size for captured values and resources.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
/// <summary>
/// Gets a <see cref="DiagnosticDescriptor"/> for a type implementing multiple shader interfaces.
/// <para>
/// Format: <c>"The shader of type {0} cannot implement more than one shader interface"</c>.
/// </para>
/// </summary>
public static readonly DiagnosticDescriptor MultipleShaderTypesImplemented = new(
id: "CMPS0047",
title: "Multiple shader implementations for type declaration",
messageFormat: $"The shader of type {{0}} cannot implement more than one shader interface",
category: typeof(IComputeShaderSourceGenerator).FullName,
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: "A shader type cannot implement more than one shader interface.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
}
}