Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bmagyar opened this issue Mar 15, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@bmagyar
Copy link

bmagyar commented Mar 15, 2021

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)

  • OS: Ubuntu 20.04
  • ROS 2 Distro: Foxy
@bmagyar bmagyar added the bug Something isn't working label Mar 15, 2021
@christophebedard
Copy link
Member

christophebedard commented Mar 15, 2021

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 ros-tooling/action-ros-lint#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 ament/ament_lint#306 is merged, ros-tooling/action-ros-lint#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
Copy link
Contributor

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

@christophebedard
Copy link
Member

@emersonknapp I think we can close this now

@bmagyar
Copy link
Author

bmagyar commented Mar 21, 2021

Thanks guys!

@bmagyar bmagyar closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants