Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace empty property with "-" #1701

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public String getProperty() {
* @return the display name
*/
public String getDisplayName(final String key) {
return propertyFormatter.apply(key);
return StringUtils.defaultIfBlank(propertyFormatter.apply(key), "-");
}

/**
Expand Down Expand Up @@ -151,9 +151,9 @@ public long getNewCount(final String key) {
* @param key
* the property instance
*
* @return the number of high-severity issues
* @return the number of error issues
*/
public long getErrorsCount(final String key) {
public long getErrorCount(final String key) {
return getReportFor(key).getSizeOf(Severity.ERROR);
}

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/main/resources/issues/property.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<td class="text-end">${count}</td>
<td class="text-end">${newCount}</td>
<td>
<issues:severity-distribution max="${t.max}" error="${t.getErrorsCount(key)}"
<issues:severity-distribution max="${t.max}" error="${t.getErrorCount(key)}"
high="${t.getHighCount(key)}"
normal="${t.getNormalCount(key)}" low="${t.getLowCount(key)}"/>
</td>
Expand Down
Loading
Loading