|
Add a pre-upload config file, to help keep
our code and repo healthy. The config file
will a) format code with clang-format,
b) check for style violations with cpplint,
and c) check that the commit message has
Bug and Test clauses.
Bug: 31602667
Test: manual (see below)
Manual test:
1. Tried to upload an early version of this
CL, which used BUG= and TEST=, instead of
"Bug:" and "Test:", respectively. Observed
two pre-upload failures. (One for missing
"Bug:", and one for missing "Test:")
2. Tried to upload a change that adds the
following source as foo.cc:
main() {
int i = 0;
}
Observed that a) the clang-format check
complained about bad formatting (and offered
a command to reformat the file), and b) cpplint
complained about the lack of a copyright message.
Change-Id: I4f3963dd18d019543d56227ad84afd0669b14ee1
|