Skip to content

Bumps cpplint to 1.6.1#562

Open
InvincibleRMC wants to merge 4 commits into
ament:rollingfrom
InvincibleRMC:bump_cpplint-to-1.6.1
Open

Bumps cpplint to 1.6.1#562
InvincibleRMC wants to merge 4 commits into
ament:rollingfrom
InvincibleRMC:bump_cpplint-to-1.6.1

Conversation

@InvincibleRMC

@InvincibleRMC InvincibleRMC commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

Bumps cpplint to the current version on Ubuntu 24.04.

Current version info found here.

If rhel gets cpplint could maybe stop vendoring cpplint.py in the future.

Relate issues:
#548
#522
#501
#500

Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@christophebedard

Copy link
Copy Markdown
Member

Pulls: #562
Gist: https://gist.githubusercontent.com/christophebedard/c2878c607000610bb34990690e9fa862/raw/905fb39315abed5400bd906b1397e52746aec6f0/ros2.repos
BUILD args: --packages-above-and-dependencies ament_cpplint
TEST args: --packages-above ament_cpplint
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17314

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@christophebedard

Copy link
Copy Markdown
Member

Let's see if this breaks any tests downstream. If it does, we'll have to fix them at the same time.

@InvincibleRMC

Copy link
Copy Markdown
Contributor Author

There seems to be an oversight in cpplint 1.6.1 that it is running C++ lints on C files. To disable this you add // LINT_C_FILE to every .c file. This has already been adjusted upstream to run checks base on the .c file extensions as well.

https://github.com/cpplint/cpplint/blob/b728b3f2b013b8989bd626361ab21ae85f222830/cpplint.py#L1207-L1211

I imagine taking the patch would be less disruptive than adding LINT_C_FILE to every c file in ROS.

Comment thread ament_cpplint/ament_cpplint/cpplint.py
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@christophebedard

Copy link
Copy Markdown
Member

Pulls: #562
Gist: https://gist.githubusercontent.com/christophebedard/181b266114b97d4e6455eac316112568/raw/905fb39315abed5400bd906b1397e52746aec6f0/ros2.repos
BUILD args: --packages-above-and-dependencies ament_cpplint
TEST args: --packages-above ament_cpplint
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17326

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Comment thread ament_cpplint/ament_cpplint/cpplint.py
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@maspe36

maspe36 commented Jan 6, 2026

Copy link
Copy Markdown

Any movement on this? I enjoy using ament_cpplint() to run cpplint w/ ctest, but I need to NOLINT a few C++20 features, notably concepts.

Also, with gcc14 being shipped in 24.04 (and gcc15+ in 26.04) I will start using C++23 which may exacerbate things.

@InvincibleRMC

Copy link
Copy Markdown
Contributor Author

This PR stalled out since I got distracted working on other projects. I might have some time in a month or 2 to revisit. However the problems around concepts would need to wait for Ubuntu 26 and cpplint 2.0+. Which will likely be an even larger effort than just this minor bump.

1 similar comment
@InvincibleRMC

Copy link
Copy Markdown
Contributor Author

This PR stalled out since I got distracted working on other projects. I might have some time in a month or 2 to revisit. However the problems around concepts would need to wait for Ubuntu 26 and cpplint 2.0+. Which will likely be an even larger effort than just this minor bump.

@christophebedard

Copy link
Copy Markdown
Member

However the problems around concepts would need to wait for Ubuntu 26 and cpplint 2.0+. Which will likely be an even larger effort than just this minor bump.

We just talked about this during the triage meeting 🧇. We should indeed work on moving to version 2.0. Ubuntu 26.04 Resolute has 2.0.2: https://packages.ubuntu.com/resolute/cpplint. We should start by bumping to that version to get an idea of the impact.

@InvincibleRMC

Copy link
Copy Markdown
Contributor Author

We just talked about this during the triage meeting 🧇. We should indeed work on moving to version 2.0. Ubuntu 26.04 Resolute has 2.0.2: https://packages.ubuntu.com/resolute/cpplint. We should start by bumping to that version to get an idea of the impact.

Are you saying it would be fine to jump straight to 2.0.2?

@christophebedard

Copy link
Copy Markdown
Member

For Rolling, yes. Ideally, we would bump + fix everything at the same time. However, if the version bump breaks all packages (i.e., makes all their cpplint test fail and creates a ton of work), then we can come up with a different plan, e.g., bump and then do more of a gradual upgrade separately (?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants