summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-06-02 08:35:17 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-06-02 08:35:19 +0200
commit0eeec6396c1638f6331e0d146f31f5d0c4bd32c6 (patch)
tree9734411c7746e4bb689caba44e830efacb6ddd9c
parent537d80ce19c420b24290f5e0088d157f2277c376 (diff)
downloadptxdist-0eeec6396c1638f6331e0d146f31f5d0c4bd32c6.tar.gz
ptxdist-0eeec6396c1638f6331e0d146f31f5d0c4bd32c6.tar.xz
ptxd_make_world_lint: add check for obsolete 'CREDITS' comment
This comment was removed in ptxdist some time ago. It still shows up in new contributions. This happens for packages that where created with older ptxdist versions. So add a lint check to detect this earlier. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_world_lint.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_world_lint.sh b/scripts/lib/ptxd_make_world_lint.sh
index 3d0e20213..410cb2747 100644
--- a/scripts/lib/ptxd_make_world_lint.sh
+++ b/scripts/lib/ptxd_make_world_lint.sh
@@ -182,6 +182,22 @@ ptxd_make_world_lint_autogen() {
export -f ptxd_make_world_lint_autogen
PTXDIST_LINT_COMMANDS="${PTXDIST_LINT_COMMANDS} autogen"
+ptxd_make_world_lint_credits() {
+ local filefd file
+
+ echo "Checking for obsolte 'See CREDITS for details about who has contributed to this project.' comment ..."
+
+ exec {filefd}< <(ptxd_make_world_lint_makefiles)
+ while read file <&${filefd}; do
+ if grep -q "See CREDITS for details about who has contributed to this project\." "${file}"; then
+ ptxd_lint_error "'$(ptxd_print_path "${file}")' contains obsolete 'CREDITS' comment."
+ fi
+ done < "${ptx_dgen_rulesfiles_make}"
+ exec {filefd}<&-
+}
+export -f ptxd_make_world_lint_credits
+PTXDIST_LINT_COMMANDS="${PTXDIST_LINT_COMMANDS} credits"
+
ptxd_make_world_lint() {
local command