Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ament_clang_tidy/ament_clang_tidy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def main(argv=sys.argv[1:]):
'--system-headers',
action='store_true',
help='Displays errors from all system headers')
parser.add_argument(
'--clang-tidy-version',
default='6.0',
help='The version of clang-tidy to use.')
parser.add_argument(
'--packages-select', nargs='*', metavar='PKG_NAME',
help='Only process a subset of packages')
Expand Down Expand Up @@ -113,8 +117,9 @@ def main(argv=sys.argv[1:]):

bin_names = [
# 'clang-tidy',
'clang-tidy-6.0',
'clang-tidy-' + args.clang_tidy_version,
]

clang_tidy_bin = find_executable(bin_names)
if not clang_tidy_bin:
print('Could not find %s executable' %
Expand Down
4 changes: 4 additions & 0 deletions ament_clang_tidy/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ have already been installed. ``compile_commands.json`` files should have already
[--export-fixes EXPORT_FIXES] [--fix-errors]
[--header-filter HEADER_FILTER] [--quiet]
[--system-headers] [--jobs N]
[--clang-tidy-version CLANG_TIDY_VERSION]
[--packages-select [PKG_NAME [PKG_NAME ...]]]
[--xunit-file XUNIT_FILE]
[paths [paths ...]]
Expand Down Expand Up @@ -53,6 +54,9 @@ files.
The ``--jobs`` option will control the number of clang-tidy jobs to run in
parallel.

The ``--clang-tidy-version`` enables you to set a different version of
clang-tidy to use.

The ``--packages-select`` option will filter the "compile_commands.json" files
to just those generated by specific ROS packages.

Expand Down