[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linting, and how to get the information in to the Guix Data Serivce

From: Christopher Baines
Subject: Linting, and how to get the information in to the Guix Data Serivce
Date: Mon, 06 May 2019 19:26:10 +0100
User-agent: mu4e 1.2.0; emacs 26.2


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.


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.



<<< message/external-body; name="/home/chris/Projects/Guix/guix/0001-scripts-lint-Handle-warnings-with-a-record-type.patch"; access-type=local-file: Unrecognized >>>

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]