Add project specific checkpatch options for depthcharge

Depthcharge is different from kernel/u-boot in certain ways, but most
of its coding style requirements could still be verified by
checkpatch.pl. Add this project to the list and add its own invocation
of checkpatch.

BUG=none
TEST=tried repo uploading a depthcharge patch with code violation, saw
     the patch rejected. Fixed the violations and tried uploading
     again, saw the patch accepted.

Change-Id: I798ecc3780b986fa1c120b7fd96d7897b9fd0cf2
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205171
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index e067eeb..028d256 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -757,6 +757,13 @@
                                            '--ignore=MSLEEP,VOLATILE'])
 
 
+def _run_checkpatch_depthcharge(project, commit):
+  """Runs checkpatch with options for depthcharge."""
+  return _run_checkpatch(project, commit, [
+      '--no-tree',
+      '--ignore=CAMELCASE,C99_COMMENTS,NEW_TYPEDEFS,CONFIG_DESCRIPTION'])
+
+
 def _kernel_configcheck(_project, commit):
   """Makes sure kernel config changes are not mixed with code changes"""
   files = _get_affected_files(commit)
@@ -893,6 +900,7 @@
     "chromiumos/platform/common-mk": [_moved_to_platform2],
     # TODO(bsimonnet): remove this check once src/platform/libchromeos has been
     # removed from the manifest (crbug.com/379939)
+    "chromiumos/platform/depthcharge": [_run_checkpatch_depthcharge],
     "chromiumos/platform/libchromeos": [_moved_to_platform2],
     "chromiumos/platform/ec": [_run_checkpatch_ec,
                                _check_change_has_branch_field],