unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 59217@debbugs.gnu.org, jgart <jgart@dismail.de>,
	zimoun <zimon.toutoune@gmail.com>
Subject: [bug#59217] [PATCH] guix: lint: Improve message in linter warning.
Date: Wed, 22 Mar 2023 22:52:50 -0400	[thread overview]
Message-ID: <878rfofabh.fsf@gmail.com> (raw)
In-Reply-To: <871qlga3ci.fsf@systemreboot.net> (Arun Isaac's message of "Wed,  22 Mar 2023 21:22:21 +0000")

Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

> Hi Maxim,
>
>> Personally, I'd prefer not having explanations directly in the output of
>> Guix lint; it should be terse, as it's involved often and repeatedly.
>
> I see your point. But, perhaps there should at least be a
> link. Something like
>
> /home/arun/guix/gnu/packages/web.scm:8030:17: tissue@0.1.0: sentences in
> description should be followed by two spaces; possible infraction at 313
> (see
> https://guix.gnu.org/manual/en/html_node/guix-lint-errors.html#two-spaces
> for details)
>
> Or a lint error code that can be explained in detail in the manual:
>
> /home/arun/guix/gnu/packages/web.scm:8030:17: tissue@0.1.0: sentences in
> description should be followed by two spaces; possible infraction at 313
> (#12345)

I think I like the error code more; the link is too verbose to my taste,
and I prefer to stay outside of the browser as much as I can ;-).

It seems error codes that can be documented somewhere else are common
for linters (e.g., pylint).  It then also give some way to disable the
lint checks by annotating the source with e.g.

--8<---------------cut here---------------start------------->8---
;disable #12345
--8<---------------cut here---------------end--------------->8---

I'm not sure we'd want to do that, but that'd be an option for the
future if we had some documented codes for the checks.

> Or a --verbose flag that can enable longer explanations.

That's another interesting approach.  On the bad side, you'd probably
often run 'guix lint', then realize you needed --verbose, and have to
run it again (and it's slow).

> New users should not be baffled by error messages and should have some
> way of learning more without having to ask on the mailing list or do
> extensive research.

I agree there's merit to improving the situation!

-- 
Thanks,
Maxim




  reply	other threads:[~2023-03-23  2:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 15:09 [bug#59217] [PATCH] guix: lint: Improve message in linter warning jgart via Guix-patches via
     [not found] ` <handler.59217.B.166826577117982.ack@debbugs.gnu.org>
2022-11-12 15:15   ` [bug#59217] Acknowledgement ([PATCH] guix: lint: Improve message in linter warning.) jgart via Guix-patches via
2022-11-22 20:58     ` Arun Isaac
2022-11-23 10:13       ` zimoun
2022-11-23 12:52         ` Arun Isaac
2023-03-21 19:50           ` [bug#59217] [PATCH] guix: lint: Improve message in linter warning Maxim Cournoyer
2023-03-22 21:22             ` Arun Isaac
2023-03-23  2:52               ` Maxim Cournoyer [this message]
2023-03-22 21:37             ` jgart via Guix-patches via
2022-11-19 18:37 ` Ludovic Courtès

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=878rfofabh.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=59217@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    --cc=jgart@dismail.de \
    --cc=zimon.toutoune@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 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).