From nobody Mon Feb 9 04:14:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15367247236571000.1860162113586; Tue, 11 Sep 2018 20:58:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2EC3C5D669; Wed, 12 Sep 2018 03:58:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 267DE5B694; Wed, 12 Sep 2018 03:58:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0F0FA180613A; Wed, 12 Sep 2018 03:58:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8C3wYs0016695 for ; Tue, 11 Sep 2018 23:58:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id B269C20159BD; Wed, 12 Sep 2018 03:58:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8AA82015887 for ; Wed, 12 Sep 2018 03:58:32 +0000 (UTC) Received: from m97138.mail.qiye.163.com (m97138.mail.qiye.163.com [220.181.97.138]) by mx1.redhat.com (Postfix) with ESMTP id 2C11430842AE for ; Wed, 12 Sep 2018 03:58:30 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp9 (Coremail) with SMTP id u+CowADn7X7ijphbsNeyAQ--.247S3; Wed, 12 Sep 2018 11:58:28 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Wed, 12 Sep 2018 11:58:20 +0800 Message-Id: <20180912035823.22834-2-shi_lei@massclouds.com> In-Reply-To: <20180912035823.22834-1-shi_lei@massclouds.com> References: <20180912035823.22834-1-shi_lei@massclouds.com> X-CM-TRANSID: u+CowADn7X7ijphbsNeyAQ--.247S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRM_MaDUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiewS-T1rpNeQmegAAsx X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 12 Sep 2018 03:58:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 12 Sep 2018 03:58:31 +0000 (UTC) for IP:'220.181.97.138' DOMAIN:'m97138.mail.qiye.163.com' HELO:'m97138.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.138 m97138.mail.qiye.163.com 220.181.97.138 m97138.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] cfg.mk: Introduce syntax-check rule for incorrect indentation or empty for first line in function body X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 12 Sep 2018 03:58:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- cfg.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cfg.mk b/cfg.mk index 609ae86..a43cb1c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -702,6 +702,17 @@ sc_preprocessor_indentation: echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ fi =20 +# Use 4 spaces rather than TAB for indentation for those top-level +# function bodies. Doesn't catch all cases, but it helps. +sc_indentation_for_function_body: + @for f in $$($(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$'); do \ + grep -n -A1 '^{$$' $$f | grep '^[0-9]\{1,\}-' \ + | grep -v '^[0-9]\{1,\}-[ ]\{4\}\S' | grep -v '^[0-9]\{1,\}-\([#}/]\= |.*:\)' \ + | $(SED) -ne "s#\(^[0-9]\{1,\}\)-#$$f:\1:#gp" | grep . && \ + { echo '$(ME): incorrect indentation or empty for first line in functio= n body' 1>&2; \ + exit 1; } \ + done || : + # Enforce similar spec file indentation style, by running cppi on a # (comment-only) C file that mirrors the same layout as the spec file. sc_spec_indentation: --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list