Lines Matching +full:no +full:- +full:pc +full:- +full:write

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)
105 # Initialize the parser. No debug file and no parser rules stored on disk
114 self.dirdepth = -1
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()
233 sys.stdout.write('%s: %d:%d %s: %s\n' %(fname, self.curline, col, pe.txt, tok))
235 sys.stdout.write('%s: %d:0 %s\n' %(fname, self.curline, pe.txt))
238 if fname == '-':
266 self.pattern = line[:-1]
325 …t('path', nargs='*', help='Check path or file. If not given full git tree scan. For stdin use "-"')
326 ap.add_argument('-d', '--dirs', action='store_true',
328 ap.add_argument('-D', '--depth', type=int, default=-1,
329 help='Directory depth for -d statistics. Default: unlimited')
330 ap.add_argument('-e', '--exclude',
332 ap.add_argument('-f', '--files', action='store_true',
334 ap.add_argument('-m', '--maxlines', type=int, default=15,
336 ap.add_argument('-v', '--verbose', action='store_true', help='Verbose statistics output')
340 if '-' in args.path and len(args.path) > 1:
341 sys.stderr.write('stdin input "-" must be the only path argument\n')
357 sys.stderr.write('%s: %s\n' %(se.el.path, se.txt))
359 sys.stderr.write('%s\n' %se.txt)
363 sys.stderr.write('FAIL: %s\n' %ex)
364 sys.stderr.write('%s\n' %traceback.format_exc())
373 sys.stderr.write('FAIL: Reading exclude file %s: %s\n' %(fname, ex))
377 if len(args.path) and args.path[0] == '-':
379 parser.parse_lines(stdin, args.maxlines, '-')
389 sys.stderr.write('path %s does not exist\n' %p)
403 sys.stderr.write('\n')
404 sys.stderr.write('License files: %12d\n' %spdx.license_files)
405 sys.stderr.write('Exception files: %12d\n' %spdx.exception_files)
406 sys.stderr.write('License IDs %12d\n' %len(spdx.licenses))
407 sys.stderr.write('Exception IDs %12d\n' %len(spdx.exceptions))
408 sys.stderr.write('\n')
409 sys.stderr.write('Files excluded: %12d\n' %parser.excluded)
410 sys.stderr.write('Files checked: %12d\n' %parser.checked)
411 sys.stderr.write('Lines checked: %12d\n' %parser.lines_checked)
413 pc = int(100 * parser.spdx_valid / parser.checked) variable
414 sys.stderr.write('Files with SPDX: %12d %3d%%\n' %(parser.spdx_valid, pc))
415 sys.stderr.write('Files with errors: %12d\n' %parser.spdx_errors)
417 sys.stderr.write('\n')
418 sys.stderr.write('Directories accounted: %8d\n' %ndirs)
419 pc = int(100 * dirsok / ndirs) variable
420 sys.stderr.write('Directories complete: %8d %3d%%\n' %(dirsok, pc))
424 sys.stderr.write('\n')
425 sys.stderr.write('Incomplete directories: SPDX in Files\n')
429 valid = di.total - di.missing
430 pc = int(100 * valid / di.total) variable
431 sys.stderr.write(' %-80s: %5d of %5d %3d%%\n' %(f, valid, di.total, pc))
435 sys.stderr.write('\n')
436 sys.stderr.write('Files without SPDX:\n')
440 sys.stderr.write(' %s\n' %f)
445 sys.stderr.write('FAIL: %s\n' %ex)
446 sys.stderr.write('%s\n' %traceback.format_exc())