<commit_before># cfn-check

A command-line tool for validating CloudFormation templates **quickly**.

## Why

[CloudFormation](https://aws.amazon.com/cloudformation/) is great.
Unfortunately, the error handling leaves a bit to be desired.

The [AWS CLI](https://aws.amazon.com/cli/) provided
`[validate-template](http://docs.aws.amazon.com/cli/latest/reference/cloudformation/validate-template.html)` command only
checks your
[syntax](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-validate-template.html), not the actual resources, their properties, etc. This means you can *think* you're successfully creating a new stack, and still get a `CREATE_FAIL`. This tool aims to give you quick feedback so you spend less time banging your head against the CloudFormation Console.

## Usage

    Usage: cfn-check [options] <template>

    Options:

      -h, --help     output usage information
      -V, --version  output the version number
      -w, --watch    Watch template for changes
      -p, --pretty   Print pretty JSON when valid (regardless of character limit)
      -c, --compact  Print compact JSON when valid (regardless of character limit)

### Planned

* `quiet` don't output anything, just set return code.
* `verbose` increase the logging level.

## Checks

* JSON is valid.
* `Ref`s are valid parameters, resources, or [pseudo<commit_msg>Include installation instruction in readme.<commit_after># cfn-check

A command-line tool for validating CloudFormation templates **quickly**.

## Overview

[CloudFormation](https://aws.amazon.com/cloudformation/) is great.
Unfortunately, the error handling leaves a bit to be desired.

The [AWS CLI](https://aws.amazon.com/cli/) provided
`[validate-template](http://docs.aws.amazon.com/cli/latest/reference/cloudformation/validate-template.html)` command only
checks your
[syntax](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-validate-template.html), not the actual resources, their properties, etc. This means you can *think* you're successfully creating a new stack, and still get a `CREATE_FAIL`. This tool aims to give you quick feedback so you spend less time banging your head against the CloudFormation Console.

## Installation

   npm install -g cfn-check

## Usage

    Usage: cfn-check [options] <template>

    Options:

      -h, --help     output usage information
      -V, --version  output the version number
      -w, --watch    Watch template for changes
      -p, --pretty   Print pretty JSON when valid (regardless of character limit)
      -c, --compact  Print compact JSON when valid (regardless of character limit)

### Planned

* `quiet` don't output anything, just set return code.
* `verbose` increase the logging level.

## Checks

* JSON is valid.
* `Ref`s are valid parameters, resources, or [pseudo
{'fraction_non_alphanumeric': 0.10342393222732087, 'fraction_numerical': 0.0, 'mean_word_length': 3.894645941278066, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5638516', 'n_tokens_mistral': 806, 'n_tokens_neox': 770, 'n_words': 302}