1davidmichael / pre-commit-cdk-synth

A pre-commit hook to run cdk synth when relevant files are modified.

Home Page:https://github.com/1davidmichael/pre-commit-cdk-synth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A pre-commit hook to run cdk synth when relevant files are modified.

https://github.com/1davidmichael/pre-commit-cdk-synth