File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
frontend/subrequests/lint Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ func (results *LintResults) PrintTo(w io.Writer, scb SourceInfoMap) error {
180
180
return nil
181
181
}
182
182
183
- func (results * LintResults ) PrintErrorTo (w io.Writer ) {
183
+ func (results * LintResults ) PrintErrorTo (w io.Writer , scb SourceInfoMap ) {
184
184
// This prints out the error in LintResults to the writer in a format that
185
185
// is consistent with the warnings for easier downstream consumption.
186
186
if results .Error == nil {
@@ -189,6 +189,9 @@ func (results *LintResults) PrintErrorTo(w io.Writer) {
189
189
190
190
fmt .Fprintln (w , results .Error .Message )
191
191
sourceInfo := results .Sources [results .Error .Location .SourceIndex ]
192
+ if scb != nil {
193
+ sourceInfo = scb (sourceInfo )
194
+ }
192
195
source := errdefs.Source {
193
196
Info : sourceInfo ,
194
197
Ranges : results .Error .Location .Ranges ,
You can’t perform that action at this time.
0 commit comments