Lines Matching +full:sub +full:- +full:parts

2 # SPDX-License-Identifier: GPL-2.0
63 for l in open(el.path, encoding="utf-8").readlines():
64 if l.startswith('Valid-License-Identifier:'):
71 elif l.startswith('SPDX-Exception-Identifier:'):
75 elif l.startswith('SPDX-Licenses:'):
81 elif l.startswith("License-Text:"):
84 … raise SPDXException(el, 'Exception %s is missing SPDX-Licenses' %exception)
114 self.dirdepth = -1
124 parts = bdir.split('/')
126 parts = []
127 self.dirdepth = dirdepth + len(parts)
157 r'[A-Za-z.0-9\-+]+'
208 if line.find("SPDX-License-Identifier:") < 0:
215 if line.strip().endswith('-->'):
216 expr = expr.rstrip('-->').strip()
244 if fname == '-':
249 parts = base.split('/')
252 while i < self.dirdepth and i < len(parts) and len(parts[i]):
253 base += '/' + parts[i]
272 self.pattern = line[:-1]
331 …t('path', nargs='*', help='Check path or file. If not given full git tree scan. For stdin use "-"')
332 ap.add_argument('-d', '--dirs', action='store_true',
333 help='Show [sub]directory statistics.')
334 ap.add_argument('-D', '--depth', type=int, default=-1,
335 help='Directory depth for -d statistics. Default: unlimited')
336 ap.add_argument('-e', '--exclude',
338 ap.add_argument('-f', '--files', action='store_true',
340 ap.add_argument('-m', '--maxlines', type=int, default=15,
342 ap.add_argument('-v', '--verbose', action='store_true', help='Verbose statistics output')
346 if '-' in args.path and len(args.path) > 1:
347 sys.stderr.write('stdin input "-" must be the only path argument\n')
383 if len(args.path) and args.path[0] == '-':
385 parser.parse_lines(stdin, args.maxlines, '-')
421 missing = parser.checked - parser.spdx_valid
438 valid = di.total - di.missing
440 sys.stderr.write(' %-80s: %5d of %5d %3d%%\n' %(f, valid, di.total, pc))