summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBird, Tim <Tim.Bird@sony.com>2024-04-30 20:58:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-04 20:00:54 +0300
commit5015f8a5ced7039de354c1103b0912f5a64fab03 (patch)
tree93024b25d839e5d1d9b86b0ac539d2c2f2c027ab /scripts
parent82fecafeadd4428ddac0afddf27cd28d6019b35f (diff)
downloadlinux-5015f8a5ced7039de354c1103b0912f5a64fab03.tar.xz
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/spdxcheck.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
index 18cb9f5b3d3d..8b8fb115fc81 100755
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -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')