diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-03 09:01:28 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-03 15:43:07 +0200 |
commit | b002e9d08eb909e9fa1a84b0feed1662dce0bd3f (patch) | |
tree | 227cb75678fe38ee923168be4b97abc8c20025f1 | |
parent | 52bd0810a86396e961ca4c92f7e9e5ea0e8c547b (diff) | |
download | patches-b002e9d08eb909e9fa1a84b0feed1662dce0bd3f.tar patches-b002e9d08eb909e9fa1a84b0feed1662dce0bd3f.tar.gz |
guix lint: Remove "guix lint: " prefix from warnings.
This allows editors to parse warnings correctly.
* guix/scripts/lint.scm (emit-warning): Use 'format' instead of
'warning', to avoid the "guix lint: " prefix in messages.
* tests/lint.scm (call-with-warnings): Indent.
-rw-r--r-- | guix/scripts/lint.scm | 8 | ||||
-rw-r--r-- | tests/lint.scm | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index e3b06977ee..83dde9a1a1 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -81,10 +81,10 @@ Run a set of checkers on the specified package; if none is specified, run the ch ;; provided MESSAGE. (let ((loc (or (package-field-location package field) (package-location package)))) - (warning (_ "~a: ~a: ~a~%") - (location->string loc) - (package-full-name package) - message))) + (format (guix-warning-port) (_ "~a: ~a: ~a~%") + (location->string loc) + (package-full-name package) + message))) ;;; diff --git a/tests/lint.scm b/tests/lint.scm index f6dae47ca6..56558c904f 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -39,10 +39,10 @@ (home-page #f) (license #f) )) (define (call-with-warnings thunk) - (let ((port (open-output-string))) - (parameterize ((guix-warning-port port)) - (thunk)) - (get-output-string port))) + (let ((port (open-output-string))) + (parameterize ((guix-warning-port port)) + (thunk)) + (get-output-string port))) (test-assert "synopsis: ends with a period" (->bool |