Fix types for lint warnings data

This commit is contained in:
Christopher Baines 2025-11-05 08:35:18 +00:00
parent 9eb1fa079c
commit 0113843a72

View file

@ -135,14 +135,40 @@ INNER JOIN lint_warning_messages
ELSE 0
END DESC"))
(exec-query conn query `(,commit-hash
,locale
,@(if package-query
(list package-query)
'())
,@(if message-query
(list message-query)
'()))))
(map
(match-lambda
((lint_warning_id
lint_checker_name
translated_lint_checker_description
translated_lint_checker_description_locale
lint_checker_network_dependent
package_name
package_version
location_file
location_line
location_column_number
lint_warning_message
lint_warning_message_locale)
(list lint_warning_id
lint_checker_name
translated_lint_checker_description
translated_lint_checker_description_locale
(string=? "t" lint_checker_network_dependent)
package_name
package_version
location_file
(string->number location_line)
(string->number location_column_number)
lint_warning_message
lint_warning_message_locale)))
(exec-query conn query `(,commit-hash
,locale
,@(if package-query
(list package-query)
'())
,@(if message-query
(list message-query)
'())))))
(define* (select-lint-warnings-by-revision-package-name-and-version conn
commit-hash
@ -207,9 +233,24 @@ WHERE packages.id IN (
END DESC
")
(exec-query conn
query
(list commit-hash name version locale)))
(map
(match-lambda
((lint_warning_id
lint_checkers_name translated_lint_checker_description
lint_checkers_network_dependent
location_file location_line location_column_number
lint_warning_message)
(list lint_warning_id
lint_checkers_name
translated_lint_checker_description
(string=? "t" lint_checkers_network_dependent)
location_file
(string->number location_line)
(string->number location_column_number)
lint_warning_message)))
(exec-query conn
query
(list commit-hash name version locale))))
(define (any-translated-lint-warnings? lint-warnings-data locale)
(any