diff --git a/.editorconfig b/.editorconfig
index 4c91d0bf..02820dae 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -232,4 +232,8 @@ dotnet_diagnostic.CA1707.severity = none # Remove the underscores from type na
dotnet_diagnostic.CA1720.severity = none # Identifier contains type name
dotnet_diagnostic.CA1724.severity = none # Type names should not match namespaces
dotnet_diagnostic.CA1859.severity = none # Use concrete types when possible for improved performance
+dotnet_diagnostic.CA1861.severity = none # Avoid constant arrays as arguments
+dotnet_diagnostic.CA2211.severity = none # Non-constant fields should not be visible
+dotnet_diagnostic.CA2241.severity = error # Provide correct arguments to formatting methods/The format argument is not a valid string
+dotnet_diagnostic.IDE0040.severity = none # Add accessibility modifiers
dotnet_diagnostic.IDE1006.severity = none # Naming rule violation
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 6f830b21..a6302259 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -77,9 +77,9 @@
-
-
-
+
+
+
diff --git a/src/xunit.analyzers.tests/Analyzers/X1000/ClassDataAttributeMustPointAtValidClassTests.cs b/src/xunit.analyzers.tests/Analyzers/X1000/ClassDataAttributeMustPointAtValidClassTests.cs
index 1756da84..3e92eb8d 100644
--- a/src/xunit.analyzers.tests/Analyzers/X1000/ClassDataAttributeMustPointAtValidClassTests.cs
+++ b/src/xunit.analyzers.tests/Analyzers/X1000/ClassDataAttributeMustPointAtValidClassTests.cs
@@ -1,35 +1,36 @@
using System.Threading.Tasks;
-using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Xunit;
using Verify = CSharpVerifier;
public class ClassDataAttributeMustPointAtValidClassTests
{
- static string TestMethodSource(string testMethodParams = "(int n)") => @$"
-#nullable enable
+ static string TestMethodSource(string testMethodParams = "(int n)") => string.Format(/* lang=c#-test */ """
+ #nullable enable
-using Xunit;
+ using Xunit;
-public class TestClass {{
- [Theory]
- [ClassData(typeof(DataClass))]
- public void TestMethod{testMethodParams} {{ }}
-}}";
+ public class TestClass {{
+ [Theory]
+ [ClassData(typeof(DataClass))]
+ public void TestMethod{0} {{ }}
+ }}
+ """, testMethodParams);
public class SuccessCases
{
[Fact]
public async Task SuccessCaseV2()
{
- var dataClassSource = @"
-using System.Collections;
-using System.Collections.Generic;
+ var dataClassSource = /* lang=c#-test */ """
+ using System.Collections;
+ using System.Collections.Generic;
-class DataClass: IEnumerable