Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

/* `buildPlugin` step provided by: https://github.com/jenkins-infra/pipeline-library */
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '8' ],
[ platform: 'linux', jdk: '11' ],
[ platform: 'windows', jdk: '11' ],
[ platform: 'linux', jdk: '21' ],
[ platform: 'windows', jdk: '17' ],
])
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.48</version>
<version>4.88</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -48,16 +48,16 @@
<properties>
<revision>1.28</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.332.1</jenkins.version>
<jenkins.version>2.462.3</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.332.x</artifactId>
<version>1643.v1cffef51df73</version>
<artifactId>bom-2.462.x</artifactId>
<version>3944.v1a_e4f8b_452db_</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">

<style type="text/css">
#sloccountSummary { width: auto; }
#sloccountSummary .number { text-align: right; }
</style>

<table class="pane sortable" id="sloccountSummary">
<st:adjunct includes="hudson.plugins.sloccount.SloccountResult.style"/>
<table class="jenkins-table sortable jenkins-table--small" id="sloccountSummary">
<thead>
<tr>
<td class="pane-header">${%Language}</td>
<td class="pane-header">${%Lines}</td>
<td class="pane-header">${%Lines} ${%Delta}</td>
<td class="pane-header">${%Comments}</td>
<td class="pane-header">${%Comments} ${%Delta}</td>
<td class="pane-header">${%Files}</td>
<td class="pane-header">${%Files} ${%Delta}</td>
<th>${%Language}</th>
<th>${%Lines}</th>
<th>${%Lines} ${%Delta}</th>
<th>${%Comments}</th>
<th>${%Comments} ${%Delta}</th>
<th>${%Files}</th>
<th>${%Files} ${%Delta}</th>
</tr>
</thead>
<tbody>
<j:forEach var="language" items="${diff.languageDiffs}">
<tr>
<j:if test="${buildNumber == -1}">
<td class="pane"><a href="sloccountResult/languageResult/${language.urlName}">${language.name}</a></td>
<td><a href="sloccountResult/languageResult/${language.urlName}">${language.name}</a></td>
</j:if>
<j:if test="${buildNumber != -1}">
<td class="pane"><a href="${buildNumber}/sloccountResult/languageResult/${language.urlName}">${language.name}</a></td>
<td><a href="${buildNumber}/sloccountResult/languageResult/${language.urlName}">${language.name}</a></td>
</j:if>
<td class="pane number" data="${language.lineCount}">${language.lineCountString}</td>
<td class="pane number" data="${language.lineCountDelta}">${language.lineCountDeltaString}</td>
<td class="pane number" data="${language.commentCount}">${language.commentCountString}</td>
<td class="pane number" data="${language.commentCountDelta}">${language.commentCountDeltaString}</td>
<td class="pane number" data="${language.fileCount}">${language.fileCountString}</td>
<td class="pane number" data="${language.fileCountDelta}">${language.fileCountDeltaString}</td>
<td class="number" data="${language.lineCount}">${language.lineCountString}</td>
<td class="number" data="${language.lineCountDelta}">${language.lineCountDeltaString}</td>
<td class="number" data="${language.commentCount}">${language.commentCountString}</td>
<td class="number" data="${language.commentCountDelta}">${language.commentCountDeltaString}</td>
<td class="number" data="${language.fileCount}">${language.fileCountString}</td>
<td class="number" data="${language.fileCountDelta}">${language.fileCountDeltaString}</td>
</tr>
</j:forEach>
</tbody>
<tfoot>
<tr class="sortbottom">
<td class="pane-header">${%Total}</td>
<td class="pane-header number" data="${diff.lineCount}">${diff.lineCountString}</td>
<td class="pane-header number" data="${diff.lineCountDelta}">${diff.lineCountDeltaString}</td>
<td class="pane-header number" data="${diff.commentCount}">${diff.commentCountString}</td>
<td class="pane-header number" data="${diff.commentCountDelta}">${diff.commentCountDeltaString}</td>
<td class="pane-header number" data="${diff.fileCount}">${diff.fileCountString}</td>
<td class="pane-header number" data="${diff.fileCountDelta}">${diff.fileCountDeltaString}</td>
<th class="slc-left">${%Total}</th>
<th class="number" data="${diff.lineCount}">${diff.lineCountString}</th>
<th class="number" data="${diff.lineCountDelta}">${diff.lineCountDeltaString}</th>
<th class="number" data="${diff.commentCount}">${diff.commentCountString}</th>
<th class="number" data="${diff.commentCountDelta}">${diff.commentCountDeltaString}</th>
<th class="number" data="${diff.fileCount}">${diff.fileCountString}</th>
<th class="number" data="${diff.fileCountDelta}">${diff.fileCountDeltaString}</th>
</tr>
</tfoot>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
</f:entry>
<f:advanced>
<f:entry title="${%Report charset}" field="encoding">
<f:textbox name="encoding" value="${instance.encoding}"/>
<f:textbox value="${instance.encoding}"/>
</f:entry>

<f:entry title="${%Builds in graph}" field="numBuildsInGraph">
<f:textbox name="numBuildsInGraph" value="${instance.numBuildsInGraph}"/>
<f:number/>
</f:entry>

<f:entry field="comments">
<f:checkbox name="commentIsCode" checked="${instance.commentIsCode}"/>
<label class="attach-previous">${%Include comments to code lines}</label>
<f:entry field="commentIsCode" title="${%Include comments to code lines}">
<f:checkbox/>
</f:entry>

<f:entry>
<f:checkbox name="ignoreBuildFailure" checked="${instance.ignoreBuildFailure}"/>
<label class="attach-previous">${%Try to process the report files even if the build is not successful}</label>
<f:entry field="ignoreBuildFailure" title="${%Try to process the report files even if the build is not successful}">
<f:checkbox/>
</f:entry>
</f:advanced>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson">

<div class="slc-distribution-bar">
<span style="width: ${container.lineCount / max * 100}%;"/>
</div>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
<st:header name="Content-Type" value="text/html;charset=UTF-8" />
<table class="pane sortable" id="files">
<table class="jenkins-table sortable jenkins-table--small" id="files">
<thead>
<tr>
<td class="pane-header">${%File}</td>
<td class="pane-header" style="width:2em">${%Language}</td>
<td class="pane-header" style="width:2em">${%Module}</td>
<td class="pane-header" style="width:2em">${%Lines}</td>
<td class="pane-header" style="width:2em">${%Comments}</td>
<td class="pane-header" style="width:60%">${%Distribution}</td>
<th>${%File}</th>
<th>${%Language}</th>
<th>${%Module}</th>
<th align="right">${%Lines}</th>
<th align="right">${%Comments}</th>
<th>${%Distribution}</th>
</tr>
</thead>
<tbody>
<j:set var="cachedReport" value="${it.report}"/>
<j:set var="max" value="${cachedReport.longestFile.lineCount}"/>
<j:forEach var="container" items="${cachedReport.files}">
<tr>
<td class="pane">${container.name}</td>
<td class="pane">${container.language}</td>
<td class="pane">${container.module}</td>
<td class="pane number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="pane number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="pane" data="${container.lineCount}"><st:include page="/tabview/distribution-graph.jelly" /></td>
<td>${container.name}</td>
<td>${container.language}</td>
<td>${container.module}</td>
<td class="number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="slc-distribution" data="${container.lineCount}"><st:include page="distribution-graph.jelly" /></td>
</tr>
</j:forEach>
</tbody>
<tfoot>
<tr class="sortbottom">
<td class="pane-header">${%Total} ${cachedReport.fileCountString}</td>
<td class="pane-header"> </td>
<td class="pane-header"> </td>
<td class="pane-header number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</td>
<td class="pane-header number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</td>
<td class="pane-header" data="0"> </td>
<th class="slc-left">${%Total} ${cachedReport.fileCountString}</th>
<th/>
<th/>
<th class="number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</th>
<th class="number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</th>
<th> </th>
</tr>
</tfoot>
</table>

<script type="text/javascript">
Behaviour.applySubtree(document.getElementById('statistics'));
</script>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
<st:header name="Content-Type" value="text/html;charset=UTF-8" />
<table class="pane sortable" id="files">
<table class="jenkins-table sortable jenkins-table--small" id="files">
<thead>
<tr>
<td class="pane-header">${%Folder}</td>
<td class="pane-header" style="width:2em">${%Files}</td>
<td class="pane-header" style="width:2em">${%Lines}</td>
<td class="pane-header" style="width:2em">${%Comments}</td>
<td class="pane-header" style="width:60%">${%Distribution}</td>
<th>${%Folder}</th>
<th align="right">${%Files}</th>
<th align="right">${%Lines}</th>
<th align="right">${%Comments}</th>
<th>${%Distribution}</th>
</tr>
</thead>
<tbody>
<j:set var="cachedReport" value="${it.report}"/>
<j:set var="max" value="${cachedReport.longestFolder.lineCount}"/>
<j:forEach var="container" items="${cachedReport.folders}">
<tr>
<td class="pane"><a href="folderResult/${container.urlName}">${container.name}</a></td>
<td class="pane number" data="${container.fileCount}">${container.fileCountString}</td>
<td class="pane number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="pane number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="pane" data="${container.lineCount}"><st:include page="/tabview/distribution-graph.jelly" /></td>
<td><a href="folderResult/${container.urlName}">${container.name}</a></td>
<td class="number" data="${container.fileCount}">${container.fileCountString}</td>
<td class="number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="slc-distribution" data="${container.lineCount}"><st:include page="distribution-graph.jelly" /></td>
</tr>
</j:forEach>
</tbody>
<tfoot>
<tr class="sortbottom">
<td class="pane-header">${%Total} ${cachedReport.folderCountString}</td>
<td class="pane-header number" data="${cachedReport.fileCount}">${cachedReport.fileCountString}</td>
<td class="pane-header number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</td>
<td class="pane-header number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</td>
<td class="pane-header" data="0"> </td>
<th class="slc-left">${%Total} ${cachedReport.folderCountString}</th>
<th class="number" data="${cachedReport.fileCount}">${cachedReport.fileCountString}</th>
<th class="number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</th>
<th class="number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</th>
<th data="0"> </th>
</tr>
</tfoot>
</table>

<script type="text/javascript">
Behaviour.applySubtree(document.getElementById('statistics'));
</script>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<l:layout norefresh="true" title="${%SLOCCount Results}">
<l:header>
<script src="${resURL}/jsbundles/section-to-tabs.js" type="text/javascript" defer="true" />
</l:header>
<st:include it="${it.owner}" page="sidepanel.jelly" />
<st:adjunct includes="hudson.plugins.sloccount.SloccountResult.style"/>
<l:main-panel>
<h1>${%SLOCCount Results}</h1>
<st:include page="/tabview/main.jelly" />
<l:tabPane title="${%Files}">
<st:include page="files.jelly"/>
</l:tabPane>
<j:if test="${it.report.moduleCount > 1}">
<l:tabPane title="${%Modules}">
<st:include page="modules.jelly"/>
</l:tabPane>
</j:if>
<j:if test="${it.report.folderCount > 1}">
<l:tabPane title="${%Folders}">
<st:include page="folders.jelly"/>
</l:tabPane>
</j:if>
<j:if test="${it.report.languageCount > 1}">
<l:tabPane title="${%Languages}">
<st:include page="languages.jelly"/>
</l:tabPane>
</j:if>
</l:main-panel>
</l:layout>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
SLOCCount\ Results=SLOCCount-Ergebnisse
SLOCCount\ Results=SLOCCount-Ergebnisse
Files=Dateien
Folders=Verzeichnisse
Languages=Sprachen
Modules=Module
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
SLOCCount\ Results=SLOCCount \u7d50\u679c
SLOCCount\ Results=SLOCCount \u7d50\u679c
Files=\u30d5\u30a1\u30a4\u30eb
Folders=\u30d5\u30a9\u30eb\u30c0\u30fc
Languages=\u8a00\u8a9e
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
<st:header name="Content-Type" value="text/html;charset=UTF-8" />
<table class="pane sortable" id="files">
<table class="jenkins-table sortable jenkins-table--small" id="files">
<thead>
<tr>
<td class="pane-header">${%Language}</td>
<td class="pane-header" style="width:2em">${%Files}</td>
<td class="pane-header" style="width:2em">${%Lines}</td>
<td class="pane-header" style="width:2em">${%Comments}</td>
<td class="pane-header" style="width:60%">${%Distribution}</td>
<th>${%Language}</th>
<th align="right">${%Files}</th>
<th align="right">${%Lines}</th>
<th align="right">${%Comments}</th>
<th>${%Distribution}</th>
</tr>
</thead>
<tbody>
<j:set var="cachedReport" value="${it.report}"/>
<j:set var="max" value="${cachedReport.longestLanguage.lineCount}"/>
<j:forEach var="container" items="${cachedReport.languages}">
<tr>
<td class="pane"><a href="languageResult/${container.urlName}">${container.name}</a></td>
<td class="pane number" data="${container.fileCount}">${container.fileCountString}</td>
<td class="pane number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="pane number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="pane" data="${container.lineCount}"><st:include page="/tabview/distribution-graph.jelly" /></td>
<td><a href="languageResult/${container.urlName}">${container.name}</a></td>
<td class="number" data="${container.fileCount}">${container.fileCountString}</td>
<td class="number" data="${container.lineCount}">${container.lineCountString}</td>
<td class="number" data="${container.commentCount}">${container.commentCountString}</td>
<td class="slc-distribution" data="${container.lineCount}"><st:include page="distribution-graph.jelly" /></td>
</tr>
</j:forEach>
</tbody>
<tfoot>
<tr class="sortbottom">
<td class="pane-header">${%Total} ${cachedReport.languageCountString}</td>
<td class="pane-header number" data="${cachedReport.fileCount}">${cachedReport.fileCountString}</td>
<td class="pane-header number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</td>
<td class="pane-header number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</td>
<td class="pane-header" data="0"> </td>
<th class="slc-left">${%Total} ${cachedReport.languageCountString}</th>
<th class="number" data="${cachedReport.fileCount}">${cachedReport.fileCountString}</th>
<th class="number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</th>
<th class="number" data="${cachedReport.commentCount}">${cachedReport.commentCountString}</th>
<th data="0"> </th>
</tr>
</tfoot>
</table>

<script type="text/javascript">
Behaviour.applySubtree(document.getElementById('statistics'));
</script>
</j:jelly>
Loading