Skip to content

Commit c84731f

Browse files
authored
Small code cleanup (#28)
1 parent 0c8cb75 commit c84731f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

jacoco-console-reporter/src/main/java/io/github/svaningelgem/DirectoryNode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import lombok.Data;
44
import lombok.RequiredArgsConstructor;
5+
import org.apache.maven.plugin.logging.Log;
56
import org.jetbrains.annotations.NotNull;
67

78
import java.util.ArrayList;
@@ -43,8 +44,8 @@ public boolean shouldInclude() {
4344
return !sourceFiles.isEmpty() || subdirectories.values().stream().anyMatch(DirectoryNode::shouldInclude);
4445
}
4546

46-
<T extends FileSystemNode> void printNodes(org.apache.maven.plugin.logging.Log log, String prefix,
47-
String format, String packagePath, boolean showFiles, @NotNull List<T> nodes, boolean extraCheck) {
47+
<T extends FileSystemNode> void printNodes(Log log, String prefix,
48+
String format, String packagePath, boolean showFiles, @NotNull List<T> nodes, boolean extraCheck) {
4849
for (int i = 0; i < nodes.size(); i++) {
4950
boolean isLast = (i == nodes.size() - 1) && extraCheck;
5051
FileSystemNode node = nodes.get(i);
@@ -67,7 +68,7 @@ <T extends FileSystemNode> void printNodes(org.apache.maven.plugin.logging.Log l
6768
}
6869

6970
@Override
70-
public void printTree(org.apache.maven.plugin.logging.@NotNull Log log, String prefix,
71+
public void printTree(@NotNull Log log, String prefix,
7172
String format, String packagePath, boolean showFiles) {
7273
// Skip empty directories
7374
if (!shouldInclude()) {

jacoco-console-reporter/src/main/java/io/github/svaningelgem/FileSystemNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.svaningelgem;
22

3+
import org.apache.maven.plugin.logging.Log;
34
import org.jetbrains.annotations.NotNull;
45

56
/**
@@ -26,7 +27,7 @@ interface FileSystemNode extends Comparable<FileSystemNode> {
2627
* @param packagePath Current package path
2728
* @param showFiles Whether to show files
2829
*/
29-
default void printTree(@NotNull org.apache.maven.plugin.logging.Log log, String prefix,
30+
default void printTree(@NotNull Log log, String prefix,
3031
String format, String packagePath, boolean showFiles) {
3132
CoverageMetrics metrics = getMetrics();
3233

jacoco-console-reporter/src/main/java/io/github/svaningelgem/JacocoConsoleReporterMojo.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
* This plugin provides a simple way to view coverage metrics directly in the console
2626
* without needing to generate HTML or XML reports.
2727
*/
28-
@Mojo(name = "report", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
28+
@Mojo(
29+
name = "report",
30+
defaultPhase = LifecyclePhase.VERIFY,
31+
threadSafe = true
32+
)
2933
public class JacocoConsoleReporterMojo extends AbstractMojo {
3034
private final Pattern PACKAGE_PATTERN = Pattern.compile("(?:^|\\*/)\\s*package\\s+([^;]+);", Pattern.DOTALL | Pattern.MULTILINE);
3135

0 commit comments

Comments
 (0)