YamlIndentationException: Indentation of line 4 is greater than the one of line 3
See original GitHub issueSome of the YAML files, which this project is not able to parse.
apiVersion: v1
appVersion: 5.7.30
description: Fast, reliable, scalable, and easy to use open-source relational database
system.
home: https://www.mysql.com/
icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png
keywords:
- mysql
- database
- sql
maintainers:
- email: o.with@sportradar.com
name: olemarkus
- email: viglesias@google.com
name: viglesiasce
name: mysql
sources:
- https://github.com/kubernetes/charts
- https://github.com/docker-library/mysql
version: 1.6.4
apiVersion: v1
name: tomcat
description: Deploy a basic tomcat application server with sidecar as web archive container
icon: http://tomcat.apache.org/res/images/tomcat.png
version: 0.4.1
appVersion: "7.0"
home: https://github.com/yahavb
maintainers:
- name: yahavb
email: ybiran@ananware.systems
Stack trace:
com.amihaiemil.eoyaml.exceptions.YamlIndentationException: Indentation of line 4 is greater than the one of line 3. It should be less or equal.
at com.amihaiemil.eoyaml.WellIndented.iterator(WellIndented.java:120)
at com.amihaiemil.eoyaml.SameIndentationLevel.iterator(SameIndentationLevel.java:74)
at com.amihaiemil.eoyaml.ReadYamlMapping.valueOfStringKey(ReadYamlMapping.java:182)
at com.amihaiemil.eoyaml.ReadYamlMapping.value(ReadYamlMapping.java:136)
at com.amihaiemil.eoyaml.YamlMapping.string(YamlMapping.java:147)
at com.amihaiemil.eoyaml.YamlMapping.string(YamlMapping.java:135)
at com.artipie.helm.TgzArchive.name(TgzArchive.java:82)
at com.artipie.helm.TarArchiveTest.nameIdentifiedCorrectly(TarArchiveTest.java:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Note: some of the YAML validators claims that those 2 files are actually valid ones
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
A YAML file cannot contain tabs as indentation - Stack Overflow
A YAML file use spaces as indentation, you can use 2 or 4 spaces for indentation, but no tab. In other words, tab...
Read more >[Bug?]: YAMLException: bad indentation of a mapping entry at ...
I tried looking around for it myself & couldn't figure out which YAML file(s) is causing this issue. Not sure if it's relevant,...
Read more >YAML Superpowers, part 2: Multiline Strings
In this post we will discover the many ways YAML can represent strings, including multiline strings, keeping or stripping indentation, and more!
Read more >YAML - Indentation and Separation - Tutorialspoint
Indentation and separation are two main concepts when you are learning any programming language. This chapter talks about these two concepts related to...
Read more >YAML Ain't Markup Language (YAML™) revision 1.2.2
YAML's block collections use indentation for scope and begin each entry on its own line. Block sequences indicate each entry with a dash...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Sammers21 @g4s8 I just released version
5.1.0
which allows you to bypass the validation of indentation.However, this might result in a different YAML than what you expect, so I only recommend you do it if you have proper tests for your code. More details here.
I’m closing this Issue now as I think all the related bugs have been fixed. Please feel free to open another one if you still have problems.
@Sammers21 The bug about reading mappings within sequences, which start at the dash line, has just been fixed and released with version
5.0.3
. See here.I’ll continue with #361 and see if I can implement some default formatting rules.