From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 2/5] guix: lint: Use if/when consistently. Date: Fri, 24 Oct 2014 00:05:15 -0500 Message-ID: <87y4s6xdkk.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhX1Q-00014T-3d for guix-devel@gnu.org; Fri, 24 Oct 2014 01:02:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhX1K-0003Jz-Dk for guix-devel@gnu.org; Fri, 24 Oct 2014 01:02:44 -0400 Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:60915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhX1K-0003Jv-9Q for guix-devel@gnu.org; Fri, 24 Oct 2014 01:02:38 -0400 Received: by mail-yh0-f41.google.com with SMTP id i57so2711783yha.0 for ; Thu, 23 Oct 2014 22:02:37 -0700 (PDT) Received: from cooper.gmail.com (chippewa-nat.cray.com. [136.162.34.1]) by mx.google.com with ESMTPSA id e5sm451922igr.14.2014.10.23.22.02.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 23 Oct 2014 22:02:37 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-guix-lint-Use-if-when-consistently.patch >From 60a9c0b0b20f37b9866f1a2825842c496ee5333d Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 22 Oct 2014 12:01:04 -0500 Subject: [PATCH 2/5] guix: lint: Use if/when consistently. * guix/scripts/lint.scm (check-synopsis-style): Replace single-branch uses of if with when. --- guix/scripts/lint.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index be866ab..84d9fe9 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -104,24 +104,24 @@ ;; Emit a warning if stylistic issues are found in the synopsis of PACKAGE. (define (check-final-period synopsis) ;; Synopsis should not end with a period, except for some special cases. - (if (and (string-suffix? "." synopsis) - (not (string-suffix? "etc." synopsis))) - (emit-warning package - "no period allowed at the end of the synopsis" - 'synopsis))) + (when (and (string-suffix? "." synopsis) + (not (string-suffix? "etc." synopsis))) + (emit-warning package + "no period allowed at the end of the synopsis" + 'synopsis))) (define (check-start-article synopsis) - (if (or (string-prefix-ci? "A " synopsis) - (string-prefix-ci? "An " synopsis)) - (emit-warning package - "no article allowed at the beginning of the synopsis" - 'synopsis))) + (when (or (string-prefix-ci? "A " synopsis) + (string-prefix-ci? "An " synopsis)) + (emit-warning package + "no article allowed at the beginning of the synopsis" + 'synopsis))) (define (check-synopsis-length synopsis) - (if (>= (string-length synopsis) 80) - (emit-warning package - "synopsis should be less than 80 characters long" - 'synopsis))) + (when (>= (string-length synopsis) 80) + (emit-warning package + "synopsis should be less than 80 characters long" + 'synopsis))) (define (check-synopsis-start-upper-case synopsis) (when (and (not (string-null? synopsis)) -- 1.7.9.5 --=-=-= -- Eric Bavier --=-=-=--