diff options
author | Christopher Baines <mail@cbaines.net> | 2019-09-01 14:11:50 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-09-01 18:32:09 +0100 |
commit | be25e487f1e97ec2e6e706c2864323e4b6ed6a22 (patch) | |
tree | f10ba76e293483a8c347f2b0f1f9f2d808ef2529 /guix-data-service/model/lint-warning.scm | |
parent | 2bfd81ee1b9f1ee14d58938942409698dc40ece9 (diff) | |
download | data-service-be25e487f1e97ec2e6e706c2864323e4b6ed6a22.tar data-service-be25e487f1e97ec2e6e706c2864323e4b6ed6a22.tar.gz |
Support filtering lint warnings by linter
Diffstat (limited to 'guix-data-service/model/lint-warning.scm')
-rw-r--r-- | guix-data-service/model/lint-warning.scm | 16 |
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 |