unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: guix-devel@gnu.org
Subject: Linting, and how to get the information in to the Guix Data Serivce
Date: Mon, 06 May 2019 19:26:10 +0100	[thread overview]
Message-ID: <875zqnjv7h.fsf@cbaines.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1850 bytes --]

Hey,

I'm still making progress with the Guix Data Serivce, I recently added
support for recording information about branches from the Commits
mailing list [1]. One reason why this is useful is that it gives some
context to the individual commits.

1: https://prototype-guix-data-service.cbaines.net/branches

But, I've also made some time to try to start working on linting. I've
had this in mind for a while, in terms of using the Guix Data Service to
tell what a set of patches do, detecting linting warnings that have been
introduced or removed would be really useful in my opinion.

I have actually looked at importing the linting warnings for all the
packages in the past, but the way the code works, by outputting the
linting warnings to a port doesn't make it easy to capture all the
information and store this away.

Another key issue is that I'd at least initially only want to run checks
that just relate to the contents of the Git repository, so nothing
network dependant, as the network dependant checks could change over
time, so they need a bit more thinking about.

So, I think for this use case it would be useful if the code in Guix
around linting:

 - Stored warnings as data, before outputting them

 - Was in two parts, the lint checkers, and then the guix lint script

 - Distinguished between lint checkers that use the network, and those
   that don't

I've never worked with this part of Guix before, and some of it is quite
complex, so I've started by attempting to do the first bit, storing
warnings as data before outputting them. I've attached a patch.

Personally, this seems to have worked out quite well. I think the lint
checkers often are simpler when they just return one or more
<lint-warning> records.

If anyone has any thoughts on this, the patch, or linting in general,
I'd love to hear them.

Thanks,

Chris


[-- Attachment #1.2: /home/chris/Projects/Guix/guix/0001-scripts-lint-Handle-warnings-with-a-record-type.patch --]
[-- Type: message/external-body, Size: 104 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

             reply	other threads:[~2019-05-06 18:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:26 Christopher Baines [this message]
2019-05-06 19:10 ` Linting, and how to get the information in to the Guix Data Serivce Christopher Baines
2019-05-07 21:16   ` Ludovic Courtès
2019-05-10  7:02     ` Christopher Baines
2019-05-18 10:30       ` Christopher Baines

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=875zqnjv7h.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=guix-devel@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).