yamllint error: "invalid config: ignore should contain file patterns"


Setting up a new repository for YAML linting today I was running in a bit of an issue with yamllint.

I was using a YAML list to specify ingores, as mentioned in the documentation:

ignore:
  - "*.dont-lint-me.yaml"
  - "/bin/"
  - "!/bin/*.lint-me-anyway.yaml"

This however did not work with the above mentioned error message. After a lot of debugging I found that they released a new version recently which introduced this feature.

My solution was to update my locally build container image to the latest version, as of writing 1.29.0, in which this feature is introduced.

Lessons learned

  • Always check the versions of packages used and which version the documentation you are looking at is for
  • When introducing breaking changes into your open source project mention the version in the corresponding documentation

See also