Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable MSTest analyzers #898

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
44 changes: 43 additions & 1 deletion test/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,46 @@ dotnet_diagnostic.CA1707.severity = none
# VSTHRD200: Use "Async" suffix in names of methods that return an awaitable type
# Justification: Test method names don't need to end with "Async"
# https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD111.md
dotnet_diagnostic.VSTHRD200.severity = none
dotnet_diagnostic.VSTHRD200.severity = none

# MSTEST0004: Public types should be test classes
# dotnet_diagnostic.MSTEST0004.severity = warning

# MSTEST0006: Avoid '[ExpectedException]'
dotnet_diagnostic.MSTEST0006.severity = warning

# MSTEST0007: Use test attributes only on test methods
dotnet_diagnostic.MSTEST0007.severity = warning

# MSTEST0016: Test class should have test method
dotnet_diagnostic.MSTEST0016.severity = warning

# MSTEST0017: Assertion arguments should be passed in the correct order
dotnet_diagnostic.MSTEST0017.severity = warning

# MSTEST0023: Do not negate boolean assertions
dotnet_diagnostic.MSTEST0023.severity = warning

# MSTEST0025: Use 'Assert.Fail' instead of an always-failing assert
dotnet_diagnostic.MSTEST0025.severity = warning

# MSTEST0026: Avoid conditional access in assertions
dotnet_diagnostic.MSTEST0026.severity = suggestion

# MSTEST0029: Public method should be test method
dotnet_diagnostic.MSTEST0029.severity = warning

# MSTEST0030: Type containing [TestMethod] should be marked with [TestClass]
dotnet_diagnostic.MSTEST0030.severity = warning

# MSTEST0031: System.ComponentModel.DescriptionAttribute has no effect on test methods
dotnet_diagnostic.MSTEST0031.severity = warning

# MSTEST0032: Review or remove the assertion as its condition is known to be always true
dotnet_diagnostic.MSTEST0032.severity = warning

# MSTEST0037: Use proper 'Assert' methods
dotnet_diagnostic.MSTEST0037.severity = warning

# MSTEST0039: Use newer 'Assert.Throws' methods
dotnet_diagnostic.MSTEST0039.severity = warning
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public void SbomToolManifestPathConverterTests_RootPathOutside_SbomOnDifferentDr
Assert.AreEqual(expectedPath, path);
}

[TestMethod]
public void SbomToolManifestPathConverterTests_RootPathOutside_SbomOnSameDrive_Succeeds()
{
if (!isWindows)
Expand Down
Loading