Skip to content

Commit f1fd2c5

Browse files
Apply new clang-format-10 config (#519)
1 parent ca2b508 commit f1fd2c5

File tree

8 files changed

+175
-167
lines changed

8 files changed

+175
-167
lines changed

.clang-format

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,75 @@
11
---
22
BasedOnStyle: Google
3+
ColumnLimit: 120
4+
MaxEmptyLinesToKeep: 1
5+
SortIncludes: false
6+
7+
Standard: Auto
8+
IndentWidth: 2
9+
TabWidth: 2
10+
UseTab: Never
311
AccessModifierOffset: -2
412
ConstructorInitializerIndentWidth: 2
13+
NamespaceIndentation: None
14+
ContinuationIndentWidth: 4
15+
IndentCaseLabels: true
16+
IndentFunctionDeclarationAfterType: false
17+
518
AlignEscapedNewlinesLeft: false
619
AlignTrailingComments: true
20+
721
AllowAllParametersOfDeclarationOnNextLine: false
22+
ExperimentalAutoDetectBinPacking: false
23+
ObjCSpaceBeforeProtocolList: true
24+
Cpp11BracedListStyle: false
25+
26+
AllowShortBlocksOnASingleLine: true
827
AllowShortIfStatementsOnASingleLine: false
928
AllowShortLoopsOnASingleLine: false
1029
AllowShortFunctionsOnASingleLine: None
11-
AllowShortLoopsOnASingleLine: false
30+
AllowShortCaseLabelsOnASingleLine: false
31+
1232
AlwaysBreakTemplateDeclarations: true
1333
AlwaysBreakBeforeMultilineStrings: false
1434
BreakBeforeBinaryOperators: false
1535
BreakBeforeTernaryOperators: false
1636
BreakConstructorInitializersBeforeComma: true
37+
1738
BinPackParameters: true
18-
ColumnLimit: 120
1939
ConstructorInitializerAllOnOneLineOrOnePerLine: true
2040
DerivePointerBinding: false
2141
PointerBindsToType: true
22-
ExperimentalAutoDetectBinPacking: false
23-
IndentCaseLabels: true
24-
MaxEmptyLinesToKeep: 1
25-
NamespaceIndentation: None
26-
ObjCSpaceBeforeProtocolList: true
27-
PenaltyBreakBeforeFirstCallParameter: 19
28-
PenaltyBreakComment: 60
29-
PenaltyBreakString: 1
30-
PenaltyBreakFirstLessLess: 1000
31-
PenaltyExcessCharacter: 1000
32-
PenaltyReturnTypeOnItsOwnLine: 90
42+
43+
PenaltyExcessCharacter: 50
44+
PenaltyBreakBeforeFirstCallParameter: 30
45+
PenaltyBreakComment: 1000
46+
PenaltyBreakFirstLessLess: 10
47+
PenaltyBreakString: 100
48+
PenaltyReturnTypeOnItsOwnLine: 50
49+
3350
SpacesBeforeTrailingComments: 2
34-
Cpp11BracedListStyle: false
35-
Standard: Auto
36-
IndentWidth: 2
37-
TabWidth: 2
38-
UseTab: Never
39-
IndentFunctionDeclarationAfterType: false
4051
SpacesInParentheses: false
4152
SpacesInAngles: false
4253
SpaceInEmptyParentheses: false
4354
SpacesInCStyleCastParentheses: false
55+
SpaceAfterCStyleCast: false
4456
SpaceAfterControlStatementKeyword: true
4557
SpaceBeforeAssignmentOperators: true
46-
ContinuationIndentWidth: 4
47-
SortIncludes: false
48-
SpaceAfterCStyleCast: false
4958

5059
# Configure each individual brace in BraceWrapping
5160
BreakBeforeBraces: Custom
5261

5362
# Control of individual brace wrapping cases
54-
BraceWrapping: {
55-
AfterClass: 'true'
56-
AfterControlStatement: 'true'
57-
AfterEnum : 'true'
58-
AfterFunction : 'true'
59-
AfterNamespace : 'true'
60-
AfterStruct : 'true'
61-
AfterUnion : 'true'
62-
BeforeCatch : 'true'
63-
BeforeElse : 'true'
64-
IndentBraces : 'false'
65-
}
63+
BraceWrapping:
64+
AfterCaseLabel: true
65+
AfterClass: true
66+
AfterControlStatement: true
67+
AfterEnum: true
68+
AfterFunction: true
69+
AfterNamespace: true
70+
AfterStruct: true
71+
AfterUnion: true
72+
BeforeCatch: true
73+
BeforeElse: true
74+
IndentBraces: false
6675
...

doc/creating_moveit_plugins/lerp_motion_planner/include/lerp_interface/lerp_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ class LERPInterface
6363
const moveit::core::JointModelGroup* joint_model_group, const std::vector<double>& start_joint_vals,
6464
const std::vector<double>& goal_joint_vals, trajectory_msgs::JointTrajectory& joint_trajectory);
6565
};
66-
}
66+
} // namespace lerp_interface

doc/interactivity/src/interactive_robot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#include <moveit/robot_state/conversions.h>
4242

4343
// default world object position is just in front and left of Panda robot.
44-
const Eigen::Isometry3d InteractiveRobot::DEFAULT_WORLD_OBJECT_POSE_(Eigen::Isometry3d(Eigen::Translation3d(0.25, -0.5,
45-
0.5)));
44+
const Eigen::Isometry3d
45+
InteractiveRobot::DEFAULT_WORLD_OBJECT_POSE_(Eigen::Isometry3d(Eigen::Translation3d(0.25, -0.5, 0.5)));
4646

4747
// size of the world geometry cube
4848
const double InteractiveRobot::WORLD_BOX_SIZE_ = 0.15;

doc/perception_pipeline/src/bag_publisher_maintain_time.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
/*********************************************************************
2-
* Software License Agreement (BSD License)
3-
*
4-
* Copyright (c) 2018, Ridhwan Luthra.
5-
* All rights reserved.
6-
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions
9-
* are met:
10-
*
11-
* * Redistributions of source code must retain the above copyright
12-
* notice, this list of conditions and the following disclaimer.
13-
* * Redistributions in binary form must reproduce the above
14-
* copyright notice, this list of conditions and the following
15-
* disclaimer in the documentation and/or other materials provided
16-
* with the distribution.
17-
* * Neither the name of Ridhwan Luthra nor the names of its
18-
* contributors may be used to endorse or promote products derived
19-
* from this software without specific prior written permission.
20-
*
21-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32-
* POSSIBILITY OF SUCH DAMAGE.
33-
*********************************************************************/
2+
* Software License Agreement (BSD License)
3+
*
4+
* Copyright (c) 2018, Ridhwan Luthra.
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions
9+
* are met:
10+
*
11+
* * Redistributions of source code must retain the above copyright
12+
* notice, this list of conditions and the following disclaimer.
13+
* * Redistributions in binary form must reproduce the above
14+
* copyright notice, this list of conditions and the following
15+
* disclaimer in the documentation and/or other materials provided
16+
* with the distribution.
17+
* * Neither the name of Ridhwan Luthra nor the names of its
18+
* contributors may be used to endorse or promote products derived
19+
* from this software without specific prior written permission.
20+
*
21+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
* POSSIBILITY OF SUCH DAMAGE.
33+
*********************************************************************/
3434

3535
/* Author: Ridhwan Luthra */
3636

doc/perception_pipeline/src/cylinder_segment.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
/*********************************************************************
2-
* Software License Agreement (BSD License)
3-
*
4-
* Copyright (c) 2018, Ridhwan Luthra.
5-
* All rights reserved.
6-
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions
9-
* are met:
10-
*
11-
* * Redistributions of source code must retain the above copyright
12-
* notice, this list of conditions and the following disclaimer.
13-
* * Redistributions in binary form must reproduce the above
14-
* copyright notice, this list of conditions and the following
15-
* disclaimer in the documentation and/or other materials provided
16-
* with the distribution.
17-
* * Neither the name of Ridhwan Luthra nor the names of its
18-
* contributors may be used to endorse or promote products derived
19-
* from this software without specific prior written permission.
20-
*
21-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32-
* POSSIBILITY OF SUCH DAMAGE.
33-
*********************************************************************/
2+
* Software License Agreement (BSD License)
3+
*
4+
* Copyright (c) 2018, Ridhwan Luthra.
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions
9+
* are met:
10+
*
11+
* * Redistributions of source code must retain the above copyright
12+
* notice, this list of conditions and the following disclaimer.
13+
* * Redistributions in binary form must reproduce the above
14+
* copyright notice, this list of conditions and the following
15+
* disclaimer in the documentation and/or other materials provided
16+
* with the distribution.
17+
* * Neither the name of Ridhwan Luthra nor the names of its
18+
* contributors may be used to endorse or promote products derived
19+
* from this software without specific prior written permission.
20+
*
21+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
* POSSIBILITY OF SUCH DAMAGE.
33+
*********************************************************************/
3434

3535
/* Author: Ridhwan Luthra */
3636

doc/pick_place/src/pick_place_tutorial.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
/*********************************************************************
2-
* Software License Agreement (BSD License)
3-
*
4-
* Copyright (c) 2012, Willow Garage, Inc.
5-
* All rights reserved.
6-
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions
9-
* are met:
10-
*
11-
* * Redistributions of source code must retain the above copyright
12-
* notice, this list of conditions and the following disclaimer.
13-
* * Redistributions in binary form must reproduce the above
14-
* copyright notice, this list of conditions and the following
15-
* disclaimer in the documentation and/or other materials provided
16-
* with the distribution.
17-
* * Neither the name of Willow Garage nor the names of its
18-
* contributors may be used to endorse or promote products derived
19-
* from this software without specific prior written permission.
20-
*
21-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32-
* POSSIBILITY OF SUCH DAMAGE.
33-
*********************************************************************/
2+
* Software License Agreement (BSD License)
3+
*
4+
* Copyright (c) 2012, Willow Garage, Inc.
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions
9+
* are met:
10+
*
11+
* * Redistributions of source code must retain the above copyright
12+
* notice, this list of conditions and the following disclaimer.
13+
* * Redistributions in binary form must reproduce the above
14+
* copyright notice, this list of conditions and the following
15+
* disclaimer in the documentation and/or other materials provided
16+
* with the distribution.
17+
* * Neither the name of Willow Garage nor the names of its
18+
* contributors may be used to endorse or promote products derived
19+
* from this software without specific prior written permission.
20+
*
21+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
* POSSIBILITY OF SUCH DAMAGE.
33+
*********************************************************************/
3434

3535
/* Author: Ioan Sucan, Ridhwan Luthra*/
3636

doc/planning_scene/src/planning_scene_tutorial.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ int main(int argc, char** argv)
270270

271271
kinematic_constraints::ConstraintEvaluationResult constraint_eval_result =
272272
kinematic_constraint_set.decide(copied_state);
273-
ROS_INFO_STREAM("Test 10: Random state is "
274-
<< (constraint_eval_result.satisfied ? "constrained" : "not constrained"));
273+
ROS_INFO_STREAM("Test 10: Random state is " << (constraint_eval_result.satisfied ? "constrained" : "not constrained"));
275274

276275
// User-defined constraints
277276
// ~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)