Skip to content

Non-yaml checks running on yaml files #245

@nickgw

Description

@nickgw

Describe the Bug

Checks for puppet files are also being executed on yaml files. This especially happens with yaml with anchors and aliases:

[root@08f8f7ae7287 puppet]# puppet-lint hieradata/facts/env/prod/role/unbound.yaml
ERROR: Syntax error on line 3 (check: syntax)

  zone.consul.contoso.com: &consulDNS
                                 ^

Try running `puppet parser validate <file>`

Expected Behavior

Only yaml compatible checks should run on yaml files.

Steps to Reproduce

Run puppet-lint on yaml files.

Additional Context

Looks like the issue may have been introduced here: https://github.com/puppetlabs/puppet-lint/pull/235/files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions