unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Linting, and how to get the information in to the Guix Data Serivce
@ 2019-05-06 18:26 Christopher Baines
  2019-05-06 19:10 ` Christopher Baines
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Baines @ 2019-05-06 18:26 UTC (permalink / raw)
  To: guix-devel


[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-18 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 18:26 Linting, and how to get the information in to the Guix Data Serivce Christopher Baines
2019-05-06 19:10 ` Christopher Baines
2019-05-07 21:16   ` Ludovic Courtès
2019-05-10  7:02     ` Christopher Baines
2019-05-18 10:30       ` Christopher Baines

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).