pre-upload: Don't enforce 80 chars for include guards

Avoid enforcing this limit on include guard definitions in C/C++
header files, as they can be quite long due to file structure.

This case is already skipped by the C++ linter (, so
this CL adds consistency by skipping this in the generic linter too.

TEST=run the script on a header file with "#ifndef" directive
     followed by a long name

Change-Id: I1efa7f9a152b11cc47b5a77b8399e7d81ef5dc50
Commit-Ready: Maksim Ivanov <>
Tested-by: Maksim Ivanov <>
Reviewed-by: Mike Frysinger <>
diff --git a/ b/
index 4c6b783..8e9ca14 100755
--- a/
+++ b/
@@ -457,7 +457,7 @@
   MAX_LEN = 80
   SKIP_REGEXP = re.compile('|'.join([
-      r'^#\s*(define|include|import|pragma|if|endif)\b']))
+      r'^#\s*(define|include|import|pragma|if|ifndef|endif)\b']))
   included, excluded = _parse_common_inclusion_options(options)
   files = _filter_files(_get_affected_files(commit),