Skip to content

Commit

Permalink
feat(objectionary#133): simplify defect creation for 'line-is-absent.…
Browse files Browse the repository at this point in the history
…xsl'
  • Loading branch information
volodya-lombrozo committed Dec 13, 2024
1 parent eb4b7ab commit 6d64245
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/resources/org/eolang/lints/refs/line-is-absent.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,9 @@ SOFTWARE.
<xsl:variable name="self" select="."/>
<xsl:variable name="target" select="ancestor::*[o[@name=$self/@base and not(@line)]][1]/o[@name=$self/@base and not(@line)]"/>
<xsl:if test="$target">
<xsl:element name="defect">
<xsl:attribute name="line">
<xsl:value-of select="if (@line) then @line else '0'"/>
</xsl:attribute>
<xsl:attribute name="severity">
<xsl:text>error</xsl:text>
</xsl:attribute>
<xsl:text>The @line attribute is absent at "</xsl:text>
<xsl:value-of select="$target/@name"/>
<xsl:text>"</xsl:text>
</xsl:element>
<defect line="{if (@line) then @line else '0'}" severity="error">
The @line attribute is absent at <xsl:value-of select="$target/@name"/>
</defect>
</xsl:if>
</xsl:for-each>
</defects>
Expand Down

0 comments on commit 6d64245

Please sign in to comment.