diff mbox series

[oe-layersetup,2/5] kas: yamllint: trailing whitespace

Message ID 20250816003620.2112669-3-rs@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series kas: yamllint cleanup effort | expand

Commit Message

Randolph Sapp Aug. 16, 2025, 12:36 a.m. UTC
From: Randolph Sapp <rs@ti.com>

Lines should not have trailing whitespace. Currently the only trailing
whitespace we have is the result of for-each loops processing empty
lines.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 src/xslt/kas-templates.xslt | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/src/xslt/kas-templates.xslt b/src/xslt/kas-templates.xslt
index f7aa24c..c6d5782 100644
--- a/src/xslt/kas-templates.xslt
+++ b/src/xslt/kas-templates.xslt
@@ -15,8 +15,11 @@  header:
 <xsl:text>  oe-layersetup-bblayers-conf-template: |
 </xsl:text>
 <xsl:for-each select='line'>
+<xsl:variable name='normal-line' select='normalize-space(text())'/>
+<xsl:if test='string-length($normal-line) > 0'>
 <xsl:text>    </xsl:text><xsl:value-of select='text()'/><xsl:text>
 </xsl:text>
+</xsl:if>
 </xsl:for-each>
 <xsl:text>
 </xsl:text>
@@ -28,6 +31,8 @@  header:
 <xsl:text>  oe-layersetup-local-conf-template: |
 </xsl:text>
 <xsl:for-each select='line'>
+<xsl:variable name='normal-line' select='normalize-space(text())'/>
+<xsl:if test='string-length($normal-line) > 0'>
 <xsl:text>    </xsl:text><xsl:value-of select='text()'/><xsl:text>
 </xsl:text>
 </xsl:for-each>