Sha256: 5533961cd0d68e3976c6f3b3fe52a63934c5ee2099875c061d62b646514a6c26

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

#!/usr/bin/env bash

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

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

FAIL=0
SOURCE_FILES=`find source include tests verification -type f \( -name '*.h' -o -name '*.c' -o -name '*.inl' \)`
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

6 entries across 6 versions & 1 rubygems

Version Path
aws-crt-0.2.1 aws-crt-ffi/crt/aws-c-common/format-check.sh
aws-crt-0.2.0 aws-crt-ffi/crt/aws-c-common/format-check.sh
aws-crt-0.1.9 aws-crt-ffi/crt/aws-c-common/format-check.sh
aws-crt-0.1.8 aws-crt-ffi/crt/aws-c-common/format-check.sh
aws-crt-0.1.7 aws-crt-ffi/crt/aws-c-common/format-check.sh
aws-crt-0.1.6 aws-crt-ffi/crt/aws-c-common/format-check.sh