* [PATCH] scripts/spdxcheck: Add count of missing files to stats output
@ 2024-04-30 17:58 Bird, Tim
0 siblings, 0 replies; only message in thread
From: Bird, Tim @ 2024-04-30 17:58 UTC (permalink / raw)
To: tglx, Greg KroahHartman; +Cc: linux-spdx, linux-kernel
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>
---
scripts/spdxcheck.py | 3 +++
1 file changed, 3 insertions(+)
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')
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-30 17:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30 17:58 [PATCH] scripts/spdxcheck: Add count of missing files to stats output Bird, Tim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).