Add displaying configuration and processing errors

This commit is contained in:
Erik C. Thauvin 2025-05-31 01:45:44 -07:00
parent 71e9ab7f98
commit 630f3fa8d2
Signed by: erik
GPG key ID: 776702A6A2DA330E
3 changed files with 208 additions and 131 deletions

View file

@ -0,0 +1,47 @@
/*
* Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package rife.bld.extension;
/**
* Represents the results of a PMD analysis, containing various counts
* related to violations, errors, and rules.
*
* @param violations The number of violations found during the analysis
* @param suppressedViolations The number of suppressed violations found during the analysis
* @param errors The number of errors returned during the analysis
* @param processingErrors The number of processing errors returned during the analysis
* @param configurationErrors The number of processing errors returning during the analysis
* @param rulesChecked The number of rules checked during the analysis
* @since 1.2.4
*/
public record PmdAnalysisResults(
int violations,
int suppressedViolations,
int errors,
int processingErrors,
int configurationErrors,
int rulesChecked) {
/**
* Checks if the analysis results indicate no errors of any type.
*
* @return {@code true} if there are no errors, {@code false} otherwise.
*/
public boolean hasNoErrors() {
return errors == 0 && processingErrors == 0 && configurationErrors == 0;
}
}