@@ -72,13 +72,19 @@ public String asString(File file, Formatter formatter) {
72
72
if (lints != null ) {
73
73
FormatterStep step = formatter .getSteps ().get (i );
74
74
for (Lint lint : lints ) {
75
- result .append (file .getName ()).append (":" ).append (lint .getLineStart ());
76
- if (lint .getLineEnd () != lint .getLineStart ()) {
77
- result .append ("-" ).append (lint .getLineEnd ());
75
+ result .append (file .getName ()).append (":" );
76
+ if (lint .getLineStart () == Lint .LINE_UNDEFINED ) {
77
+ result .append ("LINE_UNDEFINED" );
78
+ } else {
79
+ result .append ("L" );
80
+ result .append (lint .getLineStart ());
81
+ if (lint .getLineEnd () != lint .getLineStart ()) {
82
+ result .append ("-" ).append (lint .getLineEnd ());
83
+ }
78
84
}
79
85
result .append (" " );
80
- result .append (step .getName ()).append ("(" ).append (lint .getCode ()).append (") " );
81
- result .append (lint .getMsg ());
86
+ result .append (step .getName ()).append ("(" ).append (lint .getRuleId ()).append (") " );
87
+ result .append (lint .getDetail ());
82
88
result .append ("\n " );
83
89
}
84
90
}
@@ -111,7 +117,7 @@ public static LintState of(Formatter formatter, File file, byte[] rawBytes) {
111
117
lints .set (i , lintsForStep );
112
118
}
113
119
} catch (Exception e ) {
114
- lints .set (i , List .of (Lint .createFromThrowable (step , toLint , e )));
120
+ lints .set (i , List .of (Lint .createFromThrowable (step , e )));
115
121
}
116
122
}
117
123
}
@@ -142,7 +148,7 @@ public static LintState of(Formatter formatter, File file, byte[] rawBytes) {
142
148
if (exceptionForLint instanceof Lint .Has ) {
143
149
lintsForStep = ((Lint .Has ) exceptionForLint ).getLints ();
144
150
} else if (exceptionForLint != null && exceptionForLint != formatStepCausedNoChange ()) {
145
- lintsForStep = List .of (Lint .createFromThrowable (step , toLint , exceptionForLint ));
151
+ lintsForStep = List .of (Lint .createFromThrowable (step , exceptionForLint ));
146
152
} else {
147
153
lintsForStep = List .of ();
148
154
}
0 commit comments