guix-commits
[Top][All Lists]
Advanced

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

01/04: lint: Add a requires-store? field to the checker record.


From: guix-commits
Subject: 01/04: lint: Add a requires-store? field to the checker record.
Date: Tue, 24 Mar 2020 15:47:55 -0400 (EDT)

cbaines pushed a commit to branch master
in repository guix.

commit 3874dc5ef2e0d301dc708bf433e13362e0759a0a
Author: Christopher Baines <address@hidden>
AuthorDate: Sun Mar 15 18:48:01 2020 +0000

    lint: Add a requires-store? field to the checker record.
    
    This can then be used to mark checkers that require a store connection, 
which
    will enable passing a connection in, avoiding the overhead of establishing a
    connection inside the check function when it's run for lots of different
    packages.
    
    * guix/lint.scm (<lint-checker>): Add requires-store? to the record type.
---
 guix/lint.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index 40bddd0..a324858 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -100,7 +100,8 @@
             lint-checker?
             lint-checker-name
             lint-checker-description
-            lint-checker-check))
+            lint-checker-check
+            lint-checker-requires-store?))
 
 
 ;;;
@@ -155,7 +156,9 @@
   ;; 'certainty' level.
   (name        lint-checker-name)
   (description lint-checker-description)
-  (check       lint-checker-check))
+  (check       lint-checker-check)
+  (requires-store? lint-checker-requires-store?
+                   (default #f)))
 
 (define (properly-starts-sentence? s)
   (string-match "^[(\"'`[:upper:][:digit:]]" s))



reply via email to

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