Skip to content

Commit

Permalink
added clang-format file and script
Browse files Browse the repository at this point in the history
  • Loading branch information
bsutherland333 committed Feb 29, 2024
1 parent e3c9e89 commit dac3f32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BraceWrapping:
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeColon
ColumnLimit: 100
CompactNamespaces: false
Expand Down
4 changes: 2 additions & 2 deletions fix_code_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dac3f32

Please sign in to comment.