Skip to content

Add [GeneratedCode] for more RDG output #48377

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

Merged

Conversation

martincostello
Copy link
Member

Add [GeneratedCode] for more RDG output

Add [GeneratedCode] to more of the types emitted by the Request Delegate Generator.

Description

Mark more of the code emitted by the Request Delegate Generator as non-user code so that it should be excluded from reports from code coverage tools.

I wasn't sure on what a good way to add a test for this is, so I haven't included a test change. Happy to add something if you have a preferred approach.

Fixes #48376.

Add `[GeneratedCode]` to more of the types emitted by the Request Delegate Generator.
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label May 23, 2023
@ghost
Copy link

ghost commented May 23, 2023

Thanks for your PR, @martincostello. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mitchdenny
Copy link
Member

Thanks for the submission. You'll need to regenerate the baselines in order for the tests to pass. Look in the TestBase class there is a field that you can set to true which will cause it to update all the baselines and then set it back to false and the tests should then pass.

@martincostello
Copy link
Member Author

Thanks for pointing that out - I was just about to go looking at manually updating them before I saw your comment. Will push up the test fixes once I've gotten the repo setup nicely for debugging.

Update the test baselines.
@amcasey amcasey requested a review from mitchdenny May 24, 2023 01:47
@mitchdenny
Copy link
Member

Thanks for the contribution Martin!

@mitchdenny mitchdenny merged commit 7a1e2ea into dotnet:main May 24, 2023
@ghost ghost added this to the 8.0-preview6 milestone May 24, 2023
@martincostello martincostello deleted the issue-48376-add-generated-code-for-rdg branch May 24, 2023 05:56
@amcasey amcasey added area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed area-runtime labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc community-contribution Indicates that the PR has been added by a community member feature-rdg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request Delegate Generator code counts as user code for code coverage
3 participants