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

Provide an extensibility point in AnalyzerTest for sorting diagnostics. #1003

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

jkoritzinsky
Copy link
Member

The sort here is non-deterministic for any analyzers whose diagnostics can differ only on the message format and properties.

Allow the sorting algorithm to be changed by the user to include either or both of these elements if they emit diagnostics that differ only on these values from a concurrent analyzer (the .NET Interop team owns an analyzer like this, which prompted this work). This will ensure that everyone can ensure that their diagnostic and code-fix tests (which rely on the ordering to determine the order for the iterative code-fix tests and the fix-all tests) are deterministic.

cc: @sharwell

The sort here is non-deterministic for any analyzers whose diagnostics can differ only on the message format and properties.

Allow the sorting algorithm to be changed by the user to include either or both of these elements if they emit diagnostics that differ only on these values from a concurrent analyzer (the .NET Interop team owns an analyzer like this, which prompted this work). This will ensure that everyone can ensure that their diagnostic and code-fix tests (which rely on the ordering to determine the order for the iterative code-fix tests and the fix-all tests) are deterministic.
@mavasani mavasani enabled auto-merge August 3, 2022 16:55
@mavasani mavasani merged commit 7d6d807 into dotnet:main Aug 3, 2022
@jkoritzinsky jkoritzinsky deleted the extensible-analyzer-sorting branch August 3, 2022 20:34
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.

2 participants