all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: luangruo@yahoo.com, Eli Zaretskii <eliz@gnu.org>,
	iarchivedmywholelife@gmail.com, 68691@debbugs.gnu.org
Subject: bug#68691: 30.0.50; [WISHLIST] Make it easier to conform to desired commit message format
Date: Sun, 28 Jan 2024 10:43:02 +0200	[thread overview]
Message-ID: <86zfwpkfvt.fsf@mail.linkov.net> (raw)
In-Reply-To: <CADwFkmmkHz1DNpXq6vtAWKE8POEXs=CW8ZrYzgfxxO6EAKC8=g@mail.gmail.com> (Stefan Kangas's message of "Sat, 27 Jan 2024 23:21:47 -0800")

> or mark in red any line matching "^lisp/foo/bar.el" (which should be
> a mistake 99.9 % of the time).  Stuff like that.

There is already some linting in log-edit that could be extended further:

  (defconst log-edit-font-lock-gnu-keywords
      ;; Use
      ;;   * foo.el (bla, bli)
      ;;   (blo, blu): Toto.
      ;; Rather than
      ;;   * foo.el (bla, bli,
      ;;   blo, blu): Toto.
    '(("^[ \t]*\\(?:\\* .*\\)?\\(([^\n)]*,\\s-*\\)$"
       (1 '(face font-lock-warning-face
            help-echo "Continue function lists with \")\\n(\".") t))
      ;; Don't leave a lone word on a single line.
      ;;("^\\s-*\\(\\S-*[^\n:)]\\)\\s-*$" (1 font-lock-warning-face t))
      ;; Don't cut a sentence right after the first word (better to move
      ;; the sentence on the next line, then).
      ;;("[.:]\\s-+\\(\\sw+\\)\\s-*$" (1 font-lock-warning-face t))
      ;; Change Log entries should use present tense.
      ("):[ \t\n]*[[:alpha:]]+\\(ed\\)\\>"
       (1 '(face font-lock-warning-face help-echo "Use present tense.") t))
      ;; Change log entries start with a capital letter.
      ("): [a-z]" (0 '(face font-lock-warning-face help-echo "Capitalize.") t))
      ("[^[:upper:]]\\(\\. [[:upper:]]\\)"
       (1 '(face font-lock-warning-face
            help-echo "Use two spaces to end a sentence") t))
      ("^("
       (0 (let ((beg (max (point-min) (- (match-beginning 0) 2))))
            (put-text-property beg (match-end 0) 'font-lock-multiline t)
            (if (eq (char-syntax (char-after beg)) ?w)
                '(face font-lock-warning-face
                  help-echo "Punctuate previous line.")))
          t))
      ))





  parent reply	other threads:[~2024-01-28  8:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 17:20 bug#68691: 30.0.50; [WISHLIST] Make it easier to conform to desired commit message format No Wayman
2024-01-25 23:09 ` Stefan Kangas
2024-01-26  1:27   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-26 18:44     ` Jim Porter
2024-01-28  0:44     ` Stefan Kangas
2024-01-28  6:18       ` Eli Zaretskii
2024-01-28  7:21         ` Stefan Kangas
2024-01-28  7:33           ` Eli Zaretskii
2024-01-28  8:43           ` Juri Linkov [this message]
2024-01-26  7:18   ` Eli Zaretskii
2024-01-28  1:07     ` Stefan Kangas
2024-01-28  6:21       ` Eli Zaretskii
2024-01-28  7:26         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-28  7:42           ` Eli Zaretskii
2024-01-28  9:04             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-28  9:57               ` Eli Zaretskii

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=86zfwpkfvt.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=68691@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=iarchivedmywholelife@gmail.com \
    --cc=luangruo@yahoo.com \
    --cc=stefankangas@gmail.com \
    /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.