ignore paths in licenses/ dirs for style/etc... checks

We don't want to enforce copyright/license/whitespace/etc... issues on
license files themselves as we often obtain these from some other place
and the content should be preserved exactly.

TEST=`./pre-upload_unittest.py` passes
TEST=uploading a license file in chromiumos-overlay/ no longer triggers checks

Change-Id: Iaa9c08701472cafc14e660dd48147c87cb74682b
Reviewed-on: https://chromium-review.googlesource.com/188580
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index fd556a8..d892155 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -65,6 +65,9 @@
     # ignore minified js and jquery
+    # Ignore license files as the content is often taken verbatim.
+    r'.*/licenses/.*',
@@ -158,8 +161,8 @@
     content: the content of the header to be verified.
     fail_msg: the first message to display in case of failure.
-    Returns:
-      The return value of HookFailure().
+  Returns:
+    The return value of HookFailure().
   license_re = re.compile(content, re.MULTILINE)
   bad_files = []