Suppressions in the source code?

8 views
Skip to first unread message

Ullrich Hafner

unread,
Jul 3, 2025, 3:30:51 PMJul 3
to pitu...@googlegroups.com
Sometimes we have mutations that cannot be eliminated. From the documentation I see that you can use global excludes in the Maven pom with the free version of PIT (methods or types) or some inline text markers with arcmutate. I did not find a way to use simple annotations in the style of @SuppressMutation(type=„VoidMutator“, justification=„text“) or something similar (only the @Generated annotation). Or another simple option would be a suppression file. Are you planning to provide such a feature in the future? Or are you open to a pull request for such a feature from one of my students? Or would such a thing be a problem with the unique selling point of arcmutate?

Currently I am using PIT in my auto grading tools for my student assignments where students see all survived mutations in the source code. So it would be helpful if they can ignore some false positives in an easy way so they can still get the full grading points.

Ulli


Henry Coles

unread,
Jul 4, 2025, 5:02:09 AMJul 4
to pitu...@googlegroups.com
Hi Ulli,

If you wish to implement something custom to meet your needs, there is no need to modify pitest. It uses a plugin system, so the functionality can be implemented independently of the main codebase. The appropriate extension point would be 


There are several examples of using it in the codebase, including the existing annotation processor.

Regards

Henry

--
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 visit https://groups.google.com/d/msgid/pitusers/3E529AC7-1050-431D-B4CE-45FC809439E5%40gmail.com.

Ullrich Hafner

unread,
Jul 4, 2025, 9:49:51 AMJul 4
to pitu...@googlegroups.com
Thanks for the pointer! Such a new implementation looks feasible and seems to be a good thesis topic for one of my students as well. 

Reply all
Reply to author
Forward
0 new messages