Skip to content

Commit e1116b1

Browse files
Fix pre-commit and update clang format to match cpplint
1 parent fac70e0 commit e1116b1

File tree

10 files changed

+110
-24
lines changed

10 files changed

+110
-24
lines changed

.clang-format

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
---
22
BasedOnStyle: Google
33
DerivePointerAlignment: false
4-
IncludeBlocks: Regroup
5-
IncludeCategories:
6-
# Headers in "" with extension.
7-
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"'
8-
Priority: 1
9-
# Headers in <> without extension.
10-
- Regex: '<([A-Za-z0-9\Q/-_\E])+>'
11-
Priority: 2
12-
# Headers in <> from specific external libraries.
13-
- Regex: '<(catch2|boost|rclcpp.*)\/'
14-
Priority: 3
15-
# Headers in <> with extension.
16-
- Regex: '<([A-Za-z0-9.\Q/-_\E])+>'
17-
Priority: 4
4+
IncludeBlocks: Preserve
5+
InsertBraces: true
6+
---

example/include/generate_parameter_library_example/example_validators.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030

3131
#include <string>
3232

33-
#include <rclcpp/rclcpp.hpp>
34-
3533
#include <fmt/core.h>
34+
35+
#include <rclcpp/rclcpp.hpp>
3636
#include <tl_expected/expected.hpp>
3737

3838
namespace custom_validators {

example/include/generate_parameter_library_example/minimal_publisher.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#pragma once
3030

31+
#include <memory>
32+
3133
#include <rclcpp/rclcpp.hpp>
3234
#include <rclcpp_components/register_node_macro.hpp>
3335

@@ -37,7 +39,8 @@ namespace admittance_controller {
3739

3840
class MinimalPublisher : public rclcpp::Node {
3941
public:
40-
MinimalPublisher(const rclcpp::NodeOptions& options = rclcpp::NodeOptions());
42+
explicit MinimalPublisher(
43+
const rclcpp::NodeOptions& options = rclcpp::NodeOptions());
4144

4245
private:
4346
void timer_callback();

example/test/descriptor_test_gtest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
// Author: Chance Cardona
3030
//
3131

32+
#include <limits>
33+
#include <memory>
34+
3235
#include "generate_parameter_library_example/admittance_controller_parameters.hpp"
3336
#include "gtest/gtest.h"
3437
#include "rclcpp/rclcpp.hpp"
3538

36-
#include <limits>
37-
#include <memory>
38-
3939
class DescriptorTest : public ::testing::Test {
4040
public:
4141
void SetUp() {

example/test/example_test_gmock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
// Author: Denis Štogl
3030
//
3131

32+
#include <memory>
33+
3234
#include "generate_parameter_library_example/admittance_controller_parameters.hpp"
3335
#include "gmock/gmock.h"
3436
#include "rclcpp/rclcpp.hpp"
3537

36-
#include <memory>
37-
3838
class ExampleTest : public ::testing::Test {
3939
public:
4040
void SetUp() {

example/test/example_test_gtest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
// Author: Denis Štogl
3030
//
3131

32+
#include <memory>
33+
3234
#include "generate_parameter_library_example/admittance_controller_parameters.hpp"
3335
#include "gtest/gtest.h"
3436
#include "rclcpp/rclcpp.hpp"
3537

36-
#include <memory>
37-
3838
class ExampleTest : public ::testing::Test {
3939
public:
4040
void SetUp() {

example_python/setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
#!/usr/bin/env python3
2+
3+
# Copyright 2023 PickNik Inc.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
#
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
#
11+
# * Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
#
15+
# * Neither the name of the PickNik Inc. 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
22+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
# POSSIBILITY OF SUCH DAMAGE.
30+
131
import sys
232

333
from setuptools import setup

example_python/test/test_load_modules.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
#!/usr/bin/env python3
2+
3+
# Copyright 2023 PickNik Inc.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
#
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
#
11+
# * Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
#
15+
# * Neither the name of the PickNik Inc. 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
22+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
# POSSIBILITY OF SUCH DAMAGE.
30+
131
import generate_parameter_module_example
232

333
print(f'Imported module from: {generate_parameter_module_example.__file__}')

generate_parameter_library_py/setup.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
#!/usr/bin/env python3
2+
3+
# Copyright 2023 PickNik Inc.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
#
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
#
11+
# * Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
#
15+
# * Neither the name of the PickNik Inc. 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
22+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
# POSSIBILITY OF SUCH DAMAGE.
30+
131
from setuptools import find_packages
232
from setuptools import setup
333

parameter_traits/include/parameter_traits/parameter_traits.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#pragma once
3030

3131
#include <fmt/core.h>
32+
33+
#include <string>
34+
#include <vector>
35+
3236
#include <rsl/algorithm.hpp>
3337
#include <tl_expected/expected.hpp>
3438

0 commit comments

Comments
 (0)