Skip to content

Commit

Permalink
[MNG-7902] Sort plugins in the validation report (#1510)
Browse files Browse the repository at this point in the history
Co-authored-by: Yueh Chun Wu <kevinwu@YuehdeMBP.attlocal.net>

(cherry picked from commit dd96794)
  • Loading branch information
yuehcw authored and slawekjaranowski committed Jun 5, 2024
1 parent a2fa050 commit df00ea5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -222,7 +223,12 @@ private void reportSessionCollectedValidationIssues(MavenSession mavenSession) {
logger.warn("");
logger.warn("Plugin {} validation issues were detected in following plugin(s)", issueLocalitiesToReport);
logger.warn("");
for (Map.Entry<String, PluginValidationIssues> entry : issuesMap.entrySet()) {

// Sorting the plugins
List<Map.Entry<String, PluginValidationIssues>> sortedEntries = new ArrayList<>(issuesMap.entrySet());
sortedEntries.sort(Map.Entry.comparingByKey(String.CASE_INSENSITIVE_ORDER));

for (Map.Entry<String, PluginValidationIssues> entry : sortedEntries) {
PluginValidationIssues issues = entry.getValue();
if (!hasAnythingToReport(issues, issueLocalitiesToReport)) {
continue;
Expand Down

0 comments on commit df00ea5

Please sign in to comment.