Avoid double-testing MISSING+REQUIRED
This commit is contained in:
@@ -71,20 +71,21 @@ class MinHeader(object):
|
|||||||
|
|
||||||
self._Log('\t%s: ' % inc_path)
|
self._Log('\t%s: ' % inc_path)
|
||||||
|
|
||||||
|
missing = False
|
||||||
try:
|
try:
|
||||||
sub_includes = self._FindSubIncludes(inc_path)
|
sub_includes = self._FindSubIncludes(inc_path)
|
||||||
except IncludeNotFound:
|
except IncludeNotFound:
|
||||||
self._Log('(MISSING) ')
|
self._Log('(MISSING) ')
|
||||||
sub_includes = []
|
missing = True
|
||||||
|
|
||||||
# Is the include useful at all?
|
# Is the include useful at all?
|
||||||
if self._TestReplacement(path, lines, inc_i, []):
|
if self._TestReplacement(path, lines, inc_i, []):
|
||||||
self._Log('UNUSED\n')
|
self._Log('UNUSED\n')
|
||||||
return True
|
return True
|
||||||
elif set(sub_includes) & split:
|
elif not missing and set(sub_includes) & split:
|
||||||
self._Log('CIRCULAR\n')
|
self._Log('CIRCULAR\n')
|
||||||
continue
|
continue
|
||||||
elif self._TestReplacement(path, lines, inc_i, sub_includes):
|
elif not missing and self._TestReplacement(path, lines, inc_i, sub_includes):
|
||||||
self._Log('OVERBROAD\n')
|
self._Log('OVERBROAD\n')
|
||||||
split.add(inc_path)
|
split.add(inc_path)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user