Fix: format-cpp: don't pass -i twice to clang-format
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2023 18:09:00 +0000 (14:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2023 18:11:19 +0000 (14:11 -0400)
commit78de3202c4229810299157a7b605213f2841ca2c
treeb8356ca40c7ee8274ec1210d3fd5a107701449bc
parent8a5e382450359a884bbe594547dfb810e9196d0e
Fix: format-cpp: don't pass -i twice to clang-format

From Simon Marchi's original commit message:

I'm trying to run format-cpp, with clang-format-14 in my PATH, and I
get a ton of these messages:

    clang-format-14: for the -i option: may only occur zero or one times!

This is because -i is present in the FORMATTER variables, as well as in
the command line where the formatter is invoked.

Remove the one in the command-line.

Instead of assuming the FORMATTER variable contains '-i', assume it
doesn't since the options are not semantically part of the formatter's
name. The '-i' option is passed to the formatter invocation directly
since it is always needed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0c26ff0d8d4d99b3f161ca9e5aa94ff867e3f916
format-cpp
This page took 0.024998 seconds and 4 git commands to generate.