From bfd50f852911d4510eb1f35fa5b085c124381b82 Mon Sep 17 00:00:00 2001 From: jidicula Date: Tue, 26 Dec 2023 11:59:24 -0500 Subject: [PATCH] perf(find): Use EXCLUDE_REGEX as find command 2nd regex arg --- check.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check.sh b/check.sh index ba252b3..08b853d 100755 --- a/check.sh +++ b/check.sh @@ -95,14 +95,13 @@ src_files=$(find \ -o \ -regextype posix-egrep \ -regex "$INCLUDE_REGEX" \ + -not -regex "$EXCLUDE_REGEX" \ -print) # check formatting in each source file IFS=$'\n' # Loop below should separate on new lines, not spaces. for file in $src_files; do - if ! [[ ${file} =~ $EXCLUDE_REGEX ]]; then - format_diff "${file}" - fi + format_diff "${file}" done # global exit code is flipped to nonzero if any invocation of `format_diff` has