Skip to content

Commit

Permalink
show linting time
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 17, 2024
1 parent 0a11bb2 commit e7b9e55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public final class LintMojo extends SafeMojo {

@Override
void exec() throws IOException {
final long start = System.currentTimeMillis();
final Collection<ForeignTojo> tojos = this.scopedTojos().withShaken();
final ConcurrentHashMap<Severity, Integer> counts = new ConcurrentHashMap<>();
counts.putIfAbsent(Severity.CRITICAL, 0);
Expand All @@ -106,8 +107,8 @@ void exec() throws IOException {
final String sum = LintMojo.summary(counts);
Logger.info(
this,
"Linted %d out of %d XMIR program(s) that needed this (out of %d total programs): %s",
passed, tojos.size(), tojos.size(), sum
"Linted %d out of %d XMIR program(s) that needed this (out of %d total programs) in %[ms]s: %s",
passed, tojos.size(), tojos.size(), System.currentTimeMillis() - start, sum
);
if (counts.get(Severity.ERROR) > 0 || counts.get(Severity.CRITICAL) > 0) {
throw new IllegalStateException(
Expand Down

0 comments on commit e7b9e55

Please sign in to comment.