From 377af8684734ce1ca73bb81f3e559ff87a95f7fe Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 16 Nov 2022 21:29:28 +0000 Subject: [PATCH] MLIR: Add --fix-error to clang-tidy script --- mlir/utils/clang-tidy/apply-clang-tidy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/utils/clang-tidy/apply-clang-tidy.sh b/mlir/utils/clang-tidy/apply-clang-tidy.sh index 8266de8d6af2..a3592187361e 100755 --- a/mlir/utils/clang-tidy/apply-clang-tidy.sh +++ b/mlir/utils/clang-tidy/apply-clang-tidy.sh @@ -72,8 +72,8 @@ find $SRCS | grep ".cpp$" | sort | while read file ; do echo "-----------------------------------" echo "-- Apply all checks on file $file" - echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix" - $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix \ + echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix -fix-errors" + $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix -fix-errors \ | grep "warning:.*\]$" | sed -r 's#.*\[(.*)]$#\1#' | sort -u > $tmpfile git clang-format -f if [[ $(git diff --stat) == '' ]]; then @@ -89,8 +89,8 @@ find $SRCS | grep ".cpp$" | sort | while read file ; do echo "-----------------------------------" echo "-- Apply check $check on file $file" - echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix" - { $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix ; } 2>&1 + echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix -fix-errors" + { $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix -fix-errors ; } 2>&1 git clang-format -f if [[ $(git diff --stat) == '' ]]; then echo 'Nothing was applied, skip'