diff options
author | Christopher Baines <mail@cbaines.net> | 2020-03-21 11:01:16 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-03-21 11:01:16 +0000 |
commit | e18f3861f84b74d7b7c4a3466fdd5c1e2ee01496 (patch) | |
tree | b5d3e8a5ea43f1fd9ebb1623b851976f761c3353 /guix-data-service/web/revision | |
parent | e108ed34e2887ec0f0c5758e686ea47048a86be2 (diff) | |
download | data-service-e18f3861f84b74d7b7c4a3466fdd5c1e2ee01496.tar data-service-e18f3861f84b74d7b7c4a3466fdd5c1e2ee01496.tar.gz |
Say that there are no lint warnings
Rather than having an empty table.
Diffstat (limited to 'guix-data-service/web/revision')
-rw-r--r-- | guix-data-service/web/revision/html.scm | 88 |
1 files changed, 48 insertions, 40 deletions
diff --git a/guix-data-service/web/revision/html.scm b/guix-data-service/web/revision/html.scm index a199197..b03d59e 100644 --- a/guix-data-service/web/revision/html.scm +++ b/guix-data-service/web/revision/html.scm @@ -280,46 +280,54 @@ (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 - (@ (class "list-unstyled")) - ,@(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))))))))) + ,@(if (null? lint-warnings) + `((tr + (td (@ (colspan 3) + (align "center")) + "No lint warnings " + (span + (@ (class "label label-success")) + "✓")))) + (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 + (@ (class "list-unstyled")) + ,@(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) |