Skip to content

Commit fc930ee

Browse files
committed
deterministic ordering of checkstyle results
1 parent 8db5d1f commit fc930ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code-assert/src/main/java/guru/nidi/codeassert/checkstyle/CheckstyleAnalyzer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public class CheckstyleAnalyzer implements Analyzer<List<AuditEvent>> {
3838

3939
private static final Comparator<AuditEvent> EVENT_COMPARATOR = Comparator
4040
.comparing(AuditEvent::getSeverityLevel)
41-
.thenComparing(e -> e.getLocalizedMessage().getKey());
41+
.thenComparing(e -> e.getLocalizedMessage().getKey())
42+
.thenComparing(AuditEvent::getFileName)
43+
.thenComparing(AuditEvent::getLine);
4244

4345
private static class LoggingAuditListener implements AuditListener {
4446
final List<AuditEvent> events = new ArrayList<>();

0 commit comments

Comments
 (0)