Skip to content

Latest commit

 

History

History
33 lines (29 loc) · 660 Bytes

README.md

File metadata and controls

33 lines (29 loc) · 660 Bytes

Run latest version of cfn-lint in a Docker container

Setup

$ export API_TOKEN=123456789abcdefg
$ build.sh rebuild

On a mac, greadlink needs to be installed - which is in coreutils:

$ brew install coreutils

Put this in .bashrc or .zshrc to run almost natively

cfn-lint(){
    local file=${*: -1}
    local lfile
    lfile=$(greadlink -m "$(pwd)/${file}")
    local rfile
    rfile=$(greadlink -m "/$(basename "$file")")
    docker run -it --rm \
        -v "${lfile}:${rfile}" \
        --log-driver none \
        --name cfn-lint \
        cfn-lint "$rfile"
}

Usage

 $ cfn-lint template.yaml