ros-tooling / action-ros-ci

Github Action to build and test ROS 2 packages using colcon
Apache License 2.0
144 stars 53 forks source link

Linting jobs suddenly failing with "error: unrecognized arguments: --linelength=140" #580

Closed bmagyar closed 3 years ago

bmagyar commented 3 years ago

Description

Some linting jobs fail with error: unrecognized arguments: --linelength=140. This started happening roughly a week ago and no changes were done on our end.

Here's the lint job config, we are using the tagged versions:

name: Lint ros2_control
on:
  pull_request:

jobs:
  ament_lint:
    name: ament_${{ matrix.linter }}
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
          linter: [copyright, cppcheck, cpplint, flake8, pep257, uncrustify, xmllint]
    steps:
    - uses: actions/checkout@v1
    - uses: ros-tooling/setup-ros@v0.1
    - uses: ros-tooling/action-ros-lint@v0.1
      with:
        distribution: foxy
        linter: ${{ matrix.linter }}
        package-name:
          controller_interface
          controller_manager
          controller_manager_msgs
          hardware_interface
          ros2_control
          ros2_control_test_assets
          transmission_interface

And now many job fail like so:

/usr/bin/bash -c source /opt/ros/foxy/setup.sh && ament_pep257 $(colcon list --packages-select controller_interface controller_manager controller_manager_msgs hardware_interface ros2_control ros2_control_test_assets transmission_interface -p) --linelength=140 
Error: usage: ament_pep257 [-h] [--ignore [IGNORE [IGNORE ...]]]
                    [--exclude [filename [filename ...]]]
                    [--xunit-file XUNIT_FILE]
                    [paths [paths ...]]
Error: ament_pep257: error: unrecognized arguments: --linelength=140
Error: The process '/usr/bin/bash' failed with exit code 2

Expected Behavior

Just Works TM

Actual Behavior

Some linting jobs fail with error: unrecognized arguments: --linelength=140

To Reproduce

Check any recent CI workflow at https://github.com/ros-controls/ros2_control Or look at this specific one: https://github.com/ros-controls/ros2_control/pull/343/checks?check_run_id=2094028076

System (please complete the following information)

christophebedard commented 3 years ago

I'm guessing you meant to open an issue over at https://github.com/ros-tooling/action-ros-lint

This looks to be related to https://github.com/ros-tooling/action-ros-lint/pull/246

The --linelength option was added to ament_lint_cmake in https://github.com/ament/ament_lint/pull/235/files#diff-28bb1b0a9c88ab4a0a59fc77d758cb830e28b3ccd358c734a42f848717ad7005R51. That option doesn't exist for ament_pep257 (see https://github.com/ament/ament_lint/blob/1e7a90db1afc7918abcfb4d6d6d0e352d3c1b113/ament_pep257/ament_pep257/main.py#L59), but action-ros-ci uses it for any/all linters: https://github.com/ros-tooling/action-ros-lint/blob/f0b138e58ed154cdc388ab208398f1dd4a381b4b/src/action-ros-lint.ts#L57-L60

I think once https://github.com/ament/ament_lint/pull/306 is merged, https://github.com/ros-tooling/action-ros-lint/pull/246 can be reverted and the issue should be fixed. In the meantime, you can try using the previous version explicitly (ros-tooling/action-ros-lint@0.1.1).

emersonknapp commented 3 years ago

After https://github.com/ros-tooling/action-ros-lint/pull/253 - I have made a new release 0.1.3 (on v0.1) just with the reverted change.

christophebedard commented 3 years ago

@emersonknapp I think we can close this now

bmagyar commented 3 years ago

Thanks guys!