Skip to content

Commit

Permalink
Support more c++ file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed May 5, 2024
1 parent 667bed4 commit c7449f8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/clang-format/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,19 @@ function validate_arguments() {
function apply_clang_format() {
# Find all C++ source files with extensions .cpp and .hpp in the specified directories
local cpp_files
cpp_files=$(find "${directories[@]}" -type f \( -name "*.cpp" -o -name "*.hpp" \))
cpp_files=$(
find "${directories[@]}" -type f \( \
-name "*.C" -o \
-name "*.cpp" -o \
-name "*.cxx" -o \
-name "*.c++" -o \
-name "*.cc" -o \
-name "*.h" -o \
-name "*.hpp" -o \
-name "*.hxx" -o \
-name "*.hh" \
\)
)

# Loop over each file and apply clang format
for cpp_file in $cpp_files; do
Expand Down

0 comments on commit c7449f8

Please sign in to comment.