private String getIssueFilePath ( String issueComponent , Map < String , Component > components ) { Component comp = components . get ( issueComponent ) ; String file = comp . path ; if ( ! Strings . isNullOrEmpty ( comp . moduleKey ) ) { String theKey = comp . moduleKey ; while ( ! theKey . isEmpty ( ) ) { Component theChildComp = components . get ( theKey ) ; int p = theKey . lastIndexOf ( ":" ) ; if ( p > 0 ) { theKey = theKey . substring ( 0 , p ) ; } else { theKey = "" ; } if ( theChildComp != null && ! Strings . isNullOrEmpty ( theChildComp . path ) ) { file = theChildComp . path + ' ' + file ; } } } return file ; }
Returns the path of the file linked to an issue created by Sonar . The path is relative to the folder where Sonar has been run .