File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,7 @@ def makeHTMLSummaryPage(self):
380380
381381 def makeHTMLLogFile (self , pkg ):
382382 """docstring for makeHTMLFile"""
383+ linePartsUrl = re .compile (r"\s*(src(/[^:]+):(\d+)):.*" )
383384
384385 if not pkg .name () in self .tagList :
385386 return
@@ -410,6 +411,11 @@ def makeHTMLLogFile(self, pkg):
410411 ) # do this first to not escape it again in the next subs
411412 newLine = newLine .replace ("<" , "<" ).replace (">" , ">" )
412413 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 )
413419 newLine = (
414420 "<span class="
415421 + self .styleClass [pkg .errLines [lineNo ]]
You can’t perform that action at this time.
0 commit comments