Skip to content

Commit

Permalink
chore: add .gitignore and .clang-format (#9)
Browse files Browse the repository at this point in the history
* update .gitignore

Signed-off-by: Autumn60 <[email protected]>

* add .clang-format

Signed-off-by: Autumn60 <[email protected]>

* add .clang-format to ignore list in .cspell.json

Signed-off-by: Autumn60 <[email protected]>

---------

Signed-off-by: Autumn60 <[email protected]>
  • Loading branch information
Autumn60 authored Aug 11, 2024
1 parent 3bc4e09 commit 1526f08
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"**/.vscode/**",
"**/build/**",
"**/CHANGELOG.rst",
"**/.clang-format",
"**/CPPLINT.cfg",
"**/Doxyfile",
"**/install/**",
Expand Down
47 changes: 47 additions & 0 deletions aichallenge/workspace/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
Language: Cpp
BasedOnStyle: Google

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AllowShortFunctionsOnASingleLine: InlineOnly
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
BreakBeforeBraces: Custom
ColumnLimit: 100
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 2
DerivePointerAlignment: false
PointerAlignment: Middle
ReflowComments: true
IncludeCategories:
# C++ system headers
- Regex: <[a-z_]*>
Priority: 6
CaseSensitive: true
# C system headers
- Regex: <.*\.h>
Priority: 5
CaseSensitive: true
# Boost headers
- Regex: boost/.*
Priority: 4
CaseSensitive: true
# Message headers
- Regex: .*_msgs/.*
Priority: 3
CaseSensitive: true
- Regex: .*_srvs/.*
Priority: 3
CaseSensitive: true
# Other Package headers
- Regex: <.*>
Priority: 2
CaseSensitive: true
# Local package headers
- Regex: '".*"'
Priority: 1
CaseSensitive: true
3 changes: 3 additions & 0 deletions aichallenge/workspace/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/build
/install
/log

.vscode
*.code-workspace

0 comments on commit 1526f08

Please sign in to comment.