@@ -282,9 +282,10 @@ def GetNonHeaderExtensions():
282282'build/forward_decl' ,
283283'build/header_guard' ,
284284'build/include' ,
285- 'build/include_subdir' ,
286285'build/include_alpha' ,
286+ 'build/include_inline' ,
287287'build/include_order' ,
288+ 'build/include_subdir' ,
288289'build/include_what_you_use' ,
289290'build/namespaces_literals' ,
290291'build/namespaces' ,
@@ -356,8 +357,9 @@ def GetNonHeaderExtensions():
356357# off by default (i.e., categories that must be enabled by the --filter= flags).
357358# All entries here should start with a '-' or '+', as in the --filter= flag.
358359_DEFAULT_FILTERS = [
359- '-build/include ' ,
360+ '-build/include_alpha ' ,
360361'-build/include_subdir' ,
362+ '-build/include_what_you_use' ,
361363'-legal/copyright' ,
362364 ]
363365
@@ -834,9 +836,9 @@ class _IncludeState(object):
834836# needs to move backwards, CheckNextIncludeOrder will raise an error.
835837_INITIAL_SECTION = 0
836838_MY_H_SECTION = 1
837- _C_SECTION = 2
838- _CPP_SECTION = 3
839- _OTHER_H_SECTION = 4
839+ _OTHER_H_SECTION = 2
840+ _C_SECTION = 3
841+ _CPP_SECTION = 4
840842
841843_TYPE_NAMES = {
842844_C_SYS_HEADER : 'C system header' ,
@@ -848,9 +850,9 @@ class _IncludeState(object):
848850_SECTION_NAMES = {
849851_INITIAL_SECTION : "... nothing. (This can't be an error.)" ,
850852_MY_H_SECTION : 'a header this file implements' ,
853+ _OTHER_H_SECTION : 'other header' ,
851854_C_SECTION : 'C system header' ,
852855_CPP_SECTION : 'C++ system header' ,
853- _OTHER_H_SECTION : 'other header' ,
854856 }
855857
856858def __init__ (self ):
@@ -2130,7 +2132,7 @@ def CheckInlineHeader(filename, include_state, error):
21302132for name in bad_headers :
21312133err = '%s includes both %s and %s-inl.h' % (filename , name , name )
21322134linenum = all_headers [name ]
2133- error (filename , linenum , 'build/include ' , 5 , err )
2135+ error (filename , linenum , 'build/include_inline ' , 5 , err )
21342136
21352137
21362138def CheckForNewlineAtEOF (filename , lines , error ):
@@ -4768,11 +4770,10 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
47684770include_state .include_list [- 1 ].append ((include , linenum ))
47694771
47704772# We want to ensure that headers appear in the right order:
4771- # 1) for foo.cc, foo.h (preferred location)
4772- # 2) c system files
4773- # 3) cpp system files
4774- # 4) for foo.cc, foo.h (deprecated location)
4775- # 5) other google headers
4773+ # 1) for foo.cc, foo.h
4774+ # 2) other project headers
4775+ # 3) c system files
4776+ # 4) cpp system files
47764777#
47774778# We classify each include statement as one of those 5 types
47784779# using a number of techniques. The include_state object keeps
0 commit comments