cfn-lint-to-codeframe

raw JSON →
1.0.6 verified Fri May 01 auth: no javascript

A CLI tool that converts the parseable output from cfn-lint (the Python AWS CloudFormation linter) into a human-friendly, code-frame style error display. Current version 1.0.6 takes stdin from cfn-lint's --format parseable output and reformats it with line-by-line context. Regular patch releases fix edge cases like multi-line messages and JSON parse errors. Simpler than using cfn-lint's own formatter, especially for CI pipelines.

error Error: Could not parse cfn-lint output
cause cfn-lint output not in parseable format or empty
fix
Ensure cfn-lint is run with --format parseable and produces output
gotcha Must pass --format parseable to cfn-lint, otherwise input format is incorrect and output will be garbage or error.
fix Use: cfn-lint --template <file> --format parseable | cfn-lint-to-codeframe
npm install cfn-lint-to-codeframe
yarn add cfn-lint-to-codeframe
pnpm add cfn-lint-to-codeframe

Pipes cfn-lint parseable output to cfn-lint-to-codeframe for pretty-printed code frames.

cfn-lint --template my-template.json --format parseable | npx cfn-lint-to-codeframe