Skip to content

Commit

Permalink
Tools: ros2: Enforce black instead of flake8
Browse files Browse the repository at this point in the history
* Removed dependency on ament_lint_common
* Removed all flake8 artifacts
* Ordered linters alphabetically

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
  • Loading branch information
Ryanf55 authored and magicrub committed Nov 22, 2023
1 parent d4c7601 commit 61e2c5f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 54 deletions.
10 changes: 0 additions & 10 deletions Tools/ros2/ardupilot_dds_tests/.flake8

This file was deleted.

5 changes: 4 additions & 1 deletion Tools/ros2/ardupilot_dds_tests/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
<exec_depend>rclpy</exec_depend>
<exec_depend>socat</exec_depend>

<test_depend>ament_black</test_depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_uncrustify</test_depend>
<test_depend>ament_xmllint</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ardupilot_sitl</test_depend>
<test_depend>launch</test_depend>
<test_depend>launch_pytest</test_depend>
Expand Down
27 changes: 0 additions & 27 deletions Tools/ros2/ardupilot_dds_tests/test/test_flake8.py

This file was deleted.

5 changes: 5 additions & 0 deletions Tools/ros2/ardupilot_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ rosidl_generate_interfaces(${PROJECT_NAME}

ament_export_dependencies(rosidl_default_runtime)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

# --------------------------------------------------------------------------- #
# Call last.

Expand Down
3 changes: 2 additions & 1 deletion Tools/ros2/ardupilot_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

<exec_depend>rosidl_default_runtime</exec_depend>

<test_depend>ament_cmake_copyright</test_depend>
<test_depend>ament_cmake_xmllint</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

Expand Down
10 changes: 0 additions & 10 deletions Tools/ros2/ardupilot_sitl/.flake8

This file was deleted.

3 changes: 0 additions & 3 deletions Tools/ros2/ardupilot_sitl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ ament_python_install_package(${PROJECT_NAME}
# build tests

if(BUILD_TESTING)
# Override default flake8 configuration.
set(ament_cmake_flake8_CONFIG_FILE ${CMAKE_SOURCE_DIR}/.flake8)

# Add linters.
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Expand Down
10 changes: 8 additions & 2 deletions Tools/ros2/ardupilot_sitl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@

<exec_depend>micro_ros_agent</exec_depend>

<test_depend>ament_cmake_pytest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>ament_cmake_black</test_depend>
<test_depend>ament_cmake_copyright</test_depend>
<test_depend>ament_cmake_lint_cmake</test_depend>
<test_depend>ament_cmake_pep257</test_depend>
<test_depend>ament_cmake_pytest</test_depend>
<test_depend>ament_cmake_uncrustify</test_depend>
<test_depend>ament_cmake_xmllint</test_depend>


<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit 61e2c5f

Please sign in to comment.