Skip to content

Commit

Permalink
perf(find): Use EXCLUDE_REGEX as find command 2nd regex arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jidicula committed Mar 12, 2024
1 parent f31661b commit 457fb11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 457fb11

Please sign in to comment.