aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/lint-warning.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix-data-service/model/lint-warning.scm')
-rw-r--r--guix-data-service/model/lint-warning.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/guix-data-service/model/lint-warning.scm b/guix-data-service/model/lint-warning.scm
index 0b82a62..25678a8 100644
--- a/guix-data-service/model/lint-warning.scm
+++ b/guix-data-service/model/lint-warning.scm
@@ -59,13 +59,25 @@ INNER JOIN lint_warning_message_sets
INNER JOIN lint_warning_messages
ON lint_warning_messages.locale = 'en_US.utf8'
AND lint_warning_messages.id = ANY (lint_warning_message_sets.message_ids)
-WHERE lint_warnings.id IN (
+"
+ (if linters
+ (string-append
+ "INNER JOIN (VALUES "
+ (string-join
+ (map (lambda (lint-checker-name)
+ (simple-format
+ #f "($STR$~A$STR$)" lint-checker-name))
+ linters)
+ ",")
+ ") AS linters (name) ON lint_checkers.name = linters.name ")
+ "")
+"WHERE lint_warnings.id IN (
SELECT lint_warning_id
FROM guix_revision_lint_warnings
INNER JOIN guix_revisions ON guix_revision_id = guix_revisions.id
WHERE commit = $1
)"
- (if package-query
+(if package-query
" AND to_tsvector(packages.name) @@ plainto_tsquery($2)"
"")
(if message-query