Skip to content

Commit

Permalink
CAUTION NOT WORKING!
Browse files Browse the repository at this point in the history
Dropped duplicate code from conflicting rebase
  • Loading branch information
ascheman committed Nov 20, 2024
1 parent 761df53 commit edd1613
Showing 1 changed file with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.aim42.htmlsanitychecker.maven;
package org.aim42.htmlsanitycheck.maven;

import org.aim42.htmlsanitycheck.AllChecksRunner;
import org.aim42.htmlsanitycheck.Configuration;
Expand Down Expand Up @@ -106,24 +106,6 @@ public void execute() throws MojoExecutionException {
throw new MojoExecutionException("Cannot write to JUnit results directory.");
}
}

// Perform checks
AllChecksRunner allChecksRunner = new AllChecksRunner(myConfig);
PerRunResults allChecks = allChecksRunner.performAllChecks();

// Handle findings
int nrOfFindingsOnAllPages = allChecks.nrOfFindingsOnAllPages();
getLog().debug("Found " + nrOfFindingsOnAllPages + " error(s) on all checked pages");

if (failOnErrors && nrOfFindingsOnAllPages > 0) {
String failureMsg = String.format(
"Your build configuration included 'failOnErrors=true', and %d error(s) were found on all checked pages. See %s for a detailed report.",
nrOfFindingsOnAllPages, checkingResultsDir
);
throw new MojoExecutionException(failureMsg);
}


} catch (MisconfigurationException e) {
throw new MojoExecutionException(e);
} catch (IOException e) {
Expand Down

0 comments on commit edd1613

Please sign in to comment.