Add a clang-format pre-upload hook

This change converts adds the `clang_format_check` pre-upload hook,
modelled after the one in AOSP's repohooks. This is disabled by default,
and all projects must opt in to enable it.

  [Hook Overrides]
  clang_format_check: true

  # Optional if you need to limit clang-format to just a few projects.
  # e.g. for platform2/
  [Hook Overrides Options]
  clang_format_check: project_a/ project_b/

TEST=../repohooks/  # On platform2 with a badly-formatted
                                 # change.

Change-Id: I088a9f8585e74d3d0db3b647febdecdbf79f3d03
Commit-Ready: Luis Hector Chavez <>
Tested-by: Luis Hector Chavez <>
Reviewed-by: Dan Erat <>
2 files changed