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

MSTest analyzers: document suppressing warning #44277

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented Jan 14, 2025

Summary

Fixes microsoft/testfx#4615

Based out of documentation https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001#suppress-a-warning


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/testing/mstest-analyzers/mstest0002.md MSTEST0002: Test classes should have valid layout
docs/core/testing/mstest-analyzers/mstest0003.md "MSTEST0003: Test methods should have valid layout"
docs/core/testing/mstest-analyzers/mstest0004.md MSTEST0004: Public types should be test classes
docs/core/testing/mstest-analyzers/mstest0005.md docs/core/testing/mstest-analyzers/mstest0005
docs/core/testing/mstest-analyzers/mstest0006.md MSTEST0006: Avoid [ExpectedException]
docs/core/testing/mstest-analyzers/mstest0007.md "MSTEST0007: Use test attributes only on test methods"
docs/core/testing/mstest-analyzers/mstest0008.md MSTEST0008: TestInitialize method should have valid layout
docs/core/testing/mstest-analyzers/mstest0009.md docs/core/testing/mstest-analyzers/mstest0009
docs/core/testing/mstest-analyzers/mstest0010.md MSTEST0010: ClassInitialize method should have valid layout
docs/core/testing/mstest-analyzers/mstest0011.md "MSTEST0011: ClassCleanup method should have valid layout"
docs/core/testing/mstest-analyzers/mstest0012.md MSTEST0012: AssemblyInitialize method should have valid layout
docs/core/testing/mstest-analyzers/mstest0013.md docs/core/testing/mstest-analyzers/mstest0013
docs/core/testing/mstest-analyzers/mstest0014.md MSTEST0014: DataRow should be valid
docs/core/testing/mstest-analyzers/mstest0015.md "MSTEST0015: Test method should not be ignored"
docs/core/testing/mstest-analyzers/mstest0016.md MSTEST0016: Test class should have test method
docs/core/testing/mstest-analyzers/mstest0017.md MSTEST0017: Assertion arguments should be passed in the correct order
docs/core/testing/mstest-analyzers/mstest0018.md docs/core/testing/mstest-analyzers/mstest0018
docs/core/testing/mstest-analyzers/mstest0019.md MSTEST0019: Prefer TestInitialize methods over constructors
docs/core/testing/mstest-analyzers/mstest0020.md "MSTEST0020: Prefer constructors over TestInitialize methods"
docs/core/testing/mstest-analyzers/mstest0021.md MSTEST0021: Prefer Dispose over TestCleanup methods
docs/core/testing/mstest-analyzers/mstest0022.md docs/core/testing/mstest-analyzers/mstest0022
docs/core/testing/mstest-analyzers/mstest0023.md MSTEST0023: Do not negate boolean assertions
docs/core/testing/mstest-analyzers/mstest0024.md "MSTEST0024: Do not store TestContext in a static member"
docs/core/testing/mstest-analyzers/mstest0025.md MSTEST0025: Use 'Assert.Fail' instead of an always-failing assert
docs/core/testing/mstest-analyzers/mstest0026.md docs/core/testing/mstest-analyzers/mstest0026
docs/core/testing/mstest-analyzers/mstest0029.md MSTEST0029: Public method should be test method
docs/core/testing/mstest-analyzers/mstest0030.md MSTEST0030: Type containing [TestMethod] should be marked with [TestClass]
docs/core/testing/mstest-analyzers/mstest0031.md "MSTEST0031: System.ComponentModel.DescriptionAttribute has no effect on test methods."
docs/core/testing/mstest-analyzers/mstest0032.md MSTEST0032: Review or remove the assertion as its condition is known to be always true
docs/core/testing/mstest-analyzers/mstest0034.md docs/core/testing/mstest-analyzers/mstest0034

Note

This table shows preview links for the 30 files with the most changes. For preview links for other files in this PR, select OpenPublishing.Build Details within checks.

@Evangelink
Copy link
Member Author

@Youssef1313 thanks for the comments, indeed suppressors cannot be suppressed so I have edited the docs.

@IEvangelist IEvangelist merged commit 462d811 into dotnet:main Jan 17, 2025
8 checks passed
@Evangelink Evangelink deleted the mstest-suppression branch January 17, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to suppress MSTest analyzer rules?
3 participants