Skip to content

Add [GeneratedCode] for more RDG output - #48377

Merged
mitchdenny merged 2 commits into
dotnet:mainfrom
martincostello:issue-48376-add-generated-code-for-rdg
May 24, 2023
Merged

mitchdenny merged 2 commits into
dotnet:mainfrom
martincostello:issue-48376-add-generated-code-for-rdg

Conversation

@martincostello

Copy link
Copy Markdown
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 area-runtime community-contribution Indicates that the PR has been added by a community member labels May 23, 2023
@ghost

ghost commented May 23, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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