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.
This commit is contained in:
Ludovic Courtès 2014-09-03 09:01:28 +02:00
parent 52bd0810a8
commit b002e9d08e
2 changed files with 8 additions and 8 deletions

View file

@ -81,10 +81,10 @@ (define* (emit-warning package message #:optional field)
;; 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)))
;;;

View file

@ -39,10 +39,10 @@ (define-syntax-rule (dummy-package name* extra-fields ...)
(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