This repository provides a pre-commit hook that triggers a cdk synth
when matching files are committed and ensures it is possible before allowing the commit to proceed. This can be used to validate AWS CDK projects are potentially valid.
To utilize this hook add an entry to a .pre-commit-config.yaml
file in the project root and ensure pre-commit is installed. This does require a working CDK environment to be already setup. So ensure the cdk cli is installed along with any other dependencies.
Example:
repos:
- repo: https://github.com/1davidmichael/pre-commit-cdk-synth
rev: v0.0.2
hooks:
- id: cdk-synth