clint: Allow omitting include guards in .c.h file and func_attr.h file

This commit is contained in:
ZyX
2017-01-22 05:16:05 +03:00
parent ca4c8b7f8a
commit 927e6efc3d
3 changed files with 5 additions and 10 deletions

View File

@@ -182,6 +182,7 @@ _ERROR_CATEGORIES = [
'build/include_order',
'build/printf_format',
'build/storage_class',
'build/useless_fattr',
'readability/alt_tokens',
'readability/bool',
'readability/braces',
@@ -1224,6 +1225,10 @@ def CheckForHeaderGuard(filename, lines, error):
lines: An array of strings, each representing a line of the file.
error: The function to call with any errors found.
"""
if filename.endswith('.c.h') or FileInfo(filename).RelativePath() in set((
'func_attr.h',
)):
return
cppvar = GetHeaderGuardCPPVariable(filename)