1#!/bin/bash
2
3# A helper script to sequentially call checkstyle and clang-format which both
4# requires reading git tree. Repo hooks by default executes in parallel which
5# will cause race condition, so we have to use one repo hook that calls them
6# in order.
7set -e
8
9${1}/prebuilts/checkstyle/checkstyle.py --sha ${2}
10${1}/tools/repohooks/tools/clang-format.py --commit ${2} --style file --extensions c,h,cc,cpp
11