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 <tim.bird@sony.com>
Link: https://lore.kernel.org/r/SA3PR13MB6372DB9F9F2C09F8A1E1B99BFD1A2@SA3PR13MB6372.namprd13.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bird, Tim 2024-04-30 17:58:13 +00:00 committed by Greg Kroah-Hartman
parent 82fecafead
commit 5015f8a5ce
1 changed files with 3 additions and 0 deletions

View File

@ -412,6 +412,9 @@ if __name__ == '__main__':
if parser.checked:
pc = int(100 * parser.spdx_valid / parser.checked)
sys.stderr.write('Files with SPDX: %12d %3d%%\n' %(parser.spdx_valid, pc))
missing = parser.checked - parser.spdx_valid
mpc = int(100 * missing / parser.checked)
sys.stderr.write('Files without SPDX:%12d %3d%%\n' %(missing, mpc))
sys.stderr.write('Files with errors: %12d\n' %parser.spdx_errors)
if ndirs:
sys.stderr.write('\n')