Skip to content

1davidmichael/pre-commit-cdk-synth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

CDK Synth pre-commit hook

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.

Usage

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