From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#36208: 26.2.50; Add tooling for commit message format checking Date: Fri, 14 Jun 2019 18:47:29 +0200 Message-ID: <87ftocyuzi.fsf@cassou.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="155811"; mail-complaints-to="usenet@blaine.gmane.org" To: 36208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 14 19:13:47 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbpln-000eMI-81 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 19:13:43 +0200 Original-Received: from localhost ([::1]:53666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbplm-0001qo-6V for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2019 13:13:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47678) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbpMx-0001tS-8u for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:48:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbpMw-000614-4J for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52379) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbpMv-00060s-W8 for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hbpMv-00036W-RA for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jun 2019 16:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36208 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156053086111902 (code B ref -1); Fri, 14 Jun 2019 16:48:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jun 2019 16:47:41 +0000 Original-Received: from localhost ([127.0.0.1]:37690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbpMb-00035u-3d for submit@debbugs.gnu.org; Fri, 14 Jun 2019 12:47:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbpMZ-00035m-6h for submit@debbugs.gnu.org; Fri, 14 Jun 2019 12:47:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47540) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbpMX-0001V2-Qs for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbpMW-0005hI-Jg for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:47:37 -0400 Original-Received: from mail.choca.pics ([2001:bc8:20ab::1]:60596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbpMW-0005ev-DP for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2019 12:47:36 -0400 Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id E03E0F1A866 for ; Fri, 14 Jun 2019 18:47:31 +0200 (CEST) Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id c8mRVQtYQAMG for ; Fri, 14 Jun 2019 18:47:31 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 34789F1ACD2 for ; Fri, 14 Jun 2019 18:47:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id CTusVIOo8Dth for ; Fri, 14 Jun 2019 18:47:31 +0200 (CEST) Original-Received: from luz4 (92.116.5.93.rev.sfr.net [93.5.116.92]) by mail.choca.pics (Postfix) with ESMTPSA id EFDD2F1A866 for ; Fri, 14 Jun 2019 18:47:30 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160564 Archived-At: Hi writing commit messages that comply with Emacs' guidelines requires a good understanding of many details described in CONTRIBUTE. To reduce the workload of new contributors and of reviewers, part of these guidelines could be transformed into tools. Here are some of the checks that humans have to do these days: 1. dots after every sentence (even just "New function" must terminate with a dot) 2. double-space after dots ending sentences 3. no indentation (M-q adds 2 spaces which we don't want) 4. line length 5. the Copyright-paperwork-exempt token 6. every single change is documented 7. no colon if another function of the same file has the same comment I can imagine several tools: - a major mode for editing commit messages: - for check 2., sentence-end-double-space could be set to t - for check 3., I guess another variable could be set - for check 4., setting fill-column - for check 5., a shortcut could help adding such tokens - for check 6., a shortcut (beyond `C' which triggers `magit-commit-add-log-insert') could add a template with all the changes - a flymake backend to mark problems: - for checks 1., 3., 4., and 7., I believe it's obvious - for check 2., words ending with a dot and just one space (with a whitelist to avoid false positives such as "etc." and "aka.") - a patch checker (e.g., `./check_patch.sh *.patch`): - could check the same as the flymake backend and also checks 5 and 6. Best, -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill