@@ -54,18 +54,18 @@ <h3 id="tests">Unit Test Results</h3>
5454 < tbody id ="test-results-summary "> </ tbody >
5555 </ table >
5656
57- < h3 id ="compiler-issues "> Plugins containing compile warnings or infos </ h3 >
57+ < h3 id ="compiler-issues "> Compile issues </ h3 >
5858 < p >
59- The table below shows the plugins in which warnings were encountered.
59+ The table below shows the plugins in which warnings, infos or open tasks were encountered.
6060 Click on the jar file's row to view its detailed report.
6161 </ p >
6262 < table class ="styled-table ">
6363 < thead >
6464 < tr >
6565 < th > Compile Logs (Jar Files)</ th >
66- < th style ="text-align: center " > General Warnings</ th >
67- < th style ="text-align: center " > Access Warnings </ th >
68- < th style ="text-align: center " > Infos </ th >
66+ < th style ="text-align: center;width: 20%; " > Warnings</ th >
67+ < th style ="text-align: center;width: 20%; " > Infos </ th >
68+ < th style ="text-align: center;width: 20%; " > Tasks </ th >
6969 </ tr >
7070 </ thead >
7171 < tbody id ="compiler-issues-body "> </ tbody >
@@ -139,16 +139,16 @@ <h3 id="compiler-issues">Plugins containing compile warnings or infos</h3>
139139 row . classList . add ( 'collapsible-table-main-row' )
140140 insertLeanCell ( row , false ) . innerHTML = shortName
141141 addLinkCell ( row , `${ shortName } --warnings` , issues . warnings )
142- addLinkCell ( row , `${ shortName } --access_warnings` , issues . access )
143142 addLinkCell ( row , `${ shortName } --infos` , issues . infos )
143+ addLinkCell ( row , `${ shortName } --tasks` , issues . tasks )
144144 // Details row (collapsed by default)
145145 const detailsRow = compilerIssues . insertRow ( )
146146 detailsRow . classList . add ( 'collapsible-table-details-row' )
147147
148148 const content = ''
149- + ( issues . warnings > 0 ? getDetailsContent ( logFile , shortName , 'warnings ' ) : '' )
150- + ( issues . access > 0 ? getDetailsContent ( logFile , shortName , 'access_warnings ' ) : '' )
151- + ( issues . infos > 0 ? getDetailsContent ( logFile , shortName , 'infos ' ) : '' )
149+ + ( issues . warnings > 0 ? getDetailsContent ( logFile , shortName , 'warning ' ) : '' )
150+ + ( issues . infos > 0 ? getDetailsContent ( logFile , shortName , 'info ' ) : '' )
151+ + ( issues . tasks > 0 ? getDetailsContent ( logFile , shortName , 'task ' ) : '' )
152152
153153 detailsRow . innerHTML = `<td colspan="${ row . cells . length } ">${ content } </td>
154154 `
@@ -160,7 +160,7 @@ <h3 id="compiler-issues">Plugins containing compile warnings or infos</h3>
160160 }
161161
162162 function getDetailsContent ( logFile , shortName , issueType ) {
163- return appendCopyLinkButton ( `<h4 id="${ shortName } --${ issueType } "><b>${ issueType . toUpperCase ( ) . replace ( '_' , ' ' ) } in org.eclipse.${ shortName } </b></h4>` ) + `
163+ return appendCopyLinkButton ( `<h4 id="${ shortName } --${ issueType } s "><b>${ issueType . toUpperCase ( ) } S in org.eclipse.${ shortName } </b></h4>` ) + `
164164 <div class="data-loader" data-supplier="parseCompileLogXML('${ logFile } ')" data-processor="generateCompileLog(arg,'${ logFile } ','${ issueType } ')"></div>
165165 `
166166 }
@@ -174,43 +174,42 @@ <h3 id="compiler-issues">Plugins containing compile warnings or infos</h3>
174174
175175 function generateCompileLog ( compileLogXML , logFile , issueType ) {
176176 let content = ''
177- for ( const fileProblems of compileLogXML . getElementsByTagName ( 'problems' ) ) {
178- const source = fileProblems . parentNode
177+ const elementType = issueType == 'task' ? 'task' : 'problem'
178+ const expectedSeverity = issueType . toUpperCase ( )
179+ for ( const fileIssues of compileLogXML . getElementsByTagName ( `${ elementType } s` ) ) {
180+ const source = fileIssues . parentNode
179181 const sourceFileName = computeRelativeFilePath ( source , logFile )
180- const warnings = parseInt ( fileProblems . getAttribute ( 'warnings' ) )
181- const infos = parseInt ( fileProblems . getAttribute ( 'infos' ) )
182- let counter = 0
183- let elements = ''
184- let severity ;
185- for ( problem of fileProblems . getElementsByTagName ( 'problem' ) ) {
186- severity = problem . getAttribute ( 'severity' )
187- const problemID = problem . getAttribute ( 'id' )
188- const line = parseInt ( problem . getAttribute ( 'line' ) )
189- const message = escapeHTML ( problem . querySelector ( 'message' ) . getAttribute ( 'value' ) )
190- const contextValue = problem . querySelector ( 'source_context' ) . getAttribute ( 'value' )
191- const sourceStart = parseInt ( problem . querySelector ( 'source_context' ) . getAttribute ( 'sourceStart' ) )
192- const sourceEnd = parseInt ( problem . querySelector ( 'source_context' ) . getAttribute ( 'sourceEnd' ) ) + 1
193- const sourceCodeBefore = escapeHTML ( contextValue . substring ( 0 , sourceStart ) )
194- const sourceCode = escapeHTML ( contextValue . substring ( sourceStart , sourceEnd ) )
195- const sourceCodeAfter = escapeHTML ( contextValue . substring ( sourceEnd , contextValue . length ) )
196- if ( isMatchingIssue ( issueType , severity , problemID ) ) {
197- elements += `
198- <tr class="no-zebra-striping">
199- <td style="padding-top:6px; padding-bottom:8px; padding-left:4px; padding-right:4px;">
200- <b>${ ++ counter } .</b> <i>${ message } </i>
201- ${ createCodeEditorBlock ( line , `${ sourceCodeBefore } ${ applyCodeMarker ( severity . toLowerCase ( ) , sourceCode ) } ${ sourceCodeAfter } ` ) }
202- </td>
203- </tr>
204- `
205- }
206- }
207- if ( counter > 0 ) {
182+ const itemCount = parseInt ( fileIssues . getAttribute ( `${ issueType } s` ) )
183+ if ( itemCount > 0 ) {
208184 content += `
209- <h5><b><code>${ sourceFileName } </code>: ${ counter } ${ severity . toLowerCase ( ) } ${ counter > 1 ? 's' : '' } </b></h5>
185+ <h5><b><code>${ sourceFileName } </code>: ${ itemCount } ${ issueType } ${ itemCount > 1 ? 's' : '' } </b></h5>
210186 <table><tbody>
211- ${ elements }
212- </tbody></table>
213187 `
188+ let counter = 0
189+ for ( issue of fileIssues . getElementsByTagName ( elementType ) ) {
190+ if ( elementType != 'problem' || expectedSeverity == issue . getAttribute ( 'severity' ) ) {
191+ const message = escapeHTML ( issue . querySelector ( 'message' ) . getAttribute ( 'value' ) )
192+ content += `
193+ <tr class="no-zebra-striping">
194+ <td style="padding-top:6px; padding-bottom:8px; padding-left:4px; padding-right:4px;">
195+ <b>${ ++ counter } .</b> <i>${ message } </i>
196+ `
197+ const sourceContext = issue . querySelector ( 'source_context' )
198+ if ( sourceContext ) {
199+ const contextValue = sourceContext . getAttribute ( 'value' )
200+ const sourceStart = parseInt ( sourceContext . getAttribute ( 'sourceStart' ) )
201+ const sourceEnd = parseInt ( sourceContext . getAttribute ( 'sourceEnd' ) ) + 1
202+
203+ const sourceCodeBefore = escapeHTML ( contextValue . substring ( 0 , sourceStart ) )
204+ const sourceCode = escapeHTML ( contextValue . substring ( sourceStart , sourceEnd ) )
205+ const sourceCodeAfter = escapeHTML ( contextValue . substring ( sourceEnd , contextValue . length ) )
206+ const line = parseInt ( issue . getAttribute ( 'line' ) )
207+ content += `${ createCodeEditorBlock ( line , `${ sourceCodeBefore } ${ applyCodeMarker ( issueType , sourceCode ) } ${ sourceCodeAfter } ` ) } `
208+ }
209+ content += '</td> </tr>'
210+ }
211+ }
212+ content += '</tbody></table>'
214213 }
215214 }
216215 return content
@@ -242,17 +241,6 @@ <h5><b><code>${sourceFileName}</code>: ${counter} ${severity.toLowerCase()}
242241 return filePath . substring ( pluginNameIndex + pluginName . length + 1 , filePath . length )
243242 }
244243
245- const apiWarningIDs = new Set ( [ 'ForbiddenReference' , 'DiscouragedReference' ] )
246-
247- function isMatchingIssue ( expectedType , severity , problemId ) {
248- switch ( expectedType ) {
249- case "warnings" : return severity == 'WARNING' && ! apiWarningIDs . has ( problemId )
250- case "access_warnings" : return severity == 'WARNING' && apiWarningIDs . has ( problemId )
251- case "infos" : return severity == 'INFO'
252- default : throw new Error ( `Unexpected type: ${ expectedType } ` )
253- }
254- }
255-
256244 function insertLeanCell ( row , center ) {
257245 const cell = row . insertCell ( )
258246 cell . style = `padding-bottom:1px; padding-top:1px; ${ center ? 'text-align:center' : '' } `
0 commit comments