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 API to Microsoft.CodeAnalysis.SourceGenerators.Testing to allow for providing GlobalOptions #823

Closed
jmarolf opened this issue May 19, 2021 · 3 comments

Comments

@jmarolf
Copy link
Contributor

jmarolf commented May 19, 2021

see example here: jmarolf/generator-start#11

would be nice if the user could provide a set of global options for testing.

CC: @sharwell

@sharwell
Copy link
Member

This API was added in #734

@jmarolf
Copy link
Contributor Author

jmarolf commented May 20, 2021

The intent here is for people who want to test consumption of MSBuild Properties. Should probably probably update this to make that clear. Someone could specify this information via editorconfig files but if the intent is to check an msbuild property what do we recommend?

@sharwell
Copy link
Member

MSBuild properties are injected via a global config, so it would be tested using AnalyzerConfigFiles with this format:

is_global = true

// properties here

@jmarolf jmarolf closed this as completed May 21, 2021
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 a pull request may close this issue.

2 participants