Add Source Code Linter Pipeline

This commit is contained in:
Siwat Sirichai 2020-10-29 16:38:56 +07:00
parent 0d0e7140c4
commit d252f6ef50
313 changed files with 36277 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

View file

@ -0,0 +1,274 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (c) 2016 Joerg Spieler All rights reserved. This program and the
accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- <xsl:strip-space elements="*"/> -->
<xsl:output encoding="UTF-8" indent="yes" method="html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/transitional.dtd" />
<xsl:template match="/">
<xsl:comment>
Copyright (c) 2016 Joerg Spieler All rights reserved. This program and the
accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
</xsl:comment>
<xsl:comment>
To create custom reports change:
ECLIPSE_HOME/dropins/org.ucdetector_*.jar/org/ucdetector/report/html.xslt
</xsl:comment>
<html>
<head>
<title>UCDetector Report</title>
<link rel="icon" href=".icons/ucd.gif" type="image/gif"/>
</head>
<body>
<h2 align="center">
<a href="http://www.ucdetector.org/">
<img src=".icons/ucdetector32.png" alt="UCDetector homepage" border="0"/>
</a>
<xsl:text>UCDetector Report</xsl:text>
</h2>
<table border="0"><!-- top table containing columns for about, preferences, searched in -->
<tr>
<!-- ================================================================
ABOUT
=============================================================== -->
<td valign="top">
<h3 align="center">About search</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Property</th>
<th>Value</th>
</tr>
<xsl:for-each select="/ucdetector/statistics/abouts/about[@show = 'true']">
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">#E6E6FA</xsl:when>
<xsl:otherwise>#FFFACD</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$color}">
<td>
<xsl:value-of select="key"/>
</td>
<td>
<xsl:value-of select="value"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
<!-- ==============================================================
PREFERENCES
=============================================================== -->
<td valign="top">
<h3 align="center">Preferences</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Preference</th>
<th>Value</th>
</tr>
<xsl:for-each select="/ucdetector/statistics/preferences/preference">
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">#E6E6FA</xsl:when>
<xsl:otherwise>#FFFACD</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$color}">
<td>
<xsl:value-of select="@key"/>
</td>
<td>
<xsl:value-of select="@value"/>
</td>
</tr>
</xsl:for-each>
</table>
<xsl:value-of select="count(/ucdetector/statistics/preferences/preference)"/> preferences above are different from default prefences.
</td>
<td valign="top">
<!-- ==============================================================
SEARCH IN
=============================================================== -->
<h3 align="center">Searched in</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Element</th>
<th>Type</th>
</tr>
<xsl:for-each select="/ucdetector/statistics/searched/search">
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">#E6E6FA</xsl:when>
<xsl:otherwise>#FFFACD</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$color}">
<td>
<xsl:value-of select="."/>
</td>
<td>
<xsl:value-of select="@class"/>
</td>
</tr>
</xsl:for-each>
</table>
Searched: <xsl:value-of select="count(/ucdetector/statistics/searched/search)"/>
</td>
</tr>
</table><!-- top outer table -->
<!-- <xsl:value-of select="concat('Searched started: ', /ucdetector/statistics/dateStarted, '. Duration: ', /ucdetector/statistics/searchDuration)"/> -->
<h3>Warnings</h3>
<table border="1" style="empty-cells:show">
<thead align="center">
<tr bgcolor="#C0C0C0">
<th>Nr</th>
<th>Java</th>
<th>Marker</th>
<th>Description</th>
<th>References**</th>
<th>Author</th>
<th>Location*</th>
<th>Java type</th>
<th>Marker type</th>
</tr>
</thead>
<xsl:for-each select="/ucdetector/markers/marker">
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">#E6E6FA</xsl:when>
<xsl:otherwise>#FFFACD</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$color}">
<!-- NR -->
<td align="right">
<xsl:value-of select="@nr"/>
</td>
<!-- JAVA TYPE -->
<td align="center" valign="middle">
<!--
<img src=".icons/Element{javaType/@simple}.gif" alt="{javaType/@long}" />
-->
<img src=".icons/{javaType/@icon}" alt="{javaType/@long}" />
<!--
<xsl:text> </xsl:text>
<xsl:value-of select="javaType/@long"/>
-->
</td>
<!-- MARKER TYPE -->
<td align="center" valign="middle">
<img src=".icons/{@markerType}.gif" alt="{@markerType}" />
<!--
<xsl:text> </xsl:text>
<xsl:value-of select="@markerType"/>
-->
</td>
<!-- DESCRIPTION -->
<td>
<xsl:value-of select="description"/>
</td>
<!-- Reference Count -->
<td align="right">
<xsl:value-of select="@referenceCount"/>
</td>
<!-- Author -->
<td align="right">
<xsl:value-of select="author"/>
</td>
<!-- LOCATION -->
<td>
<!-- org.eclipse.swt.SWT.error(SWT.java:3634) -->
<!-- For link in stack trace console space is needed here! -->
<xsl:text>&#160;</xsl:text>
<!-- if not default package -->
<xsl:if test="string-length(package) &gt; 0">
<xsl:value-of select="concat(package, '.')"/>
</xsl:if>
<!-- class name -->
<xsl:value-of select="concat(class, '.')"/>
<!-- class needs an additional string -->
<xsl:if test="not(method) and not(field)">
<xsl:text>declaration</xsl:text>
</xsl:if>
<!-- method -->
<xsl:if test="method">
<xsl:value-of select="method"/>
</xsl:if>
<!-- field -->
<xsl:if test="field">
<xsl:value-of select="field"/>
</xsl:if>
<!-- Link in Eclipse Stack Trace Console View: (SWT.java:3634) -->
<xsl:value-of select="concat('(', class, '.java:', @line, ')')"/>
</td>
<!-- Java type -->
<td align="right">
<xsl:value-of select="javaType/@long"/>
</td>
<!-- Marker type -->
<td align="right">
<xsl:value-of select="@markerType"/>
</td>
</tr>
</xsl:for-each>
</table>
<!-- ===================================================================
FOOTNODE
=============================================================== -->
<p>
* To get links to the source locations, copy and paste first column (or table) to Eclipse 'Java Stack Trace Console'<br></br>
** Set 'Detect code with max number of references' &gt; 0<br></br>
</p>
<!-- ===================================================================
PROBLEMS
=============================================================== -->
<xsl:if test="count(/ucdetector/problems/problem) &gt; 0">
<h3>
<font color="red">
<xsl:value-of select="count(/ucdetector/problems/problem)"/> Exceptions found during detection</font>
</h3>
<ul>
<xsl:for-each select="/ucdetector/problems/problem">
<li>
<b>
<xsl:value-of select="status"/>
</b>
<pre>
<font color="red">
<xsl:value-of select="exception"/>
</font>
</pre>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<div align="right">
<font color="#a0a0a0">
<hr></hr>
<xsl:text>Created with </xsl:text>
<a href="http://www.ucdetector.org/">UCDetector
<xsl:value-of select="/ucdetector/statistics/abouts/about[@name ='ucdetectorVersion']/value"/>
</a>
</font>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<!-- :mode=xsl: -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

View file

@ -0,0 +1,79 @@
<!--
Copyright (c) 2016 Joerg Spieler All rights reserved. This program and the
accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
-->
<!ELEMENT ucdetector (statistics+, markers+, problems+)+>
<!ELEMENT statistics (abouts+, searched+, preferences+)+>
<!ELEMENT abouts (about)+>
<!ELEMENT about (key, value)*>
<!ATTLIST about
name NMTOKEN #REQUIRED
show (true | false) #REQUIRED
>
<!ELEMENT key (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT searched (search+)+>
<!ELEMENT search (#PCDATA)>
<!ATTLIST search
class NMTOKEN #REQUIRED
>
<!ELEMENT preferences (preference+)+>
<!ELEMENT preference (#PCDATA)>
<!ATTLIST preference
key NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT markers (marker+)+>
<!ELEMENT marker (description+, file+, project+, sourceFolder+, package+, class+, javaType+, method*, field*, author*)+>
<!ATTLIST marker
level (ERROR | WARNING)
#REQUIRED
line NMTOKEN #REQUIRED
lineEnd NMTOKEN #REQUIRED
lineStart NMTOKEN #REQUIRED
markerType (Reference | FewReference | VisibilityPrivate | VisibilityProtected | VisibilityDefault | Final| TestOnly| Other)
#REQUIRED
nr NMTOKEN #REQUIRED
referenceCount NMTOKEN #REQUIRED
>
<!ELEMENT description (#PCDATA)>
<!ELEMENT file (#PCDATA)>
<!ELEMENT project (#PCDATA)>
<!ATTLIST project
dir NMTOKEN #REQUIRED
name NMTOKEN #REQUIRED
parentDir CDATA #REQUIRED
>
<!ELEMENT sourceFolder (#PCDATA)>
<!ELEMENT package (#PCDATA)>
<!ELEMENT class (#PCDATA)>
<!ELEMENT javaType (#PCDATA)>
<!ATTLIST javaType
icon NMTOKEN #REQUIRED
long (Annotation | Class | ClassAnonymous | ClassLocal | ClassMember | Constant | Constructor | Enum | EnumConstant | Field | Initializer | Interface | Method )
#REQUIRED
simple (Class | Method | Field | Initializer) #REQUIRED
>
<!ELEMENT method (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT field (#PCDATA)>
<!ELEMENT problems (problem*)+>
<!ELEMENT problem (status+, exception+)+>
<!ELEMENT status (#PCDATA)>
<!ELEMENT exception (#PCDATA)>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,101 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
<!--
Copyright (c) 2016 Joerg Spieler All rights reserved. This program and the
accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
--><!--
To create custom reports change:
ECLIPSE_HOME/dropins/org.ucdetector_*.jar/org/ucdetector/report/html.xslt
--><html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UCDetector Report</title>
<link rel="icon" href=".icons/ucd.gif" type="image/gif">
</head>
<body>
<h2 align="center">
<a href="http://www.ucdetector.org/"><img src=".icons/ucdetector32.png" alt="UCDetector homepage" border="0"></a>UCDetector Report
</h2>
<table border="0">
<tr>
<td valign="top">
<h3 align="center">About search</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Property</th><th>Value</th>
</tr>
<tr bgcolor="#FFFACD">
<td>Operating system</td><td>Windows 10 - 10.0</td>
</tr>
<tr bgcolor="#E6E6FA">
<td>Java</td><td>14.0.2+12-46</td>
</tr>
<tr bgcolor="#FFFACD">
<td>Eclipse</td><td>4.17.0.v20200902-1800</td>
</tr>
<tr bgcolor="#E6E6FA">
<td>Eclipse product</td><td>Spring Tool Suite 4, Version: 4.8.0.RELEASE, Build Id: 202009151856</td>
</tr>
<tr bgcolor="#FFFACD">
<td>UCDetector</td><td>2.0.0</td>
</tr>
<tr bgcolor="#E6E6FA">
<td>Mode</td><td>Default [built-in]</td>
</tr>
<tr bgcolor="#FFFACD">
<td>Created report</td><td>2020-10-29 15:48:10</td>
</tr>
<tr bgcolor="#E6E6FA">
<td>Search duration</td><td>232 millis</td>
</tr>
<tr bgcolor="#FFFACD">
<td>Warnings</td><td>1</td>
</tr>
</table>
</td><td valign="top">
<h3 align="center">Preferences</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Preference</th><th>Value</th>
</tr>
</table>
0 preferences above are different from default prefences.
</td><td valign="top">
<h3 align="center">Searched in</h3>
<table border="1" style="empty-cells:show">
<tr bgcolor="#C0C0C0">
<th>Element</th><th>Type</th>
</tr>
<tr bgcolor="#FFFACD">
<td>GolfScore</td><td>SourceType</td>
</tr>
</table>
Searched: 1</td>
</tr>
</table>
<h3>Warnings</h3>
<table border="1" style="empty-cells:show">
<thead align="center">
<tr bgcolor="#C0C0C0">
<th>Nr</th><th>Java</th><th>Marker</th><th>Description</th><th>References**</th><th>Author</th><th>Location*</th><th>Java type</th><th>Marker type</th>
</tr>
</thead>
<tr bgcolor="#FFFACD">
<td align="right">1</td><td align="center" valign="middle"><img src=".icons/j_class_obj.gif" alt="Class"></td><td align="center" valign="middle"><img src=".icons/Reference.gif" alt="Reference"></td><td>Class "GolfScore" has 0 references</td><td align="right">0</td><td align="right"></td><td>&nbsp;GolfScore.declaration(GolfScore.java:9)</td><td align="right">Class</td><td align="right">Reference</td>
</tr>
</table>
<p>
* To get links to the source locations, copy and paste first column (or table) to Eclipse 'Java Stack Trace Console'
<br>
** Set 'Detect code with max number of references' &gt; 0
<br>
</p>
<div align="right">
<font color="#a0a0a0">
<hr>
Created with <a href="http://www.ucdetector.org/">UCDetector
2.0.0</a></font>
</div>
</body>
</html>

View file

@ -0,0 +1,3 @@
Created with UCDetector 2.0.0 2020-10-29 15:48:09 http://www.ucdetector.org/ Created by class: org.ucdetector.report.TextReport
Location Description Java Marker Author
GolfScore.<init>(GolfScore.java:9) Class "GolfScore" has 0 references GolfScore org.ucdetector.analyzeMarkerReference