[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220516102615.477393627@linutronix.de>
Date: Mon, 16 May 2022 12:27:22 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-spdx@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christoph Hellwig <hch@....de>
Subject: [patch 1/9] scripts/spdxcheck: Add percentage to statistics
Files checked: 75856
Lines checked: 294516
Files with SPDX: 59410 78%
Files with errors: 0
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
scripts/spdxcheck.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -285,7 +285,9 @@ import os
sys.stderr.write('\n')
sys.stderr.write('Files checked: %12d\n' %parser.checked)
sys.stderr.write('Lines checked: %12d\n' %parser.lines_checked)
- sys.stderr.write('Files with SPDX: %12d\n' %parser.spdx_valid)
+ if parser.checked:
+ pc = int(100 * parser.spdx_valid / parser.checked)
+ sys.stderr.write('Files with SPDX: %12d %3d%%\n' %(parser.spdx_valid, pc))
sys.stderr.write('Files with errors: %12d\n' %parser.spdx_errors)
sys.exit(0)
Powered by blists - more mailing lists