Lines Matching +full:external +full:- +full:contents
2 # -*- coding: utf-8 -*-
4 #-------------------------------------------------------------------------
6 # --------------------------------------
14 # http://www.apache.org/licenses/LICENSE-2.0
22 #-------------------------------------------------------------------------
24 # Check that the input file has no external include guards.
35 output = git('diff', '--cached', '--name-only', '-z', '--diff-filter='+filter)
36 return output.split('\0')[:-1] # remove trailing ''
40 head = git('rev-parse', '--verify', 'HEAD', stderr=None)
57 if msg[-1] != '\n':
62 allownonascii = git('config', '--get', '--bool', 'hooks.allownonascii')
73 croak(path, 0, "Non-ASCII file name")
77 git('diff-index', '--check', '--cached', against, stderr=None)
89 contents = infile.read()
90 for m in guard_re.finditer(contents):
91 lineno = 1 + contents[:m.start()].count('\n')
92 croak(infile.name, lineno, "External include guard")