Skip to content

Commit

Permalink
Fix #239: add link to module
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Jul 31, 2022
1 parent 2f9de15 commit f94865e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions quality/src/main/resources/violations.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,17 @@
">
<xsl:sort />
<xsl:variable name="module" select="." />
<xsl:variable name="moduleId" select="concat($ruleId, '-', $module)" />
<xsl:variable name="moduleCount" select="count($sameRuleViolations[location/@module = $module])" />
<span class="toc-count">
<xsl:value-of select="$moduleCount" />
</span>
×
<code class="module">
<xsl:value-of select="$module" />
</code>
<a href="#{$moduleId}">
<code class="module" data-id="toc-{$moduleId}">
<xsl:value-of select="$module" />
</code>
</a>
<xsl:if test="position() != last()" xml:space="preserve">, </xsl:if>
</xsl:for-each>
)
Expand Down Expand Up @@ -162,6 +165,11 @@
is also `true` and not `no node` coerced to `false`) -->
<a name="{details/@category}-{source/@reporter}-{details/@rule}" />
</xsl:if>
<xsl:if test="details/@rule != concat(preceding-sibling::violation[1]/details/@rule, '') or location/@module != concat(preceding-sibling::violation[1]/location/@module, '')">
<!-- concat in test makes sure the first violation (which has no preceding nodes)
is also `true` and not `no node` coerced to `false`) -->
<a name="{details/@category}-{source/@reporter}-{details/@rule}-{location/@module}" />
</xsl:if>
<div class="violation" xml:space="preserve">
<span class="title">
<!-- @formatter:off -->
Expand Down

0 comments on commit f94865e

Please sign in to comment.