[dpdk-dev] [PATCH] devtools: add SPDX license tag check script
Stephen Hemminger
stephen at networkplumber.org
Fri Nov 8 18:23:43 CET 2019
Simple script to look for missing SPDX license tags
with exceptions for certain directories and file types.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
devtools/spdx-check.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100755 devtools/spdx-check.sh
diff --git a/devtools/spdx-check.sh b/devtools/spdx-check.sh
new file mode 100755
index 000000000000..4427398411f6
--- /dev/null
+++ b/devtools/spdx-check.sh
@@ -0,0 +1,22 @@
+#! /bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2019 Microsoft Corporation
+#
+# Produce a list of files without SPDX license identifiers
+
+echo "Files without SPDX License"
+echo "--------------------------"
+
+git grep -L SPDX-License-Identifier -- \
+ ':^.git*' ':^.ci/*' ':^.travis.yml' \
+ ':^README' ':^MAINTAINERS' ':^VERSION' \
+ ':^*/Kbuild' ':^*/README' \
+ ':^license/' ':^doc/' ':^config/' ':^buildtools/' \
+ ':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt'
+
+echo
+echo "Files with redundant BSD boilerplate"
+echo "------------------------------------"
+
+git grep -l SPDX-License-Identifier | \
+ xargs grep -l 'Redistribution'
--
2.20.1
More information about the dev
mailing list