Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Feb 21, 2024
1 parent a353165 commit f7a72a6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions run_clang_format.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

# OpenHD clang-format checking.
# Performed steps:
# Step1: Generate list of all .cpp / .h / .hpp files of this project
# (excluding subdirectories)
# Step 2: Run clang-format
# Arguments: run with 'f' to fix things (otherwise, default, only check and report
# error if clang-format finds any issues


function append_all_sources_headers() {
Expand Down Expand Up @@ -39,5 +42,10 @@ function fix_warnings() {
clang-format --verbose -i --style=file $FILE_LIST
}

#fix_warnings
check_warning
if [ "$1" == "f" ]; then
echo "Fixing warnings"
fix_warnings
else
echo "Checking warnings"
check_warning
fi

0 comments on commit f7a72a6

Please sign in to comment.