Skip to content

Add support for excluding generated classes from mutation based on source path #364

@jwilmoth-ehs

Description

@jwilmoth-ehs

We have a number of different 3rd party code generation tools (e.g. Mapstruct, DSG) that we do not want to mutate. Because of the different ways code is generated (e.g. annotation processor generated classes depend on src/main/java classes, src/main/java classes depend on types generated from graphql schema files) we're looking for an approach based on source paths being different for generated code vs. handwritten code. The plugin docs state:

To make life easier taskClasspath, mutableCodePaths, sourceDirs, reportDir, verbosity and pitestVersion are automatically set by the plugin. In addition sourceDirs, reportDir, verbosity and pitestVersion can be overridden by a user.

The reportDir and pitestVersion are indeed exposed in the plugin extension, but the sourceDirs property is not.

What is the recommended way to exclude build/generated/** classes from this plugin? Is it intended to be via the sourceDirs property? Some other property (e.g. mutableCodePaths)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions