From dcb02b8e904621480f4b815b9e0723a2e4bca0a3 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 15 Nov 2022 11:47:41 +0100 Subject: [PATCH] Set IDE1006 (naming rule violation) to warning --- .editorconfig | 2 +- tests/ComputeSharp.D2D1.Tests/Shaders/MengerJourney.cs | 4 ++-- .../Shaders/TriangleGridContouring.cs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index 343ced3a..fe1dbcdf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -330,7 +330,7 @@ dotnet_diagnostic.CA2242.severity = warning dotnet_diagnostic.IDE0010.severity = none dotnet_diagnostic.IDE0130.severity = none dotnet_diagnostic.IDE0060.severity = none -dotnet_diagnostic.IDE1006.severity = none +dotnet_diagnostic.IDE1006.severity = warning dotnet_diagnostic.IDE0023.severity = none dotnet_diagnostic.IDE0024.severity = none dotnet_diagnostic.IDE0060.severity = none diff --git a/tests/ComputeSharp.D2D1.Tests/Shaders/MengerJourney.cs b/tests/ComputeSharp.D2D1.Tests/Shaders/MengerJourney.cs index eaadc5bb..b079eb1e 100644 --- a/tests/ComputeSharp.D2D1.Tests/Shaders/MengerJourney.cs +++ b/tests/ComputeSharp.D2D1.Tests/Shaders/MengerJourney.cs @@ -107,7 +107,7 @@ internal readonly partial struct MengerJourney : ID2D1PixelShader /// /// Calculates the finite difference normal at a given position. /// - private float3 getNormal(in float3 pos) + private float3 GetNormal(in float3 pos) { float3 e = new(0.0f, NormalDistance, 0.0f); @@ -151,7 +151,7 @@ internal readonly partial struct MengerJourney : ID2D1PixelShader float smoothStep = steps + (distance / MinimumDistance); float ao = 1.1f - (smoothStep / MaxSteps); - float3 normal = getNormal(pos - (dir * NormalDistance * 3.0f)); + float3 normal = GetNormal(pos - (dir * NormalDistance * 3.0f)); float3 color = 1.0f; float3 light = GetLight(color, normal); diff --git a/tests/ComputeSharp.D2D1.Tests/Shaders/TriangleGridContouring.cs b/tests/ComputeSharp.D2D1.Tests/Shaders/TriangleGridContouring.cs index 4d4458b4..3c38a8e3 100644 --- a/tests/ComputeSharp.D2D1.Tests/Shaders/TriangleGridContouring.cs +++ b/tests/ComputeSharp.D2D1.Tests/Shaders/TriangleGridContouring.cs @@ -82,7 +82,7 @@ internal readonly partial struct TriangleGridContouring : ID2D1PixelShader } // Based on IQ's signed distance to the segment joining "a" and "b". - private static float distEdge(float2 a, float2 b) + private static float DistEdge(float2 a, float2 b) { return Hlsl.Dot((a + b) * 0.5f, Hlsl.Normalize((b - a).YX * new float2(-1, 1))); } @@ -203,7 +203,7 @@ internal readonly partial struct TriangleGridContouring : ID2D1PixelShader float2 p1 = default; int iTh = IsoLine(n3, ip0, ip1, ip2, isovalue, i, ref p0, ref p1); - d = Hlsl.Min(d, distEdge(p - p0, p - p1)); + d = Hlsl.Min(d, DistEdge(p - p0, p - p1)); if (iTh == 7) { @@ -221,7 +221,7 @@ internal readonly partial struct TriangleGridContouring : ID2D1PixelShader int iTh2 = IsoLine(n3, ip0, ip1, ip2, isovalue, i, ref p0, ref p1); - d2 = Hlsl.Min(d2, distEdge(p - p0, p - p1)); + d2 = Hlsl.Min(d2, DistEdge(p - p0, p - p1)); if (iTh2 == 7) {