diff mbox series

[oe-layersetup,3/5] kas: yamllint: too many blank lines

Message ID 20250816003620.2112669-4-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>

There should be no blank lines at the end of the document. This means
whitespace should be added based on anchor elements, such as the
document header.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 src/xslt/kas-templates.xslt | 17 +++++++++--------
 src/xslt/kas.xslt           | 11 +++++------
 2 files changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/src/xslt/kas-templates.xslt b/src/xslt/kas-templates.xslt
index c6d5782..1ec6bf3 100644
--- a/src/xslt/kas-templates.xslt
+++ b/src/xslt/kas-templates.xslt
@@ -12,13 +12,13 @@  header:
 <xsl:template match='bblayers-conf-template'>
 <xsl:text>bblayers_conf_header:
 </xsl:text>
-<xsl:text>  oe-layersetup-bblayers-conf-template: |
-</xsl:text>
+<xsl:text>  oe-layersetup-bblayers-conf-template: |</xsl:text>
 <xsl:for-each select='line'>
+<xsl:text>
+</xsl:text>
 <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:text>    </xsl:text><xsl:value-of select='text()'/>
 </xsl:if>
 </xsl:for-each>
 <xsl:text>
@@ -28,13 +28,14 @@  header:
 <xsl:template match='local-conf-template'>
 <xsl:text>local_conf_header:
 </xsl:text>
-<xsl:text>  oe-layersetup-local-conf-template: |
-</xsl:text>
+<xsl:text>  oe-layersetup-local-conf-template: |</xsl:text>
 <xsl:for-each select='line'>
+<xsl:text>
+</xsl:text>
 <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:text>    </xsl:text><xsl:value-of select='text()'/>
+</xsl:if>
 </xsl:for-each>
 <xsl:apply-templates select='/config/local-conf'/>
 <xsl:text>
diff --git a/src/xslt/kas.xslt b/src/xslt/kas.xslt
index 6a0b251..cb0b9a4 100644
--- a/src/xslt/kas.xslt
+++ b/src/xslt/kas.xslt
@@ -12,9 +12,9 @@  header:
 </xsl:text>
 <xsl:text>target: </xsl:text><xsl:value-of select='config/targets/default/text()'/><xsl:text>
 </xsl:text>
+<xsl:if test='config/bitbake|config/repos'>
 <xsl:text>
 </xsl:text>
-<xsl:if test='config/bitbake|config/repos'>
 <xsl:call-template name='repos'/>
 </xsl:if>
 <xsl:apply-templates select='config/local-conf'/>
@@ -38,11 +38,11 @@  header:
 </xsl:text>
 <xsl:text>      .: disabled
 </xsl:text>
-<xsl:text>
-</xsl:text>
 </xsl:template>
 
 <xsl:template match='config/repos/repo'>
+<xsl:text>
+</xsl:text>
 <xsl:text>  </xsl:text><xsl:value-of select='@name'/><xsl:text>:
 </xsl:text>
 <xsl:text>    url: "</xsl:text><xsl:value-of select='@url'/><xsl:text>"
@@ -54,8 +54,6 @@  header:
 </xsl:text>
 </xsl:if>
 <xsl:apply-templates select='layers'/>
-<xsl:text>
-</xsl:text>
 </xsl:template>
 
 <xsl:template match='config/repos/repo/layers'>
@@ -79,7 +77,8 @@  header:
 </xsl:template>
 
 <xsl:template match='config/local-conf'>
-<xsl:text>local_conf_header:
+<xsl:text>
+local_conf_header:
   oe-layersetup-local-conf-config-specific: |
 </xsl:text>
 <xsl:for-each select='line'>