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 18, 2021
1 parent 8bf194a commit d747180
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 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,10 @@ 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',
default='',
help='The version of clang-format to use.')
parser.add_argument(
'--reformat',
action='store_true',
Expand All @@ -72,13 +76,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 d747180

Please sign in to comment.