Skip to content

Commit

Permalink
Merge pull request #1085 from hcoles/feature/no_timestamps
Browse files Browse the repository at this point in the history
Do not produce timestamped reports by default
  • Loading branch information
hcoles authored Sep 27, 2022
2 parents 56eb3c4 + 568d69e commit 91bf2e4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public OptionsParser(Predicate<String> dependencyFilter) {
"whether or not to try and detect code inlined from finally blocks");

this.timestampedReportsSpec = parserAccepts(TIME_STAMPED_REPORTS)
.withOptionalArg().ofType(Boolean.class).defaultsTo(true)
.withOptionalArg().ofType(Boolean.class).defaultsTo(false)
.describedAs("whether or not to generated timestamped directories");

this.timeoutFactorSpec = parserAccepts(TIMEOUT_FACTOR).withOptionalArg()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ public void shouldDetermineIfInlinedCodeFlagIsSetWhenFalseSupplied() {
}

@Test
public void shouldCreateTimestampedReportsByDefault() {
public void shouldNotCreateTimestampedReportsByDefault() {
final ReportOptions actual = parseAddingRequiredArgs();
assertTrue(actual.shouldCreateTimeStampedReports());
assertFalse(actual.shouldCreateTimeStampedReports());
}

@Test
public void shouldDetermineIfSuppressTimestampedReportsFlagIsSet() {
final ReportOptions actual = parseAddingRequiredArgs("--timestampedReports");
final ReportOptions actual = parseAddingRequiredArgs("--timestampedReports=true");
assertTrue(actual.shouldCreateTimeStampedReports());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public enum ConfigOption {
/**
* Do/don't create timestamped folders for reports
*/
TIME_STAMPED_REPORTS("timestampedReports", true),
TIME_STAMPED_REPORTS("timestampedReports", false),

/**
* Number of threads to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<configuration>
<verbose>true</verbose>
<outputFormats><value>XML</value></outputFormats>
<timestampedReports>false</timestampedReports>
<exportLineCoverage>true</exportLineCoverage>
<mutators>
<mutator>VOID_METHOD_CALLS</mutator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public class AbstractPitMojo extends AbstractMojo {
/**
* Create timestamped subdirectory for report
*/
@Parameter(defaultValue = "true", property = "timestampedReports")
@Parameter(defaultValue = "false", property = "timestampedReports")
private boolean timestampedReports;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class PitReportMojo extends AbstractMavenReport {
*
*/
@Parameter(property = "pit.report.outputdir", defaultValue = "pit-reports")
private String siteReportDirectory;
private String siteReportDirectory;

@Parameter(property = "pit.inputEncoding", defaultValue = "${project.build.sourceEncoding}")
private String inputEncoding;
Expand Down

0 comments on commit 91bf2e4

Please sign in to comment.