Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,58 @@ dotnet_diagnostic.CS7035.severity = none
# We do not need compile-time generated RegExs in Unit Tests. We'll prefer code readability.
dotnet_diagnostic.SYSLIB1045.severity = none

dotnet_diagnostic.MSTEST0001.severity = error
Comment thread
bcollamore marked this conversation as resolved.
dotnet_diagnostic.MSTEST0002.severity = error
dotnet_diagnostic.MSTEST0003.severity = error
dotnet_diagnostic.MSTEST0004.severity = error
dotnet_diagnostic.MSTEST0005.severity = error
dotnet_diagnostic.MSTEST0006.severity = error
dotnet_diagnostic.MSTEST0007.severity = error
dotnet_diagnostic.MSTEST0008.severity = error
dotnet_diagnostic.MSTEST0009.severity = error
dotnet_diagnostic.MSTEST0010.severity = error
dotnet_diagnostic.MSTEST0011.severity = error
dotnet_diagnostic.MSTEST0012.severity = error
dotnet_diagnostic.MSTEST0013.severity = error
dotnet_diagnostic.MSTEST0014.severity = error
dotnet_diagnostic.MSTEST0015.severity = error
dotnet_diagnostic.MSTEST0016.severity = error
dotnet_diagnostic.MSTEST0017.severity = error
dotnet_diagnostic.MSTEST0018.severity = error
dotnet_diagnostic.MSTEST0019.severity = none # Do not prefer TestInitialize over constructors
dotnet_diagnostic.MSTEST0020.severity = error
dotnet_diagnostic.MSTEST0021.severity = error
dotnet_diagnostic.MSTEST0022.severity = error
dotnet_diagnostic.MSTEST0023.severity = error
dotnet_diagnostic.MSTEST0024.severity = error
dotnet_diagnostic.MSTEST0025.severity = error
dotnet_diagnostic.MSTEST0026.severity = error
dotnet_diagnostic.MSTEST0027.severity = error
dotnet_diagnostic.MSTEST0028.severity = error
dotnet_diagnostic.MSTEST0029.severity = error
dotnet_diagnostic.MSTEST0030.severity = error
dotnet_diagnostic.MSTEST0031.severity = error
dotnet_diagnostic.MSTEST0032.severity = error
dotnet_diagnostic.MSTEST0033.severity = error
dotnet_diagnostic.MSTEST0034.severity = error
dotnet_diagnostic.MSTEST0035.severity = error
dotnet_diagnostic.MSTEST0036.severity = error
dotnet_diagnostic.MSTEST0037.severity = error
dotnet_diagnostic.MSTEST0038.severity = error
dotnet_diagnostic.MSTEST0039.severity = error
dotnet_diagnostic.MSTEST0040.severity = error
dotnet_diagnostic.MSTEST0041.severity = error
dotnet_diagnostic.MSTEST0042.severity = error
dotnet_diagnostic.MSTEST0043.severity = error
dotnet_diagnostic.MSTEST0044.severity = error
dotnet_diagnostic.MSTEST0045.severity = error
dotnet_diagnostic.MSTEST0046.severity = error
dotnet_diagnostic.MSTEST0047.severity = error
dotnet_diagnostic.MSTEST0048.severity = error
dotnet_diagnostic.MSTEST0049.severity = error
dotnet_diagnostic.MSTEST0050.severity = error


dotnet_diagnostic.IDE0001.severity = error
dotnet_diagnostic.IDE0002.severity = error
dotnet_diagnostic.IDE0003.severity = error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Philips.CodeAnalysis.Test.Common
/// The analyzer reports a <see cref="Diagnostic"/> on each of its AllowedSymbols. In production analyzers the allowed symbols is used reciprocally.
/// </summary>
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class AllowedSymbolsTestAnalyzer : SolutionAnalyzer
internal sealed class AllowedSymbolsTestAnalyzer : SolutionAnalyzer
{
public const string AllowedFileName = "AllowedSymbolsTest.Allowed.txt";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task UnknownSyntaxKindThrowsException()
var expectedResult = new DiagnosticResult() { Id = "AD0001", Location = new DiagnosticResultLocation(-1) };
// Act
// Assert
AssertFailedException actualException = await Assert.ThrowsExceptionAsync<AssertFailedException>(
AssertFailedException actualException = await Assert.ThrowsExactlyAsync<AssertFailedException>(
() => VerifyDiagnostic("public class A {}", expectedResult));
StringAssert.Contains(actualException.Message, "SyntaxKind");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override void AssertFixAllProvider(FixAllProvider fixAllProvider)
Assert.IsTrue(fixAllProvider.GetSupportedFixAllScopes().Contains(FixAllScope.Solution));
}

public class SumHashCalculator : RollingHashCalculator<TokenInfo>
internal sealed class SumHashCalculator : RollingHashCalculator<TokenInfo>
{
public SumHashCalculator(int maxItems)
: base(maxItems)
Expand Down
2 changes: 1 addition & 1 deletion Philips.CodeAnalysis.Test/Helpers/AssertCodeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Philips.CodeAnalysis.Test.Helpers
{
public class AssertCodeHelper
internal sealed class AssertCodeHelper
{
private static readonly string TestTemplate = @"
using System;
Expand Down
2 changes: 1 addition & 1 deletion Philips.CodeAnalysis.Test/Helpers/TestAdditionalFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Philips.CodeAnalysis.Test.Helpers
{
public class TestAdditionalFile : AdditionalText
internal sealed class TestAdditionalFile : AdditionalText
{
private readonly SourceText _text;

Expand Down
2 changes: 1 addition & 1 deletion Philips.CodeAnalysis.Test/Helpers/TestDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Philips.CodeAnalysis.Test.Helpers
{
public class TestDefinitions
internal sealed class TestDefinitions
{
public const string UnitTests = "Unit";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Philips.CodeAnalysis.Test.Helpers
{
public class TestDiagnosticProvider : FixAllContext.DiagnosticProvider
internal sealed class TestDiagnosticProvider : FixAllContext.DiagnosticProvider
{
private readonly IEnumerable<Diagnostic> _diagnostics;

Expand Down
2 changes: 1 addition & 1 deletion Philips.CodeAnalysis.Test/Helpers/TestTextLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Philips.CodeAnalysis.Test.Helpers
{
public class TestTextLoader : TextLoader
internal sealed class TestTextLoader : TextLoader
{
private readonly Dictionary<DocumentId, string> _textDocuments = [];

Expand Down
Loading