-
Notifications
You must be signed in to change notification settings - Fork 388
GeneratedCodeAttribute #125
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
Comments
Hi @kimbell, take a look at this https://github.com/tonerdo/coverlet#excluding-from-coverage to get an idea how to ignore your generated code. Let me know if you need any help |
We have multiple projects and we use cake as the build system. One of our goals is to keep the cake file the same across each project so that it's easy to update things. If we need to exclude namespaces, we would need some way of keeping that configuration external to the cake file. It's possible, but seems like a bit of a hassle. This would also mean that you would have to ensure that the code is generating code into namespaces you don't use for your custom code. This is also possible, but not very intuitive. Would it be possible to provide as list of attributes that should be used for exclusion on the command line? What is the argument for not excluding generated code? |
Why not just exclude the generated files using the |
ExcludeByFile is an option, but I would still have to maintain a list for each project if I am to share the build configuration. Doable, but nice to avoid if possible. |
You can now use |
Tried out this functionality and love the approach.
When running the coverage through coverlet, I noticed a significant drop compared to when running under Resharper.
My project has a lot of auto-generated code for WCF and Swagger clients. These are marked with the GeneratedCodeAttribute. It would be a good idea to add this to the list of attributes that excludes code.
The text was updated successfully, but these errors were encountered: