Skip to content

Commit 5015f8a

Browse files
tbird20dgregkh
authored andcommitted
scripts/spdxcheck: Add count of missing files to stats output
Add a count of files missing an SPDX header to the stats output. This is useful detailed information for working on SPDX header additions. Signed-off-by: Tim Bird <[email protected]> Link: https://lore.kernel.org/r/SA3PR13MB6372DB9F9F2C09F8A1E1B99BFD1A2@SA3PR13MB6372.namprd13.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 82fecaf commit 5015f8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/spdxcheck.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ def read_exclude_file(fname):
412412
if parser.checked:
413413
pc = int(100 * parser.spdx_valid / parser.checked)
414414
sys.stderr.write('Files with SPDX: %12d %3d%%\n' %(parser.spdx_valid, pc))
415+
missing = parser.checked - parser.spdx_valid
416+
mpc = int(100 * missing / parser.checked)
417+
sys.stderr.write('Files without SPDX:%12d %3d%%\n' %(missing, mpc))
415418
sys.stderr.write('Files with errors: %12d\n' %parser.spdx_errors)
416419
if ndirs:
417420
sys.stderr.write('\n')

0 commit comments

Comments
 (0)