Document MSTEST0047 and the MSTest 4.3 analyzers (MSTEST0064-0068)#54187
Open
Evangelink wants to merge 6 commits into
Open
Document MSTEST0047 and the MSTest 4.3 analyzers (MSTEST0064-0068)#54187Evangelink wants to merge 6 commits into
Evangelink wants to merge 6 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reviewed all analyzers shipped (and about to ship) by
MSTest.Analyzersagainst the docs indocs/core/testing/mstest-analyzers/and added reference pages for the six analyzers that have no documentation today.MSTEST0047— Suppress IDE0060 for unusedTestContextparameterMSTEST0064— Prefer async assertion methodsMSTEST0065— AvoidAssert.AreEqualon collection typesMSTEST0066—[Ignore]should specify a justificationMSTEST0067— AvoidThread.Sleep/Task.Wait/Task<T>.Resultin test codeAllanalysis mode)MSTEST0068— UseAssertinstead ofCollectionAssertSource-of-truth verification:
.csfile insrc/Analyzers/MSTest.Analyzers/.MSTEST0067is not tagged withDisableInAllMode, so the per-mode behavior described in the doc is consistent withAnalyzerSeverityDecider.Changes
docs/core/testing/mstest-analyzers/.overview.md: "All rules" table now has rows for the new analyzers; "Rules by concept" lists the new analyzers under their relevant sections (Assertions, Async/await patterns, Lifecycle & initialization).usage-rules.md,design-rules.md,suppression-rules.md: tables and "Common scenarios" subsections now reference the new analyzers.docs/navigate/devops-testing/toc.ymlso the new pages appear in the testing TOC.Content sourced from
microsoft/testfx:.csfiles (severity/category/enabled-by-default).Resources.resx(titles and descriptions).CollectionAssertToAssertAnalyzer.csXML doc remarks (used for the mapping table inMSTEST0068).All new pages are flagged with
ai-usage: ai-assistedper repo guidelines.Out-of-scope follow-ups identified during the review
These came up during the audit but aren't covered in this PR to keep the scope focused:
microsoft-testing-platform-cli-options.mdis missing the--show-stdoutand--show-stderroptions that shipped in MTP 2.2.1.Microsoft.Testing.Extensions.AzureDevOpsReportextension is mentioned inmicrosoft-testing-platform-test-reports.mdandunit-testing-mstest-sdk.mdbut has no dedicated overview/usage page.Microsoft.Testing.Platform.AIandMicrosoft.Testing.Extensions.AzureFoundryaren't referenced anywhere indocs/core/testing/; once they exit alpha they'll need their own pages.Validation
npx markdownlint-cli2passes on all changed and new files.ai-usage: ai-assisted
Internal previews
Toggle expand/collapse
TestContextparameter suppressorAssert.AreEqualon collection types