Skip to content

Commit 06c2a50

Browse files
committed
Updated configurations and added C++ syntax highlighting
1 parent 6a7ab6b commit 06c2a50

File tree

10 files changed

+53
-83
lines changed

10 files changed

+53
-83
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
Language: Cpp
33
BasedOnStyle: Google
4-
ColumnLimit: 100
4+
ColumnLimit: 120
55
MaxEmptyLinesToKeep: 1
66

77
IndentWidth: 2

.clang-tidy

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,43 @@ Checks: >
2525
-bugprone-easily-swappable-parameters,
2626
-bugprone-implicit-widening-of-multiplication-result,
2727
-clang-diagnostic-error,
28-
-bugprone-exception-escape
28+
-bugprone-exception-escape,
29+
-misc-include-cleaner,
30+
-bugprone-reserved-identifier
2931
WarningsAsErrors: "*"
3032
CheckOptions:
3133
- key: readability-braces-around-statements.ShortStatementLines
3234
value: "2"
3335
- key: readability-identifier-naming.NamespaceCase
3436
value: lower_case
35-
- key: readability-identifier-naming.ClassCase
37+
# type names
38+
- key: readability-identifier-naming.ClassCase
3639
value: CamelCase
37-
- key: readability-identifier-naming.StructCase
40+
- key: readability-identifier-naming.StructCase
3841
value: CamelCase
39-
- key: readability-identifier-naming.TemplateParameterCase,
40-
value: CamelCase,
41-
- key: readability-identifier-naming.FunctionCase
42-
value: camelBack
43-
- key: readability-identifier-naming.MethodCase
44-
value: camelBack
45-
- key: readability-identifier-naming.VariableCase
46-
value: lower_case
47-
- key: readability-identifier-naming.ClassMemberCase
48-
value: lower_case
49-
- key: readability-identifier-naming.ClassMemberSuffix
50-
value: _
51-
- key: readability-identifier-naming.PrivateMemberSuffix
52-
value: _
53-
- key: readability-identifier-naming.ProtectedMemberSuffix
54-
value: _
55-
- key: readability-identifier-naming.EnumConstantCase
56-
value: CamelCase
57-
- key: readability-identifier-naming.EnumConstantPrefix
58-
value: k
59-
- key: readability-identifier-naming.ConstexprVariableCase
60-
value: CamelCase
61-
- key: readability-identifier-naming.ConstexprVariablePrefix
62-
value: k
63-
- key: readability-identifier-naming.GlobalConstantCase
42+
- key: readability-identifier-naming.EnumCase
6443
value: CamelCase
65-
- key: readability-identifier-naming.GlobalConstantPrefix
66-
value: k
67-
- key: readability-identifier-naming.MemberConstantCase
44+
- key: readability-identifier-naming.UnionCase
6845
value: CamelCase
69-
- key: readability-identifier-naming.MemberConstantPrefix
70-
value: k
71-
- key: readability-identifier-naming.StaticConstantCase
72-
value: CamelCase
73-
- key: readability-identifier-naming.StaticConstantPrefix
74-
value: k
75-
- key: readability-implicit-bool-conversion.AllowIntegerConditions
76-
value: 1
77-
- key: readability-implicit-bool-conversion.AllowPointerConditions
78-
value: 1
79-
- key: readability-function-cognitive-complexity.IgnoreMacros
80-
value: 1
46+
# function names
47+
- key: readability-identifier-naming.FunctionCase
48+
value: lower_case
49+
# method names
50+
- key: readability-identifier-naming.MethodCase
51+
value: lower_case
52+
# variable names
53+
- key: readability-identifier-naming.VariableCase
54+
value: lower_case
55+
- key: readability-identifier-naming.PrivateMemberSuffix
56+
value: "_"
57+
- key: readability-identifier-naming.ProtectedMemberSuffix
58+
value: "_"
59+
# const, static, or global variables
60+
- key: readability-identifier-naming.EnumConstantCase
61+
value: UPPER_CASE
62+
- key: readability-identifier-naming.StaticConstantCase
63+
value: UPPER_CASE
64+
- key: readability-identifier-naming.GlobalConstantCase
65+
value: UPPER_CASE
66+
- key: readability-identifier-naming.ClassConstantCase
67+
value: UPPER_CASE

.devcontainer/nouveau/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ WORKDIR $USER_WORKSPACE
99

1010
COPY --chown=$USER_UID:$USER_GID . src/$PROJECT_NAME
1111

12-
RUN ls src/$PROJECT_NAME
13-
1412
RUN sudo apt-get -q update \
1513
&& sudo apt-get -q -y upgrade \
1614
&& rosdep update \

.devcontainer/nouveau/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"esbenp.prettier-vscode",
3535
"xaver.clang-format",
3636
"charliermarsh.ruff",
37-
"ms-python.black-formatter"
37+
"jeff-hykin.better-cpp-syntax"
3838
]
3939
}
4040
}

.devcontainer/nvidia/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ WORKDIR $USER_WORKSPACE
99

1010
COPY --chown=$USER_UID:$USER_GID . src/$PROJECT_NAME
1111

12-
RUN ls src/$PROJECT_NAME
13-
1412
RUN sudo apt-get -q update \
1513
&& sudo apt-get -q -y upgrade \
1614
&& rosdep update \

.devcontainer/nvidia/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"esbenp.prettier-vscode",
3939
"xaver.clang-format",
4040
"charliermarsh.ruff",
41-
"ms-python.black-formatter"
41+
"ms-python.black-formatter",
42+
"jeff-hykin.better-cpp-syntax"
4243
]
4344
}
4445
}

.docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ RUN sudo apt-get -q update \
7676

7777
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
7878
&& colcon build \
79-
&& sudo sed -i "s#/opt/ros/\$ROS_DISTRO/setup.bash#$USER_WORKSPACE/setup.sh#g" /ros_entrypoint.sh \
8079
&& echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
8180
&& echo "if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then source /opt/ros/${ROS_DISTRO}/setup.bash; fi" >> /home/$USERNAME/.bashrc
8281

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 23.1.0
4-
hooks:
5-
- id: black
6-
72
- repo: https://github.com/astral-sh/ruff-pre-commit
83
rev: v0.0.291
94
hooks:
@@ -14,7 +9,6 @@ repos:
149
rev: v2.2.4
1510
hooks:
1611
- id: codespell
17-
args: ["--write-changes"]
1812

1913
- repo: local
2014
hooks:

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"C_Cpp.codeAnalysis.clangTidy.codeAction.formatFixes": true,
3939
"clang-format.executable": "/usr/bin/clang-format-14",
4040
"[cpp]": {
41-
"editor.rulers": [100],
41+
"editor.rulers": [120],
4242
"editor.tabSize": 2,
4343
"editor.defaultFormatter": "xaver.clang-format"
4444
},
@@ -50,7 +50,7 @@
5050
"source.fixAll": "explicit",
5151
"source.organizeImports": "explicit"
5252
},
53-
"editor.defaultFormatter": "ms-python.black-formatter"
53+
"editor.defaultFormatter": "charliermarsh.ruff"
5454
},
5555
"[dockerfile]": {
5656
"editor.quickSuggestions": {

LICENSE

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
BSD 3-Clause License
1+
MIT License
22

3-
Copyright (c) 2024, Robotic Decision Making Lab
3+
Copyright (c) 2024 Evan Palmer
44

5-
Redistribution and use in source and binary forms, with or without
6-
modification, are permitted provided that the following conditions are met:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
711

8-
1. Redistributions of source code must retain the above copyright notice, this
9-
list of conditions and the following disclaimer.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1014

11-
2. Redistributions in binary form must reproduce the above copyright notice,
12-
this list of conditions and the following disclaimer in the documentation
13-
and/or other materials provided with the distribution.
14-
15-
3. Neither the name of the copyright holder nor the names of its
16-
contributors may be used to endorse or promote products derived from
17-
this software without specific prior written permission.
18-
19-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)