Skip to content

Option to exclude files from ament_auto_lint #119

@jacobperron

Description

@jacobperron

It would be convenient if there was a way to exclude one or more files from lint checks when invoking ament_auto_lint.
This would be useful in circumstances were a package includes third-party source files (e.g. tinydir in ros2/rcl#332).
Currently, there is no apparent way to exclude a file other than not running a particular lint check.
Linters could be called separately (ie. not with ament_auto_lint), but some would still need to be extended to support file exclusions.

Implementation considerations

Ideally, we could pass a file exclusion list to ament_auto_lint and let it pass the appropriate flags to the linters it invokes, e.g.

ament_lint_auto_find_test_dependencies(
  EXCLUDE_FILES
    include/foo/bar.h
    src/bar.c
    src/baz.c
)

Another option could be to support placing a file (e.g. ament_lint.cfg) in the root of the repo that allows configuration of the various linters supported by ament_lint.

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