From 473a0278e3f24662f8cfaad15d9a26ee69ac0b77 Mon Sep 17 00:00:00 2001 From: Vishal Pankaj Chandratreya <19171016+tfpf@users.noreply.github.com> Date: Fri, 26 Apr 2024 01:46:09 +0530 Subject: [PATCH] Do not format `CMakeCCompilerId.c` generated by CMake. (#17) --- clang-format.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-format.bash b/clang-format.bash index 53b7216..c41269c 100755 --- a/clang-format.bash +++ b/clang-format.bash @@ -1,11 +1,11 @@ #! /usr/bin/env bash -shopt -s globstar +shopt -s extglob globstar # Switch to the directory containing the script so that relative paths may be # used. cd "${0%/*}" -files=(**/*.c **/*.cc **/*.h) +files=(!(build)/**/*.c **/*.cc **/*.h) if [ "$1" = check ] then clang-format --verbose --dry-run -Werror ${files[@]}