diff --git a/.clang-format b/.clang-format index 768dee3..536a180 100644 --- a/.clang-format +++ b/.clang-format @@ -33,7 +33,7 @@ BraceWrapping: SplitEmptyRecord: true BreakBeforeBinaryOperators: NonAssignment BreakBeforeTernaryOperators: true -BreakConstructorInitializers: BeforeColon +BreakConstructorInitializers: BeforeComma BreakInheritanceList: BeforeColon ColumnLimit: 100 CompactNamespaces: false diff --git a/fix_code_style.sh b/fix_code_style.sh index c97935e..b8ebb86 100755 --- a/fix_code_style.sh +++ b/fix_code_style.sh @@ -6,9 +6,9 @@ SCRIPTPATH=`dirname $SCRIPT` cd $SCRIPTPATH # Find all files with ".hpp" or ".cpp" extensions in the current directory and subdirectories, -# excluding certain paths (.rosflight/include/mavlink/v1.0/, ./rosflight_firmware/firmware/, and ./.git) +# excluding certain paths (./.git) find . -iname "*.hpp" -o -iname "*.cpp" | \ -egrep -v "^(.rosflight/include/mavlink/v1.0/|./rosflight_firmware/firmware/|./.git)" | \ +grep -Ev "^(./.git)" | \ # Format the files according to the rules specified in .clang-format xargs clang-format -i