diff options
author | caveh jalali <caveh@chromium.org> | 2023-03-17 19:43:05 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-17 21:02:25 +0000 |
commit | 3cb733a9e63ae9969565c70428703c31efd57486 (patch) | |
tree | 9908d99e6838ed552cf6f6f2ae300597692deef6 | |
parent | fb169ec7e71bb92dc8a4545b773ba2beb92976a7 (diff) | |
download | chrome-ec-3cb733a9e63ae9969565c70428703c31efd57486.tar.gz |
Revert "util/check_clang_format: Format C++ files"
This reverts commit 6aaca42c18798471313f2e5d9c2c9327fba6133b.
Reason for revert: previous patch
"tree: Run clang-format on C++ files"
needs to be rolled back due to build breakage.
and this patch is preventing rollback.
Original change's description:
> util/check_clang_format: Format C++ files
>
> BRANCH=none
> BUG=none
> TEST=./util/check_clang_format.py
>
> Change-Id: Ie270a1683ff62b7cb7d95e972b2fe51119be9885
> Signed-off-by: Tom Hughes <tomhughes@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4338477
> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Bug: none
Change-Id: I8db08278f0b87cbe8a24205efaefa5f77310f3e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4348007
Tested-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: caveh jalali <caveh@chromium.org>
-rwxr-xr-x | util/check_clang_format.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/util/check_clang_format.py b/util/check_clang_format.py index 529a37302d..5862c02a3d 100755 --- a/util/check_clang_format.py +++ b/util/check_clang_format.py @@ -3,7 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Validate all C/C++ source is formatted with clang-format. +"""Validate all C source is formatted with clang-format. This isn't very useful to users to call directly, but it is run it the CQ. Most users will likely find out they forgot to clang-format by @@ -21,7 +21,7 @@ from chromite.lib import commandline def main(argv=None): - """Find all C/C++ files and runs clang-format on them.""" + """Find all C files and runs clang-format on them.""" parser = commandline.ArgumentParser() parser.add_argument( "--fix", @@ -59,11 +59,7 @@ def main(argv=None): continue if "third_party" in path.parts: continue - if ( - path.name.endswith(".c") - or path.name.endswith(".cc") - or path.name.endswith(".h") - ): + if path.name.endswith(".c") or path.name.endswith(".h"): cmd.append(path) logging.debug("Running %s", " ".join(shlex.quote(str(x)) for x in cmd)) @@ -76,7 +72,7 @@ def main(argv=None): stdin=subprocess.DEVNULL, ) if result.stderr: - logging.error("All C/C++ source must be formatted with clang-format!") + logging.error("All C source must be formatted with clang-format!") for line in result.stderr.splitlines(): logging.error("%s", line) return 1 |