diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-10-10 22:33:28 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-10-10 22:33:28 +0200 |
commit | c01ef97594a8b06e884906a5efbdfacf8ba33dc3 (patch) | |
tree | 828b4711c6ad71ab8fc9b6fc8f23f80979c5fe9b /guix/scripts/lint.scm | |
parent | 86d02fa8010c053ba980e4c39373b9bf8af0561d (diff) | |
parent | 4b8b4418e609b5e0bfb6efbc11ac28deaa437e80 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r-- | guix/scripts/lint.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 57bbeec465..fc61f0b547 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -33,6 +33,7 @@ #:use-module (guix licenses) #:use-module (guix records) #:use-module (guix ui) + #:use-module (guix upstream) #:use-module (guix utils) #:use-module (guix memoization) #:use-module (guix scripts) @@ -73,6 +74,7 @@ check-mirror-url check-license check-vulnerabilities + check-for-updates check-formatting run-checkers @@ -826,6 +828,17 @@ from ~s: ~a (~s)~%") (string-join (map vulnerability-id unpatched) ", "))))))))) +(define (check-for-updates package) + "Check if there is an update available for PACKAGE." + (match (package-latest-release* package (force %updaters)) + ((? upstream-source? source) + (when (version>? (upstream-source-version source) + (package-version package)) + (emit-warning package + (format #f (G_ "can be upgraded to ~a") + (upstream-source-version source))))) + (#f #f))) ; cannot find newer upstream release + ;;; ;;; Source code formatting. @@ -992,6 +1005,10 @@ or a list thereof") (CVE) database") (check check-vulnerabilities)) (lint-checker + (name 'refresh) + (description "Check the package for new upstream releases") + (check check-for-updates)) + (lint-checker (name 'formatting) (description "Look for formatting issues in the source") (check check-formatting)))) |