Skip to content

Commit

Permalink
Add clang-format-version option to ament_clang_format
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Weaver <[email protected]>
  • Loading branch information
tylerjw committed Jan 4, 2021
1 parent 8bf194a commit 5a1c980
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ament_clang_format/ament_clang_format/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def main(argv=sys.argv[1:]):
help='The files or directories to check. For directories files ending '
'in %s will be considered.' %
', '.join(["'.%s'" % e for e in extensions]))
parser.add_argument(
'--clang-format-version',
help='The version of clang-format to use.')
parser.add_argument(
'--reformat',
action='store_true',
Expand All @@ -72,13 +75,14 @@ def main(argv=sys.argv[1:]):
return 1

bin_names = [
'clang-format',
'clang-format-' + args.clang_format_version,
'clang-format-3.8',
'clang-format-3.7',
'clang-format-3.6',
'clang-format-3.5',
'clang-format-3.4',
'clang-format-3.3',
'clang-format'
]
clang_format_bin = find_executable(bin_names)
if not clang_format_bin:
Expand Down

0 comments on commit 5a1c980

Please sign in to comment.