Linting jobs suddenly failing with "error: unrecognized arguments: --linelength=140"
bmagyar opened this issue · 4 comments
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
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
).
After ros-tooling/action-ros-lint#253 - I have made a new release 0.1.3 (on v0.1) just with the reverted change.
@emersonknapp I think we can close this now
Thanks guys!