Skip to content

Commit

Permalink
adding diagnostics to the clang-tidy script
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Jul 26, 2024
1 parent e291f76 commit d47fab6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/run-clang-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
WORKDIR="$( cd $SCRIPTDIR/.. && pwd )"

# Make compile_command.json
export CXXFLAGS="-Wno-attributes -Wno-deprecated-declarations"
echo Checking Python version
which python

echo Making compile_command.json
rm -rf tmp && mkdir tmp && cmake -Btmp -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSUBSTRAIT_CPP_ROUNDTRIP_TESTING=ON
# Build substrait protobuf
echo Building substrait protobuf
pushd tmp/src/substrait/proto && make -j && popd || exit
# Build textplan grammar
echo Building textplan grammar
pushd tmp/src/substrait/textplan/parser/grammar && make -j antlr4_runtime textplan_grammar_headers && popd || exit
# Run clang-tidy
echo Running clang-tidy
if [ "$1" == "fix" ]; then
python3 scripts/run-clang-tidy.py "$WORKDIR" "tmp" "third_party" "h,hpp,cc,cpp" "--quiet --fix"
else
Expand Down

0 comments on commit d47fab6

Please sign in to comment.