unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriel Wicki <gabriel@erlikon.ch>
To: 74459@debbugs.gnu.org
Subject: [bug#74459] [PATCH 4/8] guix: lint: Allow texinfo markup at beginning of synopsis.
Date: Thu, 21 Nov 2024 13:46:15 +0100	[thread overview]
Message-ID: <kz6wumbn5qkz47v3grpiqfedfy42wh74hbq2kai6rms4qyqd4p@lprr2xhllsho> (raw)
In-Reply-To: <po7r7oijub2gkqzxwkgm76cprdnm3yvy4lsnwjbl4tven5zkxy@riur6kp7ldps>

* guix/lint.scm(check-synopsis-style)[check-proper-start]: Add condition.
* tests/lint.scm: Add test case.

Change-Id: I2509b3a4e7e51c6a274697ceb5f776c22e27c5f9
---
 guix/lint.scm  | 3 ++-
 tests/lint.scm | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index 4ea02a7faa..9fa22c92cc 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -740,7 +740,8 @@ (define (check-synopsis-style package)
         '()))
 
   (define (check-proper-start synopsis)
-    (if (properly-starts-sentence? synopsis)
+    (if (or (properly-starts-sentence? synopsis)
+            (starts-with-texinfo-markup? synopsis))
         '()
         (list
          (make-warning package
diff --git a/tests/lint.scm b/tests/lint.scm
index df7042c470..6631034151 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -307,6 +307,12 @@ (define (warning-contains? str warnings)
       (check-synopsis-style pkg)))
    string<?))
 
+(test-equal "synopsis: starts with texinfo markup"
+  '()
+  (let ((pkg (dummy-package "x"
+                            (synopsis "@code{help}"))))
+    (check-synopsis-style pkg)))
+
 (test-equal "synopsis: too long"
   "synopsis should be less than 80 characters long"
   (single-lint-warning-message
-- 
2.46.0





  parent reply	other threads:[~2024-11-21 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 12:40 [bug#74459] [PATCH 0/8] Linter improvements (eliminate false positives)^[ Gabriel Wicki
2024-11-21 12:43 ` [bug#74459] [PATCH 1/8] guix: lint: Fix indentation Gabriel Wicki
2024-11-21 12:44 ` [bug#74459] [PATCH 2/8] guix: lint: Refine description start check logic Gabriel Wicki
2024-11-21 12:45 ` [bug#74459] [PATCH 3/8] guix: lint: Allow texinfo markup at beginning of description Gabriel Wicki
2024-11-21 12:46 ` Gabriel Wicki [this message]
2024-11-21 12:47 ` [bug#74459] [PATCH 5/8] guix: lint: Prevent false positives in description typo check Gabriel Wicki
2024-11-21 12:48 ` [bug#74459] [PATCH 6/8] guix: lint: Ignore initials from double space check Gabriel Wicki
2024-11-21 12:49 ` [bug#74459] [PATCH 7/8] guix: lint: More abbreviations Gabriel Wicki
2024-11-21 22:25 ` [bug#74459] comments Gabriel Wicki

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kz6wumbn5qkz47v3grpiqfedfy42wh74hbq2kai6rms4qyqd4p@lprr2xhllsho \
    --to=gabriel@erlikon.ch \
    --cc=74459@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).