Skip to content
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

Ignore absent code directories when aggregating report #466

Merged
merged 1 commit into from
May 23, 2018

Conversation

maxgabut
Copy link
Collaborator

@maxgabut maxgabut commented May 5, 2018

Current state

Currently, the ReportAggregator builder requires all code directories it works with to be non null, to exist, and to actually be directories. This is standard argument checking and it works just fine for most cases.

However, this behavior is problematic with some maven project structures.

In a maven project using submodules, one may choose to add a non standard source directory. This may be configured in the root pom and applied to all submodules. If this directory has a special purpose, for instance code generated by a given tool, it may not be used by all submodules.

In such a project, when listing source directories, plugins will see the additional source folder everytime, even for submodules where it is not used.

Because of the checks done in ReportAggregator, pitest report aggregation fails when this directory is not present.

Proposed solution

Some maven plugins works fine in the same situation, for instance, maven-resources-plugin just logs that a given folder was not found and continues its execution.

I propose we do the same here.

@maxgabut
Copy link
Collaborator Author

@hcoles what are you thought on this one ? Do you need me to link this PR to an issue ? (If so I think I can use #467, it's about the problem I'm trying to solve, but in a simpler/clearer form)

@hcoles hcoles merged commit dd13d70 into hcoles:master May 23, 2018
@hcoles
Copy link
Owner

hcoles commented May 23, 2018

@maxgabut Sorry for the slow response - now merged. Thanks for taken the time to create at PR.

@maxgabut maxgabut deleted the ignore-empty-directory branch May 24, 2018 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants