From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <875zqnjv7h.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNiJe-0006iu-5H for guix-devel@gnu.org; Mon, 06 May 2019 14:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNiJc-0005av-OC for guix-devel@gnu.org; Mon, 06 May 2019 14:26:18 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:44024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNiJc-0005ZT-En for guix-devel@gnu.org; Mon, 06 May 2019 14:26:16 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 9D4C016FA4 for ; Mon, 6 May 2019 19:26:12 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 6486d6d4 for ; Mon, 6 May 2019 18:26:12 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain 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 records. If anyone has any thoughts on this, the patch, or linting in general, I'd love to hear them. Thanks, Chris --=-=-= Content-Type: message/external-body; name="/home/chris/Projects/Guix/guix/0001-scripts-lint-Handle-warnings-with-a-record-type.patch"; access-type=local-file Content-Type: text/x-patch Content-ID: <874l67jv7h.fsf@cbaines.net> Content-Transfer-Encoding: binary --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlzQfEJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeZKRAAhGKSpBH4ZPxobcjfGnhXLFroMRgXPocop126OA9ZpcyInvlmiyeAZu8B uiKORt0jEjnu+HtIoF6x8bEt5lnc8x/VTPkHrVwjnwexZJAvM7FQ5RTuyWldQd7D 6FzKl2faSv8POnDrdnhfElm6QKKBYi61hOr1nG6MFs1wkiOInhq4+B6nKky1YMRD 90u71E95V5n069NhADn+U4zpyMdJooyDOC/GiIwRFJdc56bfr4bfmW0AP7H2dHI/ 2YVtK3gR6mzlBcCnGA5PIVAxFEyiLmLPeIcrjMVgiEqtJoAqyHluq2LaB/AwxiMs vGPdqZVZhE+cGplEqMF3hPB2XD9UDgY6qLWo+sx9TAQpMZHUKaAkrU9oNr0nTHXB SQq6ELhL2D5C3Yc/GGSlXkXEU9peOjwRnVk/hqd8mU0egn9Rz677Am4CSqIzMXBh 6M5/SkErONbfd0zxnSTI1b2CYJugv03ZQMBOr41SMy4MvtiLfSJoWKb6wtjdBhid d6PZ0d6/xnau4wvSy8SU7kcH2QJzoXFDnebj/hbox1AEVdn4JMBK3zAnUWX2iOYc kreftQS4o2d1mv1Sk/2HYqT1xZi4kSyywEizK9eFHwoLGjL9HRJw5nEodQPutenJ 8BHWmbHTh6WSB8HTW6hxkYJnQIBPH02a/av4R9fOlQWVyruT2kk= =3ti3 -----END PGP SIGNATURE----- --==-=-=--