From d9ed00e9c434b4c9eb722d47dc602cca73b5c6da Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:11:35 +0100 Subject: [PATCH] [CI] Use a single list for lint job (#451) (#454) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use a single list for lint job * Add explicit keyword * Update broken links (cherry picked from commit 044db05c476c1bd99132b511e491fc00c8eabd56) Co-authored-by: Christoph Fröhlich --- .github/workflows/ci-ros-lint.yml | 44 ++++++++----------- example_11/doc/userdoc.rst | 4 +- .../carlikebot_system.hpp | 2 +- 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci-ros-lint.yml b/.github/workflows/ci-ros-lint.yml index a87d10281..68d3b0365 100644 --- a/.github/workflows/ci-ros-lint.yml +++ b/.github/workflows/ci-ros-lint.yml @@ -2,6 +2,22 @@ name: ROS Lint on: pull_request: +env: + package-name: + ros2_control_demo_example_1 + ros2_control_demo_example_2 + ros2_control_demo_example_3 + ros2_control_demo_example_4 + ros2_control_demo_example_5 + ros2_control_demo_example_6 + ros2_control_demo_example_7 + ros2_control_demo_example_8 + ros2_control_demo_example_9 + ros2_control_demo_example_10 + ros2_control_demo_example_11 + ros2_control_demo_example_12 + ros2_control_demo_example_14 + jobs: ament_lint: name: ament_${{ matrix.linter }} @@ -19,20 +35,7 @@ jobs: with: distribution: rolling linter: ${{ matrix.linter }} - package-name: - ros2_control_demo_example_1 - ros2_control_demo_example_2 - ros2_control_demo_example_3 - ros2_control_demo_example_4 - ros2_control_demo_example_5 - ros2_control_demo_example_6 - ros2_control_demo_example_7 - ros2_control_demo_example_8 - ros2_control_demo_example_9 - ros2_control_demo_example_10 - ros2_control_demo_example_11 - ros2_control_demo_example_12 - ros2_control_demo_example_14 + package-name: ${{ env.package-name }} ament_lint_100: name: ament_${{ matrix.linter }} @@ -49,15 +52,4 @@ jobs: distribution: rolling linter: cpplint arguments: "--linelength=100 --filter=-whitespace/newline" - package-name: - ros2_control_demo_example_1 - ros2_control_demo_example_2 - ros2_control_demo_example_3 - ros2_control_demo_example_4 - ros2_control_demo_example_5 - ros2_control_demo_example_6 - ros2_control_demo_example_7 - ros2_control_demo_example_8 - ros2_control_demo_example_9 - ros2_control_demo_example_12 - ros2_control_demo_example_14 + package-name: ${{ env.package-name }} diff --git a/example_11/doc/userdoc.rst b/example_11/doc/userdoc.rst index c2dbb96d2..1d40c0cad 100644 --- a/example_11/doc/userdoc.rst +++ b/example_11/doc/userdoc.rst @@ -121,10 +121,10 @@ Files used for this demos * Controllers yaml: `carlikebot_controllers.yaml `__ * URDF file: `carlikebot.urdf.xacro `__ - * Description: `carlikebot_description.urdf.xacro `__ + * Description: `carlikebot.urdf.xacro `__ * ``ros2_control`` tag: `carlikebot.ros2_control.xacro `__ -* RViz configuration: `carlikebot.rviz `__ +* RViz configuration: `carlikebot.rviz `__ * Hardware interface plugin: `carlikebot_system.cpp `__ diff --git a/example_11/hardware/include/ros2_control_demo_example_11/carlikebot_system.hpp b/example_11/hardware/include/ros2_control_demo_example_11/carlikebot_system.hpp index 1fc539332..0043699bd 100644 --- a/example_11/hardware/include/ros2_control_demo_example_11/carlikebot_system.hpp +++ b/example_11/hardware/include/ros2_control_demo_example_11/carlikebot_system.hpp @@ -45,7 +45,7 @@ struct JointValue struct Joint { - Joint(const std::string & name) : joint_name(name) + explicit Joint(const std::string & name) : joint_name(name) { state = JointValue(); command = JointValue();