all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Damien Cassou <damien@cassou.me>
To: 36208@debbugs.gnu.org
Subject: bug#36208: 26.2.50; Add tooling for commit message format checking
Date: Fri, 14 Jun 2019 18:47:29 +0200	[thread overview]
Message-ID: <87ftocyuzi.fsf@cassou.me> (raw)

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





             reply	other threads:[~2019-06-14 16:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 16:47 Damien Cassou [this message]
     [not found] ` <mailman.90.1560530885.10840.bug-gnu-emacs@gnu.org>
2019-06-17  7:39   ` bug#36208: 26.2.50; Add tooling for commit message format checking Alan Mackenzie
2019-06-17  7:46     ` Juanma Barranquero
2019-06-17 15:10       ` Noam Postavsky
2019-07-05  2:02 ` Noam Postavsky
2019-07-05 16:21 ` Basil L. Contovounesios

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=87ftocyuzi.fsf@cassou.me \
    --to=damien@cassou.me \
    --cc=36208@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.