Akagi201
11/15/2016 - 12:03 PM

clang-tidy.md

#!/usr/bin/env bash

echo "clang-tidy starting "$*" ..."

TIDY="clang-tidy"

if [ -f /usr/local/opt/llvm/bin/clang-tidy ]; then
    TIDY="/usr/local/opt/llvm/bin/clang-tidy"
fi

$TIDY \
    -fix \
    -fix-errors \
    -header-filter=.* \
    --checks=readability-braces-around-statements,misc-macro-parentheses \
    $* \
    -- -I.

echo "clang-tidy finished!"

echo "clang-format starting "$*" ..."

clang-format -sort-includes -i $*

echo "clang-format finished!"