Feature request: configuration option to ignore trivial code
See original GitHub issueHi,
Would it be possible to have a global configuration option to ignore trivial code, similar to Cobertura’s IgnoreTrivial
?
In particular, I’d like to ignore properties with standard getters/setters without having to annotate each of them with ExcludeFromCodeCoverage
or another attribute.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
Please make it easy to disable the Assist feature from ...
The most obvious solution to me would be to add the option to exclude entries from default_config: in the configuration. Example: default_config ...
Read more >Option to disable missing_docs for trivial public init's #4107
New rule request. We often need trivial public init functions to allow an object to created. But this causes a missing_docs warning from ......
Read more >Possibility to disable comment suggestion? #8062
This product is really incredible. The one thing I would like to have is the ability to disable these two behaviors upon will:...
Read more >Disable Code Like Magic With Feature Flags
Disable code in production without touching it. Sound like magic? It's not: gain that power by adopting feature flags.
Read more >Option to opt out trivial methods from test coverage
I agree to have this feature (ignore some lines from code coverage). At the moment I want to have 100% coverage, but my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To clarify, what I meant is that I’d prefer something like
--exclude-auto-properties
over--exclude-trivial-code
: the latter is ambiguous about what it does, while the former seems pretty clear to me.It would be even stricter than Cobertura’s
ignoreTrivial
option in that it would only excludeget
s andset
s without a body. Constructors would be entirely out of scope.Ultimately though, this is just a minor inconvenience to us. I thought that others could benefit from having this feature, but if the maintainers of this great tool and the community disagree, I won’t be offended if this request is denied.
See also issue #81