Exclude public static void main() method from uncoverage report

Skip to first unread message

Raja Nagendra Kumar

Mar 27, 2023, 1:23:03 PMMar 27
to PIT Users
I tried this pattern in gralde

excludedMethods = ['static com.teja.dsa.bbraces.BalancedBraces.main']

but pitest is still not ignore the main method..

Can any say, how to fix this.

Henry Coles

Mar 27, 2023, 1:43:52 PMMar 27
to pitu...@googlegroups.com
The excluded methods parameter takes simple method names, so


Should work, but would exclude all methods named main.

Alternatively, you could annotate main with an annotation with runtime retention named 'Generated', 'DoNotMutate' or 'CoverageIgnore'.

Or, you could use the exclusions functionality from arcmutate.

You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pitusers/1a2a873a-52c7-4e96-8327-1b72be7904fan%40googlegroups.com.
Reply all
Reply to author
Message has been deleted
0 new messages