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 kGAnC9I4Y2FE8AAAgWs5BA (envelope-from ) for ; Sun, 10 Oct 2021 21:02:42 +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 sAv4BdI4Y2HIRgAA1q6Kng (envelope-from ) for ; Sun, 10 Oct 2021 19:02:42 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 3095A2E440 for ; Sun, 10 Oct 2021 21:02:41 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A5B3D26EFB; Sun, 10 Oct 2021 15:02:36 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 27B7526EE4 for ; Sun, 10 Oct 2021 15:02:33 -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 D02E91B0007F; Sun, 10 Oct 2021 22:02:30 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1633892550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lLnJVU3rqzyLpuGju98oNavj1m1eN9GpdC0iQwboksM=; b=kEEQKcSfVMfuDcX1pw9RFRr6Q6E4IOmhFu2jmwRRygHCcmHkNh+L95sLfS7JIn7uASefNt 2hoJSWHST121bmInRbk7CJ0uzOlo5338BtiYkDhlamhqPtHQ2pmuJc4mEyNKtq0QwTJUCP MK6Ug/62IMMG9sIgbuAunrlYFE0U+jURES1EHH6PxO6QVczTiw1tBjP059UpOj7ASGXtyj 2B7etrFLi3pXwGb0O1SBeZ+FcN8tteC+CRWxcISDXBFMsakOqM/jegC753tJE/i5P322jQ n3GK5lI0hzYN/yTQLWsom6QgET+3acoZqrIJk52E1q/iTg2eb615w4UlPAUJmg== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH v2] devel: script for checking a commit (series) In-Reply-To: <20211010115449.1238093-1-david@tethera.net> References: <20211010115449.1238093-1-david@tethera.net> User-Agent: Notmuch/0.33+54~gcaf4513 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1633892550; a=rsa-sha256; cv=none; b=HLGFWbCWXP8zeqgeEOiPsjuTijbbH4aXaMBY5zpF4mftaMlfHzEbrd6eGh7NWteF0Sqp78 Z6IZrntcl6C6HdcMHskrXqy2XIzDPvMX0Vb9AHyzuEANy6hfmcrlYO5P3o0jPSxhwSYnHF tzPtsX1ijCQovz/HieXBkAc//0HANLwGFCP/P2uUGCGu4U7DH82XNGjP5pfHHtns1pUYIV FWbpRQXyndFNN61CjEECz+HvMgtSG6rs9Ij7UotSgj3zqnUHTfsLhmBgRI6e0IrVRnQesA DVgQAkg6QhPpNjqti2nftdoLE/+qhk2g5xqa77kpW+/IrDOq2x6yYq0TRAyt0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1633892550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lLnJVU3rqzyLpuGju98oNavj1m1eN9GpdC0iQwboksM=; b=Mx/HgIys1gW1G4itr1nf6kFFMURjZ6si941MJB8ZxwzkAxCGZ/RJecOHKpF5wYLMsMNjpx S6+dwtKNeuEjWevOarxhes3Rvoyhcaomfp+OvoWhiRCC42QyyAs36Q6SZi29gwsm9Y+rha goMdvXCEwQGCftzpRjynH9un6gskAt8GPZhUQfd/JkD0h798Ja1BLQLhTnxIcn/F3+/3fB 2QZFwfdtc6ZAFLpT1aJ4cEe97rcOKZUY1/TJjO/lLdRh1/J4T8Hn7br+/DNwVXcgFgpy3I pW8NiOB7N+c7FKQHjKkp7QKRWUH3Bz5QlfuTGd38qzRQnU+1sJxhOHZVTVYRtg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi Message-ID-Hash: E7YYTPEQFGQ5LTVXXS7GO47BJ2W5CVHE X-Message-ID-Hash: E7YYTPEQFGQ5LTVXXS7GO47BJ2W5CVHE 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=1633892561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=kAB/shQ914j3Oa3rY2vdH1Eiot6R4EL2GvAx+nJLrG8=; b=dk3eyGCc7KUhk40G8vnMkys1Rs6bQcuyEivcVAPCdEF9y63GLu3k1nlEbnh2RpV1whfcJ9 p+KplWRADWHi4oN3R+up4e1QfCVh95U8XDL2O2qTQ7Ynx7oScnyodWxXtQpd9an5AMMkvp dNpaGb8ZjccCG45eJBVzfxH6WZVjGsMREwnjHV8DBOOSvTLd/TVSS5IpIh1zgAk8oKUlfg y63bA9Ofhb7HRBkhadNwzzrK/1N3pg2V9mjGmnTCQK6HiM5bGBovLPTUWbZFpjcSI+HSS8 ZjT8r/NLwOh9Jvk6ngir15AblL7LRw4wKf/F+qMRRtJmeR+vwks4oLqZPsVOBA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1633892561; a=rsa-sha256; cv=fail; b=X/T1RABowY7WkBnfjsPQ26VYA6wGQZSRBFFQdymmM7Jq11I8dtpANUb7/W/iF3fZu5YjS0 vDnPTny7542h47WJqxJcMLVLJ0d9yWNX5VblEvVUw+d78afbafE1Hbs6Gb6S+hdFdglEeU W+RvKIhFjzCB7mnqzuIlWawIYrL0smUst0myVAevhZLoDfOzrBjiOuLa9Fg/3i3Tx2AbP+ 8WBzb1F53C8pXOyraEBqiXZQ/EteXVTHJHuJ/wwjSJiyLbKWRVWQvhUcMfoiP5XEHr0OGL 9gjdBVh30oz88rbc+sPeKFVS7gegIZzTxXttRATDWgXlBCZArgzRwH/jLrB7KA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=kEEQKcSf; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.71 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=kEEQKcSf; 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 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3095A2E440 X-Spam-Score: 0.71 X-Migadu-Scanner: scn1.migadu.com X-TUID: L5pS5LtkFmZL On Sun, Oct 10 2021, David Bremner wrote: > '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 | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > create mode 100755 devel/check-notmuch-commit > > Changes since last round: > > ~ '--quick' argument to avoid expensive build/test > ~ use Tomi's trick to avoid multiple calls to dirname > ~ merge reindent-lisp into the main script. This eases development > (only one script to put in path) and reduces execs. > ~ include quoting fix for call to emacs > ~ add diff-filter option > > diff --git a/devel/check-notmuch-commit b/devel/check-notmuch-commit > new file mode 100755 > index 00000000..99ed229d > --- /dev/null > +++ b/devel/check-notmuch-commit > @@ -0,0 +1,32 @@ > +#!/bin/sh > + > +# Usage suggestion: > +# git rebase -i --exec devel/check-notmuch-commit origin/master > + > +set -e > + > +quick=0 > +case "$1" in > + -q|-Q|--quick) > + quick=1 > + ;; > +esac > + > +if [ $quick = 0 ]; then > + make test > +fi > + > +unset uconf > +for file in $(git diff --name-only --diff-filter=AM HEAD^); do > + case $file in > + *.c|*.h|*.cc|*.hh) > + uncrustify --replace -c "${uconf=$(dirname "$0")/uncrustify.cfg}" "$file" The above line does not have TAB, otherwise looks good to me. (there might be other tab/spaces inconsistencies, but this was local enough for me to notice ;/) Tomi > + ;; > + *.el) > + emacs -Q --batch "$file" --eval '(indent-region (point-min) (point-max) nil)' -f save-buffer > + ;; > + esac > +done > + > +git diff --quiet > + > -- > 2.33.0