diff options
author | Christopher Baines <mail@cbaines.net> | 2022-08-22 17:42:37 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-08-22 17:42:37 +0100 |
commit | 1043b51bff6beb8760f33489890ac972e95a15b1 (patch) | |
tree | 4b3151aa4a9ed6fcda98f1c3771fb96b1343456e /guix-data-service | |
parent | ee73d2cc9857533020535eb8e1ad856e04fb5152 (diff) | |
download | data-service-1043b51bff6beb8760f33489890ac972e95a15b1.tar data-service-1043b51bff6beb8760f33489890ac972e95a15b1.tar.gz |
Include lint warnings in the JSON /compare response
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/web/compare/controller.scm | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/guix-data-service/web/compare/controller.scm b/guix-data-service/web/compare/controller.scm index bbc9829..b0ae639 100644 --- a/guix-data-service/web/compare/controller.scm +++ b/guix-data-service/web/compare/controller.scm @@ -357,7 +357,41 @@ ((name data ...) `((name . ,name) ,@data))) - version-changes)))) + version-changes))) + (lint_warnings + . ,(list->vector + (map + (match-lambda + (((package-name package-version) + . warnings) + + `((package + . ((name . ,package-name) + (version . ,package-version))) + (warnings + . ,(list->vector + (map + (match-lambda + ((lint-checker-name + message + lint-checker-description + lint-checker-network-dependent + file line column-number + change) + + `((change . ,change) + (checker + . ((name . ,lint-checker-name) + (description + . ,lint-checker-description))) + (message . ,message) + (location + . ((file . ,file) + (line . ,(string->number line)) + (column . ,(string->number + column-number))))))) + warnings)))))) + lint-warnings-data)))) #:extra-headers http-headers-for-unchanging-content)) (else (letpar& ((lint-warnings-locale-options |