Skip to content

Commit 833314f

Browse files
committed
build(release): [1.2.2] - 2025-12-03
1 parent 85b3392 commit 833314f

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [1.2.0] - 2025-12-03
10+
## [1.2.2] - 2025-12-03
11+
12+
### Fixed
13+
14+
- generic result handling
15+
16+
## [1.2.1] - 2025-12-03
1117

1218
### Changed
1319

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<relativePath></relativePath>
1010
</parent>
1111
<artifactId>junit5-tag-check-maven-plugin</artifactId>
12-
<version>1.2.2-SNAPSHOT</version>
12+
<version>1.2.2</version>
1313
<packaging>maven-plugin</packaging>
1414
<name>junit5-tag-check-maven-plugin</name>
1515
<description>A simple plugin to check the presence of JUnit5 test by tags.</description>

src/main/java/org/fugerit/java/junit5/tag/check/ExecutedTestTagReporterMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void execute() throws MojoExecutionException {
7373
TagScanFacade.extractTagsFromExecutedTests(executedTests, classLoader);
7474

7575
// Generate report
76-
TagReportFacade.generateReport( this.format, this.includeSkipped, this.outputFile, testTagMap);
76+
TagReportFacade.generateReport( this.format, this.includeSkipped, this.outputFile, testTagMap, this.requiredTags );
7777

7878
// Check for required tags
7979
if (requiredTags != null && !requiredTags.isEmpty()) {

src/main/java/org/fugerit/java/junit5/tag/check/facade/TagReportFacade.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
@Slf4j
2020
public class TagReportFacade {
2121

22-
public static void generateReport(String format, boolean includeSkipped, File outputFile, Map<ExecutedTest, Set<String>> testTagMap)
22+
public static void generateReport(String format, boolean includeSkipped, File outputFile, Map<ExecutedTest, Set<String>> testTagMap, Collection<String> requiredTags)
2323
throws IOException {
2424
TagReportFacade facade = new TagReportFacade(format, includeSkipped, outputFile);
25-
facade.generateReport(testTagMap);
25+
facade.generateReport(testTagMap, requiredTags);
2626
}
2727

2828
private File outputFile;
@@ -37,11 +37,11 @@ private TagReportFacade(String format, boolean includeSkipped, File outputFile)
3737
this.outputFile = outputFile;
3838
}
3939

40-
private void generateReport(Map<ExecutedTest, Set<String>> testTagMap)
40+
private void generateReport(Map<ExecutedTest, Set<String>> testTagMap, Collection<String> requiredTags)
4141
throws IOException {
4242
outputFile.getParentFile().mkdirs();
4343

44-
ReportHelper helper = new ReportHelper( testTagMap );
44+
ReportHelper helper = new ReportHelper( testTagMap, requiredTags );
4545

4646
switch (format.toLowerCase()) {
4747
case DocConfig.TYPE_JSON:

src/main/java/org/fugerit/java/junit5/tag/check/model/ReportHelper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.fugerit.java.junit5.tag.check.model;
22

33
import lombok.extern.slf4j.Slf4j;
4+
import org.fugerit.java.core.util.ObjectUtils;
45
import org.fugerit.java.junit5.tag.check.facade.TagCheckFacade;
56

67
import java.util.*;
@@ -16,7 +17,9 @@ public class ReportHelper {
1617

1718
private Map<String, TestStats> tagStats;
1819

19-
public ReportHelper(Map<ExecutedTest, Set<String>> testTagMap) {
20+
private Collection<String> requiredTags;
21+
22+
public ReportHelper(Map<ExecutedTest, Set<String>> testTagMap, Collection<String> requiredTags) {
2023
this.testTagMap = testTagMap;
2124
// report model
2225
this.reportModel = new ReportModel();
@@ -41,6 +44,8 @@ public ReportHelper(Map<ExecutedTest, Set<String>> testTagMap) {
4144
if (test.isSkipped()) stats.increaseSkipped();
4245
}
4346
}
47+
48+
this.requiredTags = requiredTags;
4449
}
4550

4651
public Map<ExecutedTest, Set<String>> getTestTagMap() {
@@ -83,7 +88,7 @@ public Map<String, TestStats> getTagsStats() {
8388
}
8489

8590
public TagCheckResult getTagCheckResult() {
86-
return TagCheckFacade.checkHelper( this.tagToTests.keySet(), testTagMap );
91+
return TagCheckFacade.checkHelper(ObjectUtils.objectWithDefault( this.requiredTags, Collections.emptyList() ), testTagMap );
8792
}
8893

8994
}

0 commit comments

Comments
 (0)