There is a serverless.yaml
file which contains line like that:
VpcId: !Ref MyVpc
Yaml files are validated by check-yaml
git
hook which invoked by pre-commit
command. So the pre-commit run --all-files
run is failed with error:
could not determine a constructor for the tag '!Ref'
in "serverless.yml", line 172, column 29
Is there a way to configure check-yaml
to skip this error?
Quick tip if you want to skip the pre-commit validations and quickly want to get a commit out there. To get your commit through without running that pre-commit hook, use the --no-verify option. Voila, without pre-commit hooks running!
How do you turn off a husky hook? You can set HUSKY environment variable to 0 in your CI config file, to disable hooks installation.
The core. hooksPath config allows you to set a directory where the hooks are located for a repository. This is particularly useful if trying to commit your hooks to the repository (e.g. for sharing hooks with the team).
hooks:
- id: check-yaml
args: ['--unsafe']
should do the trick. It just checks syntax instead of attempting to load the YAML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With