diff options
author | Christopher Baines <mail@cbaines.net> | 2019-09-01 18:26:46 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-09-01 18:32:09 +0100 |
commit | d3254dddb68980c26edc35539346dcf455e01fba (patch) | |
tree | 73a00daab700f7fa0599009d86935dcc04e9f6ff /guix-data-service/web/view/html.scm | |
parent | 514933db473b60db8fdd9eb5e5d3f94ce94ac715 (diff) | |
download | data-service-d3254dddb68980c26edc35539346dcf455e01fba.tar data-service-d3254dddb68980c26edc35539346dcf455e01fba.tar.gz |
Add lint warnings to the package page
Diffstat (limited to 'guix-data-service/web/view/html.scm')
-rw-r--r-- | guix-data-service/web/view/html.scm | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 982b5f2..3e9a5b9 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -290,6 +290,7 @@ (define* (view-revision-package-and-version revision-commit-hash name version package-metadata derivations git-repositories + lint-warnings #:key header-text header-link) (layout @@ -375,7 +376,59 @@ (td (a (@ (href ,file-name)) ,(display-store-item-short file-name))) (td ,(build-status-span status))))) - derivations))))))))) + derivations))))) + (div + (@ (class "row")) + (div + (@ (class "col-sm-12")) + (h3 "Lint warnings") + (table + (@ (class "table")) + (thead + (tr + (th "Linter") + (th "Message") + (th "Location"))) + (tbody + ,@(map + (match-lambda + ((id lint-checker-name lint-checker-description + lint-checker-network-dependent + file line-number column-number + message) + `(tr + (td (span (@ (style "font-family: monospace; display: block;")) + ,lint-checker-name) + (p (@ (style "font-size: small; margin: 6px 0 0px;")) + ,lint-checker-description)) + (td ,message) + (td + ,@(if (and file (not (string-null? file))) + `((ul + ,@(map + (match-lambda + ((id label url cgit-url-base) + (let ((output + `(,file + " " + (span + (@ (style "white-space: nowrap")) + "(line: " ,line-number + ", column: " ,column-number ")")))) + (if + (and cgit-url-base + (not (string-null? cgit-url-base))) + `(li + (a (@ (href + ,(string-append + cgit-url-base "tree/" + file "?id=" revision-commit-hash + "#n" line-number))) + ,@output)) + `(li ,@output))))) + git-repositories))) + '()))))) + lint-warnings))))))))) (define (view-revision/git-repositories git-repositories-and-branches commit-hash) |