Skip to content

Commit 5ff6acd

Browse files
committed
WIP: formatting/linting
1 parent 65c8c1b commit 5ff6acd

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

CMakeLists.txt

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,26 @@ add_executable(test_profiler test/test_profiler.cpp)
5858
target_link_libraries(test_profiler ${PROJECT_NAME}_lib)
5959

6060
# 4. Installation
61-
install(TARGETS ${PROJECT_NAME}_lib
61+
install(
62+
TARGETS ${PROJECT_NAME}_lib
6263
EXPORT export_${PROJECT_NAME}
6364
LIBRARY DESTINATION lib
6465
ARCHIVE DESTINATION lib
6566
RUNTIME DESTINATION bin
6667
)
6768

68-
install(DIRECTORY include/ DESTINATION include)
69+
install(
70+
DIRECTORY include/
71+
DESTINATION include
72+
)
6973

70-
install(PROGRAMS
71-
scripts/liveprofile
74+
install(
75+
PROGRAMS scripts/liveprofile
7276
DESTINATION lib/${PROJECT_NAME}
7377
)
7478

75-
install(TARGETS
79+
install(
80+
TARGETS
7681
profiler_test
7782
test_loop_timer
7883
test_profiler
@@ -85,8 +90,18 @@ ament_export_dependencies(rclcpp std_msgs rosidl_default_runtime)
8590

8691
# 6. Testing and Linting
8792
if(BUILD_TESTING)
88-
find_package(ament_lint_auto REQUIRED)
89-
ament_lint_auto_find_test_dependencies()
93+
find_package(tue_lint_config REQUIRED)
94+
find_package(ament_cmake_clang_format REQUIRED)
95+
find_package(ament_cmake_clang_tidy REQUIRED)
96+
find_package(ament_cmake_lint_cmake REQUIRED)
97+
find_package(ament_cmake_xmllint REQUIRED)
98+
ament_clang_format(
99+
CONFIG_FILE ${tue_lint_config_DIR}/../config/.clang-format
100+
--clang-format-version=21
101+
)
102+
# ament_clang_tidy()
103+
ament_lint_cmake(MAX_LINE_LENGTH 120)
104+
ament_xmllint(MAX_LINE_LENGTH 120)
90105
endif()
91106

92107
ament_package()

package.xml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@
2323
<exec_depend>python3-numpy</exec_depend>
2424
<exec_depend>rclpy</exec_depend>
2525

26-
<test_depend>ament_lint_auto</test_depend>
2726
<test_depend>ament_cmake_clang_format</test_depend>
28-
<test_depend>ament_cmake_cppcheck</test_depend>
29-
<test_depend>ament_cmake_cpplint</test_depend>
30-
<test_depend>ament_cmake_flake8</test_depend>
27+
<test_depend>ament_cmake_clang_tidy</test_depend>
3128
<test_depend>ament_cmake_lint_cmake</test_depend>
32-
<test_depend>ament_cmake_pep257</test_depend>
33-
<!-- <test_depend>ament_cmake_uncrustify</test_depend>-->
3429
<test_depend>ament_cmake_xmllint</test_depend>
35-
36-
<member_of_group>rosidl_interface_packages</member_of_group>
30+
<test_depend>tue_lint_config</test_depend>
3731

3832
<doc_depend>doxygen</doc_depend>
3933

34+
<member_of_group>rosidl_interface_packages</member_of_group>
35+
4036
<export>
4137
<build_type>ament_cmake</build_type>
4238
<rosdoc config="rosdoc.yaml" />

0 commit comments

Comments
 (0)