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

Add custom verifiers to the test project #545

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jun 5, 2020

Add verifier implementations, which are used to customize test framework behavior in the context of a specific analyzer project.

@sharwell
Copy link
Member Author

Rebased to no longer depend on #544

@sharwell sharwell marked this pull request as ready for review June 29, 2020 17:57
@sharwell sharwell requested a review from a team as a code owner June 29, 2020 17:57

namespace $safeprojectname$
{
public static partial class CSharpAnalyzerVerifier<TAnalyzer>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why have these as source code in the templates instead of adding them the the library itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

The ones in the library cannot be edited as part of the project.

@jmarolf
Copy link
Contributor

jmarolf commented Jun 29, 2020

I do not understand why these need to be added to the templates

@jmarolf
Copy link
Contributor

jmarolf commented Jun 29, 2020

My question still stands: why not just have these types exist in the library itself instead of the templates?

Copy link
Contributor

@jmarolf jmarolf left a comment

Choose a reason for hiding this comment

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

:shipit:

@sharwell
Copy link
Member Author

My question still stands: why not just have these types exist in the library itself instead of the templates?

I answered this in a nested conversation above: #545 (comment)

Having these files as an intermediate layer between the analyzer tests and the SDK means users can customize default behavior if the standard defaults don't make sense for the project. Over time, we'll likely move some of the properties people add to this layer back into the library itself, but it's good to have a central point that can be tweaked/modified.

@sharwell sharwell merged commit 18ca742 into dotnet:master Jun 29, 2020
@sharwell sharwell deleted the custom-verifiers branch June 29, 2020 23:13
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