Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added clang-format file and script #14

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading