Skip to content

--exclude negates the target path #499

@robin-zealrobotics

Description

@robin-zealrobotics
# Correct: lints all files in src
ament_cpplint src 

# Bug: lints all files in current directory (possibly still excluding some things, I didn't verify that)
ament_cpplint --exclude "some/path.cpp" src

# Correct: workaround that does lint all files in src, excluding the path
ament_cpplint --exclude "some/path.cpp" -- src

I assume the way argparse is used to define 'exclude' is defaulting the 'paths' to '.'
I wouldn't be surprised if similar problems exist for other linters.

Only tested this on Iron.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions