From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Roland Hieber Date: Thu, 22 Aug 2019 12:42:41 +0200 Message-Id: <20190822104241.21777-4-rhi@pengutronix.de> In-Reply-To: <20190822104241.21777-1-rhi@pengutronix.de> References: <20190822104241.21777-1-rhi@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [RFC 4/4] ptxdist: add a 'lint' subcommand List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Roland Hieber 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 --- 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