From nobody Sun May 5 12:08:09 2024 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 1507203211799606.081180753312; Thu, 5 Oct 2017 04:33:31 -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 49EA0C04B938; Thu, 5 Oct 2017 11:33:30 +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 DED9F5EE02; Thu, 5 Oct 2017 11:33:29 +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 B322E18355C7; Thu, 5 Oct 2017 11:33:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v95B7RH0015510 for ; Thu, 5 Oct 2017 07:07:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8BF9860603; Thu, 5 Oct 2017 11:07:27 +0000 (UTC) Received: from thyrus.usersys.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13BF117DCD for ; Thu, 5 Oct 2017 11:07:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 49EA0C04B938 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pino Toscano To: libvir-list@redhat.com Date: Thu, 5 Oct 2017 13:07:15 +0200 Message-Id: <20171005110715.22281-1-ptoscano@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] build: exclude more files from all the syntax checks 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.31]); Thu, 05 Oct 2017 11:33:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The majority of the syntax check is taylored for C sources, so some of the checks already cause false positives for non-C sources (and thus there are exclusion regexps in place). Instead, just exclude more non-C files from all the checks: - pot files: they are templates for po files (already excluded), and they are automatically generated from sources - pl files: Perl sources, which have own APIs, style, etc; they are helper scripts, not "real" sources - spec/spec.in files: RPM packaging files - js/woff/html.in files: files for web pages - diff/patch files: patches - stp files: SystemTap scripts - syms files: linker symbols files - conf files: generic configuration files - data/cpuinfo files: procinfo/cpuinfo files Python files (.py) are left allowed, since there is at least one syntax check specifically for them. Signed-off-by: Pino Toscano --- cfg.mk | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/cfg.mk b/cfg.mk index 0f4065b98..44a19594e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -91,7 +91,7 @@ endif =20 # Files that should never cause syntax check failures. VC_LIST_ALWAYS_EXCLUDE_REGEX =3D \ - (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$ + \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|s= tp|syms|conf|data|cpuinfo)$$ =20 # Functions like free() that are no-ops on NULL arguments. useless_free_options =3D \ @@ -1129,12 +1129,12 @@ exclude_file_name_regexp--sc_flags_usage =3D \ ^(cfg\.mk|docs/|src/util/virnetdevtap\.c$$|tests/((vir(cgroup|pci|test|u= sb)|nss|qemuxml2argv)mock|virfilewrapper)\.c$$) =20 exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics =3D \ - ^(src/rpc/gendispatch\.pl$$|tests/) + ^tests/ =20 -exclude_file_name_regexp--sc_po_check =3D ^(docs/|src/rpc/gendispatch\.pl$= $) +exclude_file_name_regexp--sc_po_check =3D ^(docs/) =20 exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY =3D \ - ^(cfg\.mk|include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virer= ror\.c|docs/internals/oomtesting\.html\.in)$$ + ^(cfg\.mk|include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virer= ror\.c)$$ =20 exclude_file_name_regexp--sc_prohibit_PATH_MAX =3D \ ^cfg\.mk$$ @@ -1143,16 +1143,16 @@ exclude_file_name_regexp--sc_prohibit_access_xok = =3D \ ^(cfg\.mk|src/util/virutil\.c)$$ =20 exclude_file_name_regexp--sc_prohibit_asprintf =3D \ - ^(cfg\.mk|bootstrap.conf$$|examples/|src/util/virstring\.[ch]$$|tests/vi= rcgroupmock\.c$$) + ^(cfg\.mk|examples/|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$) =20 exclude_file_name_regexp--sc_prohibit_strdup =3D \ ^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup= )mock.c|tests/commandhelper\.c$$) =20 exclude_file_name_regexp--sc_prohibit_close =3D \ - (\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\= .c|tests/vir.+mock\.c|tests/commandhelper\.c)$$) + (\.py$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mo= ck\.c|tests/commandhelper\.c)$$) =20 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF =3D \ - (^tests/(qemuhelp|virhostcpu|virpcitest)data/|docs/js/.*\.js|docs/fonts/= .*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$) + (^tests/(qemuhelp|virhostcpu|virpcitest)data/) =20 _src2=3Dsrc/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemo= n|logging/log_daemon) exclude_file_name_regexp--sc_prohibit_fork_wrappers =3D \ @@ -1163,17 +1163,14 @@ exclude_file_name_regexp--sc_prohibit_gethostname = =3D ^src/util/virutil\.c$$ exclude_file_name_regexp--sc_prohibit_internal_functions =3D \ ^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$ =20 -exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic =3D \ - ^src/rpc/gendispatch\.pl$$ - exclude_file_name_regexp--sc_prohibit_nonreentrant =3D \ - ^((po|tests)/|docs/.*(py|js|html\.in)|run.in$$|tools/wireshark/util/genx= drstub\.pl$$) + ^(tests/|docs/.*py|run.in$$) =20 exclude_file_name_regexp--sc_prohibit_select =3D \ ^cfg\.mk$$ =20 exclude_file_name_regexp--sc_prohibit_raw_allocation =3D \ - ^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(secu= rityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src= /packet-libvirt\.c)$$ + ^(src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(virc= group|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$ =20 exclude_file_name_regexp--sc_prohibit_readlink =3D \ ^src/(util/virutil|lxc/lxc_container)\.c$$ @@ -1181,7 +1178,7 @@ exclude_file_name_regexp--sc_prohibit_readlink =3D \ exclude_file_name_regexp--sc_prohibit_setuid =3D ^src/util/virutil\.c$$ =20 exclude_file_name_regexp--sc_prohibit_sprintf =3D \ - ^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$ + ^cfg\.mk$$ =20 exclude_file_name_regexp--sc_prohibit_strncpy =3D ^src/util/virstring\.c$$ =20 @@ -1200,10 +1197,10 @@ exclude_file_name_regexp--sc_require_config_h_first= =3D \ ^(examples/|tools/virsh-edit\.c$$) =20 exclude_file_name_regexp--sc_trailing_blank =3D \ - /qemuhelpdata/|/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo$$ + /qemuhelpdata/ =20 exclude_file_name_regexp--sc_unmarked_diagnostics =3D \ - ^(docs/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$ + ^(docs/apibuild.py|tests/virt-aa-helper-test)$$ =20 exclude_file_name_regexp--sc_size_of_brackets =3D cfg.mk =20 @@ -1243,7 +1240,7 @@ exclude_file_name_regexp--sc_prohibit_devname =3D \ ^(tools/virsh.pod|cfg.mk|docs/.*)$$ =20 exclude_file_name_regexp--sc_prohibit_virXXXFree =3D \ - ^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvir= t_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|strea= m|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|net= work|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$) + ^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|include/li= bvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interf= ace|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|str= eam|secret|nwfilter|interface|domain-snapshot).c$$) =20 exclude_file_name_regexp--sc_prohibit_sysconf_pagesize =3D \ ^(cfg\.mk|src/util/virutil\.c)$$ --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list