-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cpplint test in motion_computation to support CI/CD (#2405)
* fix white space * clang format * add 2 space and order headers * fix more * try again * reuse cp clang and turn off include order * Add source link for IncludeCategories
- Loading branch information
Showing
16 changed files
with
175 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
# ROS 2 C++ style guidelines | ||
# Reference: https://github.com/ament/ament_lint/blob/rolling/ament_clang_format/ament_clang_format/configuration/.clang-format | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
|
||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterEnum: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 100 | ||
ConstructorInitializerIndentWidth: 0 | ||
ContinuationIndentWidth: 2 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ReflowComments: false | ||
SpacesBeforeTrailingComments: 2 | ||
IncludeCategories: | ||
# Originally from: https://github.com/usdot-fhwa-stol/autoware.auto/blob/carma-system-4.5.0/AutowareAuto/.clang-format | ||
# Main header (e.g. foo.hpp for foo.cpp) automatically assigned priority zero | ||
|
||
# Rules are processed in order, the first match assigns the priority, so more general rules come last | ||
|
||
# C System headers | ||
- Regex: '^<.*\.h>' | ||
Priority: 1 | ||
# Eigen headers are not std C++ headers | ||
- Regex: '<Eigen/([A-Za-z0-9\Q/-_\E])+>' | ||
Priority: 3 | ||
# Headers in <> without extension; e.g. C++ standard | ||
- Regex: '<([A-Za-z0-9\Q/-_\E])+>' | ||
Priority: 2 | ||
# Messages | ||
- Regex: '.*_msgs/.*\.hpp' | ||
Priority: 4 | ||
# Headers in "" with file extension; e.g. from the same or another package | ||
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"' | ||
Priority: 3 | ||
# Other Packages | ||
- Regex: '^<.*/.*\.h.*>' | ||
Priority: 3 | ||
IncludeBlocks: Regroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Disable cpplint's include_order check. The checks are inconsistent with ROS 2 | ||
# header files, so we are disabling it until we know more about how the order | ||
# and C vs. C++ files are validated | ||
filter=-build/include_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.