forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate a report for missing Javadoc and fail the build if not empty
- Loading branch information
Showing
6 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...oc-maven-plugin/src/main/java/io/quarkus/maven/config/doc/generator/GenerationReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.quarkus.maven.config.doc.generator; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import io.quarkus.annotation.processor.documentation.config.model.SourceElementType; | ||
|
||
public class GenerationReport { | ||
|
||
private Map<String, List<GenerationViolation>> violations = new LinkedHashMap<>(); | ||
|
||
void addError(GenerationViolation error) { | ||
this.violations.computeIfAbsent(error.sourceType(), k -> new ArrayList<>()).add(error); | ||
} | ||
|
||
public Map<String, List<GenerationViolation>> getViolations() { | ||
return violations; | ||
} | ||
|
||
public record ConfigPropertyGenerationViolation(String sourceType, String sourceElement, | ||
SourceElementType sourceElementType, String message) implements GenerationViolation { | ||
|
||
@Override | ||
public String sourceElement() { | ||
return sourceElement + (sourceElementType == SourceElementType.METHOD ? "()" : ""); | ||
} | ||
} | ||
|
||
public interface GenerationViolation { | ||
|
||
String sourceType(); | ||
|
||
String sourceElement(); | ||
|
||
String message(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters