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

Refactor analyzers' test infrastructure #30814

Merged
merged 9 commits into from
May 3, 2023
Merged

Refactor analyzers' test infrastructure #30814

merged 9 commits into from
May 3, 2023

Conversation

DoctorKrolic
Copy link
Contributor

Closes: #30803

  • Moved all analyzer tests to Microsoft.CodeAnalysis.Testing
  • Created separate folders for different kinds of tests (this comes in handy when analyzer count is potentially large)
  • In roslyn and similar repos analyzer tests usually only check for diagnostic location via markup to simplify things and produce less boilerplate. Verification of message format, args etc. is done only when fixing a bug, that affects this things. However, I kept every single check there, including severity, message format and argments, which makes overall simplification less noticeable

@DoctorKrolic DoctorKrolic requested a review from wtgodbe as a code owner May 2, 2023 19:06
@DoctorKrolic DoctorKrolic changed the title Refactor test infrastructure Refactor analyzers' test infrastructure May 2, 2023
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Aside from the code alignment (see below), I think Analyzers and Suppressors folders are unneeded at this point, given that we only have one of each. We can always add these later.

@DoctorKrolic DoctorKrolic requested a review from roji May 3, 2023 10:14
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DoctorKrolic
Copy link
Contributor Author

@roji CI is green. Merge?

@roji roji merged commit 37c434d into dotnet:main May 3, 2023
@DoctorKrolic DoctorKrolic deleted the move-to-verify-cs branch May 3, 2023 12:06
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.

Move analyzer tests to VerifyCS
4 participants