File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,7 @@ def makeHTMLSummaryPage(self):
380
380
381
381
def makeHTMLLogFile (self , pkg ):
382
382
"""docstring for makeHTMLFile"""
383
+ linePartsUrl = re .compile (r"\s*(src(/[^:]+):(\d+)):.*" )
383
384
384
385
if not pkg .name () in self .tagList :
385
386
return
@@ -410,6 +411,11 @@ def makeHTMLLogFile(self, pkg):
410
411
) # do this first to not escape it again in the next subs
411
412
newLine = newLine .replace ("<" , "<" ).replace (">" , ">" )
412
413
if lineNo in pkg .errLines .keys ():
414
+ m = linePartsUrl .match (newLine )
415
+ if m :
416
+ branch = os .getenv ("CMSSW_VERSION" , "master" )
417
+ url = "https://github.com/cms-sw/cmssw/blob/" + branch + m [2 ] + "#L" + m [3 ]
418
+ newLine = newLine .replace (m [1 ], '<a href="' + url + '">' + m [1 ] + "</a>" , 1 )
413
419
newLine = (
414
420
"<span class="
415
421
+ self .styleClass [pkg .errLines [lineNo ]]
You can’t perform that action at this time.
0 commit comments