Skip to content

Fix StringAssertToAssertFixer to swap StringComparison and message arguments#6481

Merged
Evangelink merged 1 commit intomainfrom
dev/ygerges/stringassert-analyzer
Sep 2, 2025
Merged

Fix StringAssertToAssertFixer to swap StringComparison and message arguments#6481
Evangelink merged 1 commit intomainfrom
dev/ygerges/stringassert-analyzer

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

Fixes #6444

@Evangelink Evangelink merged commit 6621a3c into main Sep 2, 2025
9 checks passed
@Evangelink Evangelink deleted the dev/ygerges/stringassert-analyzer branch September 2, 2025 07:14
@Youssef1313
Copy link
Copy Markdown
Member Author

/backport to rel/3.10

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 2, 2025

Started backporting to rel/3.10: https://github.com/microsoft/testfx/actions/runs/17396358368

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 2, 2025

@Youssef1313 backporting to rel/3.10 failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix StringAssertToAssertFixer to swap StringComparison and message arguments
Using index info to reconstruct a base tree...
M	src/Analyzers/MSTest.Analyzers.CodeFixes/StringAssertToAssertFixer.cs
M	test/UnitTests/MSTest.Analyzers.UnitTests/StringAssertToAssertAnalyzerTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Analyzers/MSTest.Analyzers.CodeFixes/StringAssertToAssertFixer.cs
CONFLICT (content): Merge conflict in src/Analyzers/MSTest.Analyzers.CodeFixes/StringAssertToAssertFixer.cs
Auto-merging test/UnitTests/MSTest.Analyzers.UnitTests/StringAssertToAssertAnalyzerTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fix StringAssertToAssertFixer to swap StringComparison and message arguments
Error: The process '/usr/bin/git' failed with exit code 128

NOTE: A PR will be created, but needs to be revised manually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify behavior of codefix that switches StringAssert to Assert

2 participants