NullPointerException in yaml:IndentationCheck

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 7.9.2 (build 30863)

  • error observed
    Caused by: java.lang.NullPointerException
    Checking rule: yaml:IndentationCheck
    Got RuleProperty @org.sonar.check.RuleProperty(description=The indentation width, in spaces, type=, defaultValue=consistent, key=spaces)
    Got RuleProperty @org.sonar.check.RuleProperty(description=Tells whether block sequences should be indented or not, type=, defaultValue=true, key=indent-sequences)
    Got RuleProperty @org .sonar.check.RuleProperty(description=Tells whether to lint indentation in multi-line strings, type=, defaultValue=false, key=check-multi-line-strings)
    YAMLLint config for rule yaml:IndentationCheck/indentation: '—

at com.github.sbaudoin.yamllint.rules.Indentation.checkToken (
at com.github.sbaudoin.yamllint.rules.Indentation.check (
at com.github.sbaudoin.yamllint.Linter.getCosmeticProblems (
at com.github.sbaudoin.sonar.plugins.yaml.checks.YamlLintCheck.validate (


  • steps to reproduce
    mvn install -DskipTests
    mvn sonar:sonar -X
    (Suspect cause: we have some generated yaml files placed in target/classes/openapi, later used via classpath)

  • potential workaround
    tried to disable the Indentation rule for yaml (yaml:IndentationCheck), did not work…

1 Like

Hey there!

sonar-yaml is a community supported plugin (which here means it is better to create a Github issue on the repo than post here). I’m sure @sbaudoin will happy to take a look!



Is there a way to turn of sonar-yaml until the issue is solved?


Yes indeed!