File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 67
67
< % } % >
68
68
< a href= " <%= issue.url %>" > at line < %= issue .line % > position < %= issue .character % >< / a>
69
69
< div>< tt>
70
- < %= issue .reason % > (< a href= " http://eslint.org/docs/rules/<%= issue.shortname %>.html" class = " open-external" >< %= issue .shortname % >< / a> )
70
+ < %= issue .reason % >
71
+ < % if (issue .shortname ) { % >
72
+ (< a href= " http://eslint.org/docs/rules/<%= issue.shortname %>.html" class = " open-external" >< %= issue .shortname % >< / a> )
73
+ < % } % >
71
74
< / tt>< / div>
72
75
< / li>
73
76
< % } %>
Original file line number Diff line number Diff line change @@ -294,8 +294,10 @@ def validate(quiet=False):
294
294
sys .exit ()
295
295
296
296
# parse the results
297
- rx = re .compile ('^[^:]+\: line (?P<line>\d+), col (?P<character>\d+), ' +
298
- '(?P<code>\w+) - (?P<reason>.+) \((?P<shortname>\w+)\)$' )
297
+
298
+ rx = re .compile ('^[^:]+\\ : line (?P<line>\\ d+), ' +
299
+ 'col (?P<character>\\ d+), ' +
300
+ '(?P<code>\\ w+) - (?P<reason>.+)\\ s?(\\ ((?P<shortname>\\ w+)\\ ))?$' )
299
301
300
302
issues = []
301
303
@@ -313,10 +315,12 @@ def validate(quiet=False):
313
315
'line' : int (m .group ('line' )),
314
316
'character' : int (m .group ('character' )) + 1 ,
315
317
'code' : m .group ('code' ),
316
- 'reason' : m .group ('reason' ),
317
- 'shortname' : m .group ('shortname' )
318
+ 'reason' : m .group ('reason' )
318
319
}
319
320
321
+ if m .group ('shortname' ):
322
+ issue ['shortname' ] = m .group ('shortname' )
323
+
320
324
issues .append (issue )
321
325
322
326
# normalize line numbers
You can’t perform that action at this time.
0 commit comments