Sha256: d0e0bc8ab8b5420e153b340d32d375f71500ed68b405efa3ac2f81f4fddc61d9

Contents?: true

Size: 512 Bytes

Versions: 4

Compression:

Stored size: 512 Bytes

Contents

#!/usr/bin/env bash

if [[ -z $CLANG_FORMAT ]] ; then
    CLANG_FORMAT=clang-format
fi

if NOT type $CLANG_FORMAT 2> /dev/null ; then
    echo "No appropriate clang-format found."
    exit 1
fi

FAIL=0
SOURCE_FILES=`find bin source include tests -type f \( -name '*.h' -o -name '*.c' \)`
for i in $SOURCE_FILES
do
    $CLANG_FORMAT -output-replacements-xml $i | grep -c "<replacement " > /dev/null
    if [ $? -ne 1 ]
    then
        echo "$i failed clang-format check."
        FAIL=1
    fi
done

exit $FAIL

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aws-crt-0.3.0 aws-crt-ffi/crt/aws-c-cal/format-check.sh
aws-crt-0.2.1 aws-crt-ffi/crt/aws-c-cal/format-check.sh
aws-crt-0.2.0 aws-crt-ffi/crt/aws-c-cal/format-check.sh
aws-crt-0.1.9 aws-crt-ffi/crt/aws-c-cal/format-check.sh