Skip to content

Add analyzer for Assert APIs with format #6293

@Evangelink

Description

@Evangelink

Summary

Add an analyzer for all Assert/CollectionAssert/StringAssert APIs that reports a diagnostic if the user uses the overload with string format, params object[] items (naming of the parameters might differ) because these APIs will be dropped in MSTest v4.

The analyzer should have an associated code fix, allowing the user to replace all instances with either string. Format call or interpolated string.

Examples:

Assert.IsTrue(true, "a {0}", `); // Diagnostic

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions