pre-commit / pre-commit-hooks

Some out-of-the-box hooks for pre-commit
MIT License
5.2k stars 694 forks source link

check-yaml throws error when using .gitlab-ci.yml file using !reference tag #1053

Closed guicane closed 4 months ago

guicane commented 4 months ago

Check-yaml throws this error when running against a .gitlab-ci.yml file that contains a reference tag, that is a valid yaml code and the file runs ok but I'm unable to commit if this Hook is in place.

[Pre-Commit] Check YAML Syntax...........................................Failed
- hook id: check-yaml
- exit code: 1

could not determine a constructor for the tag '!reference'
  in ".gitlab-ci.yml", line 26, column 7
guicane commented 4 months ago

Sorry but this has been marked as completed but no update to the hook was created. I'm having this issue on 4.6.0

asottile commented 4 months ago

search the issue tracker or read the readme