-
-
Notifications
You must be signed in to change notification settings - Fork 159
/
JetBrainsInspectCodeTransform.xslt
55 lines (52 loc) · 1.69 KB
/
JetBrainsInspectCodeTransform.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:key name="ISSUETYPES" match="/Report/Issues/Project/Issue" use="@TypeId"/>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/" name="TopLevelReport">
<html>
<head>
<title>JetBrains Inspect Code Report</title>
<style>
body { font-family: Arial; }
th, td { text-align: left; }
.severity { font-weight: bold; }
</style>
</head>
<body>
<h1>JetBrains InspectCode Report</h1>
<xsl:for-each select="/Report/IssueTypes/IssueType">
<h2>
<span class="severity"><xsl:value-of select="@Severity"/></span>: <xsl:value-of select="@Description"/>
</h2>
<table style="width:100%">
<tr>
<th>File</th>
<th>Line Number</th>
<th>Type</th>
<th>Message</th>
</tr>
<xsl:for-each select="key('ISSUETYPES',@Id)">
<tr>
<td>
<xsl:value-of select="@File"/>
</td>
<td>
<xsl:value-of select="@Line"/>
</td>
<td>
<xsl:value-of select="@TypeId"/>
</td>
<td>
<xsl:value-of select="@Message"/>
</td>
</tr>
</xsl:for-each>
</table>
<br />
<hr />
<br />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>