mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [RFC 4/4] ptxdist: add a 'lint' subcommand
Date: Thu, 22 Aug 2019 12:42:41 +0200	[thread overview]
Message-ID: <20190822104241.21777-4-rhi@pengutronix.de> (raw)
In-Reply-To: <20190822104241.21777-1-rhi@pengutronix.de>

Currently it only prints the list of unreferenced patch directories, but
the functionality could be expanded to other linting tasks as well.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 bin/ptxdist | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/bin/ptxdist b/bin/ptxdist
index d7bf4d5ffc5d..e9ecbf1cc3cf 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1774,6 +1774,22 @@ do_images()
 	ptxd_make_log images
 }
 
+
+
+#
+#
+#
+do_lint() {
+	local title;
+
+	check_premake_compiler &&
+	title="Unreferenced patch directories:\n" &&
+	ptxd_find_old_patchdirs | while read line; do
+		echo -e "${title}  - ${line}"
+		title=""
+	done
+}
+
 ##################################################################
 ################ normal option parser ############################
 ##################################################################
@@ -2011,6 +2027,10 @@ EOF
 			ptxd_make_log "${images[@]}"
 			exit
 			;;
+		lint)
+			do_lint
+			exit
+			;;
 		list-packages)
 			check_config &&
 			check_deps || return
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2019-08-22 10:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 10:42 [ptxdist] [RFC 1/4] patches/HEADER: remove apparently outdated and unreferenced file Roland Hieber
2019-08-22 10:42 ` [ptxdist] [RFC 2/4] Makefile.in: sort environment tools alphabetically Roland Hieber
2019-08-22 10:42 ` [ptxdist] [RFC 3/4] libptxdist: add a function to find unreferenced source directories Roland Hieber
2019-08-22 10:53   ` Roland Hieber
2019-08-22 12:43   ` Uwe Kleine-König
2019-08-22 15:38   ` Michael Olbrich
2019-08-23  8:33     ` Roland Hieber
2019-08-23  9:01       ` Alexander Dahl
2019-09-04 13:05         ` Michael Olbrich
2019-09-04 13:16           ` Alexander Dahl
2019-09-09  6:23             ` Michael Olbrich
2019-09-09  7:46               ` Alexander Dahl
2019-09-09 20:33                 ` Ladislav Michl
2019-09-10  8:13                   ` Michael Olbrich
2019-08-22 10:42 ` Roland Hieber [this message]
2019-08-22 11:44 ` [ptxdist] [RFC 1/4] patches/HEADER: remove apparently outdated and unreferenced file Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822104241.21777-4-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox