aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-09-01 14:10:53 +0100
committerChristopher Baines <mail@cbaines.net>2019-09-01 18:32:09 +0100
commit2bfd81ee1b9f1ee14d58938942409698dc40ece9 (patch)
tree246b8a6e41d0287c36945cb91e9f606119d085ea /guix-data-service
parent91a9ba43498ffcd6149854eaa6b071d8b16e4cf3 (diff)
downloaddata-service-2bfd81ee1b9f1ee14d58938942409698dc40ece9.tar
data-service-2bfd81ee1b9f1ee14d58938942409698dc40ece9.tar.gz
Add lint-checkers-for-revision to the lint-checker module
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/model/lint-checker.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/guix-data-service/model/lint-checker.scm b/guix-data-service/model/lint-checker.scm
index 501c28a..7ab7715 100644
--- a/guix-data-service/model/lint-checker.scm
+++ b/guix-data-service/model/lint-checker.scm
@@ -5,7 +5,8 @@
#:use-module (guix-data-service model utils)
#:export (lint-checkers->lint-checker-ids
lint-warning-count-by-lint-checker-for-revision
- insert-guix-revision-lint-checkers))
+ insert-guix-revision-lint-checkers
+ lint-checkers-for-revision))
(define (lint-checkers->lint-checker-ids conn lint-checkers-data)
(insert-missing-data-and-return-all-ids
@@ -56,3 +57,18 @@ ORDER BY count DESC")
guix-revision-id))
lint-checker-ids)
", "))))
+
+(define (lint-checkers-for-revision conn commit-hash)
+ (exec-query
+ conn
+ "
+SELECT name, description, network_dependent
+FROM lint_checkers
+WHERE id IN (
+ SELECT lint_checker_id
+ FROM guix_revision_lint_checkers
+ INNER JOIN guix_revisions
+ ON guix_revisions.id = guix_revision_lint_checkers.guix_revision_id
+ WHERE commit = $1
+)"
+ (list commit-hash)))