From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6HFXJnTa2WCJOgAAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 16:19:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mJQfInTa2WCtdQAA1q6Kng (envelope-from ) for ; Mon, 28 Jun 2021 14:19:32 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0907DC5A2 for ; Mon, 28 Jun 2021 16:19:32 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3DE47290C6; Mon, 28 Jun 2021 10:19:28 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 600A029033 for ; Mon, 28 Jun 2021 10:19:25 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id ECE981B000A4; Mon, 28 Jun 2021 17:19:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1624889962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IO6W+W7JrUm2GqML6hkgJaEleiKGNIwQZOXlaOLXF80=; b=tqWABOZ7hl7K2JKD8Aiv0j5Pq7lMwHxizVSukbdJjtS27wQyshbj9m/n6ERt0aFMwHmTmQ 8ZU/ygKjVv8EJs+gzcTDUAZneBP5dhL0tfclHo4S7pf8tmwv1IQ1wY6bR482vfMUVHKJT5 7ndoCZ7oj3RefNc8A+Ino4Mm070desjA0Gzuwqe3ZFtOyh44Y0OvcfAr4CB/wRQg2/xc3A v3fYigdULzqQbJ0RIPytD680BJam5+clM1IkCurhgGDQFewEO2B8AysnLBKo39jrJPKTBL iYR5KmrC8uD7yt5XHLcH/+0yFK5r8lB06suFO+52rvy89GYttMzQ95KosNtCAw== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Cc: David Bremner Subject: Re: [PATCH] devel: two scripts for checking proposed changes In-Reply-To: <20210628140810.1842069-1-david@tethera.net> References: <20210628140810.1842069-1-david@tethera.net> User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1624889962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IO6W+W7JrUm2GqML6hkgJaEleiKGNIwQZOXlaOLXF80=; b=LE4rvsV5uKmSboZ2sasLeQZakdPUX9jLPZbmavfwcxpLQ7Yq/RRbmLMalTSvfjFv0qtE+y MHoH23G2SEp5L7ggRKTm7Xf1jkNWykK93rNYUE0gidO8R9+UUzc+6MnUJKjcmad2DeMNQv OMSoYsEQoAPGVDeYwi0NAVgy2jCY2ZGMvJdV4JSfU9+GXMpn7ebkTNWWwJC56Vu427EzHx h4rBHtrpFNQRJ801Px7jsVgfM9rfW3kvgh1PZD/DoZDtCTfr3C1FkPfv6kAy1+kpLe/iUl d0M4LommYhSJwsxsn9Gh/IsTxO0LZzcEgLaDKQKaPFZic5esDmj8x8t9ETKMag== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1624889962; a=rsa-sha256; cv=none; b=P2SOL92FEaLEHSGlrRLYw5q+xPXhDnbGwmxEohQOX9sP72yC0fzlh9EgvPR961d5fU+QsO 4FubDAYWivHUKVyjLPlbS5AUO2kbJtVDqM1+Tqzf95q51zDvZ7NkF3oNzeHxTC+SnmOp0o dyHKOqyCA7eB9uZUF9MvYrZ7u6chsRVfhTsJrxThwLLHFufzoJZQHWUwEwkTsmPWvT4wGg 8b3lGN4ReZymPlMF8xQhNRLxhLEUrKMxT3Xf5Uz72X9KOdwlu1AfZHbNQBwdxj4bT72YZ4 dfpHgDxI3d7+YmvoNW8ManCRrTzKeoityMbRFaKNqV4USN97QMpVu9qp99wJtg== Message-ID-Hash: 7IG4JEH2B5NG4XBYDONNIBT573I6IV5Z X-Message-ID-Hash: 7IG4JEH2B5NG4XBYDONNIBT573I6IV5Z X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624889972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9Mr12XMHTMW/sjh6g35U4WKajs2vCn3iygQsOWgSWPo=; b=lYm/1sT+BfH+SLkzCLVgfFWo3UfAnzU4lbJN4bXJm5nELeXSyKvfh38A3YeeKAoYP0Vysa fihztfQtgHtUcz9wkttZbdu12Xtp4nGRjo4Xe/x0dTgzdl03fOOZXETK3Lmaj3MfupPCDL i6dSHI3n8+mbeBMjqerQjmdBvDLuzyiw44UUug2HavqFIaktUWXagrVA1i4K/pqwsTxA7b M1yD3lzq9TEt7AyVlk9UTeR8x7k4/g1R7OBGy/Wl7sPYH8Tn6JzI2lFB/jhz3K+OZ2o8VF ixmpd8e4SwLYs630Ed0GWC1L7vM1QxapsUAMRVZlokq2mIpnRsVWPakKOCH3jg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1624889972; a=rsa-sha256; cv=fail; b=LMjv2I95mt/l1yywOSRC7563xXO9dV1/xGmYHBv1bbWpqyDcJFJTUh+OXzPOnfFznLVjvR wCERvut5I/IEK3nrt+fXU9bZr93xR+Jw8rAtsPcxXt5UtKsunnGYnB9HsjpxZIAMU8Y8Yz GP1w6Nhw/TSIcQkxh2ZJsMj4seHCK5yIEvVo/2hasgWU+nha8qWLdPhwRjiumlbhTb0NLG GivrbGCDXr8tYioD1IgJWXKHhhtGOMJ+Ep4d9AnstUkuaq6V+kBP6h+syyL4c5M76oiRnY DdTq2IgiBF3BFDr8YM30AaFjNq1hBAc31PHP7ox2IWO9keCEyEaZRSxK078wpg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=tqWABOZ7; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=tqWABOZ7; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0907DC5A2 X-Spam-Score: 0.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: CpvdZMJ0SrJn On Mon, Jun 28 2021, David Bremner wrote: > It took me a bit of effort to get the correct oneliner to reindent > elisp from the command line, so I saved the results as > 'reindent-elisp'. > > 'check-notmuch-commit' is an updated version of a script I have been > using (although not always as consistently as I should) before sending > patches to the list. > > Although it requires a bit more tooling, encouraging people to use > check-notmuch-commit might reduce the number of round trips to the > list for style nitpicks. > --- > devel/check-notmuch-commit | 20 ++++++++++++++++++++ > devel/reindent-elisp | 8 ++++++++ > 2 files changed, 28 insertions(+) > create mode 100755 devel/check-notmuch-commit > create mode 100755 devel/reindent-elisp > > diff --git a/devel/check-notmuch-commit b/devel/check-notmuch-commit > new file mode 100755 > index 00000000..98a19a64 > --- /dev/null > +++ b/devel/check-notmuch-commit > @@ -0,0 +1,20 @@ > +#!/bin/sh > + > +# Usage suggestion: > +# git rebase -i --exec devel/check-notmuch-commit origin/master > + > +set -e > +make test This may fail miserably (or is painfully slow (doing configure and make...) > +for file in $(git diff --name-only HEAD^); do is this also mentioning deleted files... ? (--diff-filter=AM) ? > + case $file in > + *.c|*.h|*.cc|*.hh) > + uncrustify --replace -c $(dirname "$0")/uncrustify.cfg "$file" dirname "$0" could be resolved once before loop. > + ;; > + *.el) > + $(dirname "$0")/reindent-elisp "$file" > + ;; > + esac > +done > + > +git diff --quiet > + > diff --git a/devel/reindent-elisp b/devel/reindent-elisp > new file mode 100755 > index 00000000..f6ce3844 > --- /dev/null > +++ b/devel/reindent-elisp > @@ -0,0 +1,8 @@ > +#!/bin/sh > + > +if [ $# -lt 1 ]; then if [ $# -ne 1 ] ... (see at the end) > + printf "usage: $0 \n" Angle brackets are bad in example -- if copy-pasted to terminal (and badly edited) does redirections... > + exit 1 > +fi > + > +emacs -Q --batch $1 --eval '(indent-region (point-min) (point-max) nil)' > -f save-buffer ... as here is $1 -- which should be quoted as "$1" > -- > 2.30.2