Add a diagnostic for constructors with base constructors

このコミットが含まれているのは:
Sergio Pedri committed 2023-12-02 23:25:23 +01:00
1 親 4ec30767ce
コミット 7e7b57cd67
6ファイル変更
+75

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

+16
ファイルの表示
@@ -1080,4 +1080,20 @@ partial class DiagnosticDescriptors
isEnabledByDefault: true,
description: "A collection expression cannot be used in a pixel shader.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
/// <summary>
/// Gets a <see cref="DiagnosticDescriptor"/> for a constructor with a base constructor declaration.
/// <para>
/// Format: <c>"The constructor {0} has a base constructor declaration, which cannot be used in a D2D1 shader (only standalone constructors are allowed)"</c>.
/// </para>
/// </summary>
public static readonly DiagnosticDescriptor InvalidBaseConstructorDeclaration = new(
id: "CMPSD2D0073",
title: "Invalid base constructor declaration",
messageFormat: "The constructor {0} has a base constructor declaration, which cannot be used in a D2D1 shader (only standalone constructors are allowed)",
category: "ComputeSharp.D2D1.Shaders",
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: "Only standalone constructors (with no base constructor declaration) can be used in a D2D1 shader.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
}