From nobody Mon May 6 06:54:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642758148; cv=none; d=zohomail.com; s=zohoarc; b=M2p0ApKM+YHtG88X7GczbH024ee2xV0A+xWOobWy3iKys6819T6gBSa5hENYnZUVMooHyT5kkbWZN0f5R5sfsLJBxpe6hAiZ7llNIXgpBVLjewW8X05Bat4qb7x/2UzMGwvJjAYngU++cnwP+hhOVG8Vg6jPihFAcBhT9z1zcas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642758148; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EnLj6vz2W27gjuQyWmeJ4brxrPGNdQxUq6qXK+HNUa8=; b=kfEzNYY7WN2PU45OTf4KD6771P23AFw+8cJDoAc4lvVLtEb9gCyh7qYheo8MIRxMbWQqmy0QhU58AYRVWBvfmWblOVFt+AMdPDg9btKV1ZNynSWksqnocUoersP5rLHSviOr6ic9Td3F9BkSbL+tchCre6AQQPe8fDLJEH4PKXs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642758148412162.24847800495002; Fri, 21 Jan 2022 01:42:28 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-460-3_vAE_6nNqqa1NG6tX4KNw-1; Fri, 21 Jan 2022 04:42:25 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E890283DEB5; Fri, 21 Jan 2022 09:42:20 +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 C320B7A225; Fri, 21 Jan 2022 09:42:20 +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 900B01806D1D; Fri, 21 Jan 2022 09:42:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20L9g1iD028061 for ; Fri, 21 Jan 2022 04:42:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8CD906D032; Fri, 21 Jan 2022 09:42:01 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D36F94F87E; Fri, 21 Jan 2022 09:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642758147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EnLj6vz2W27gjuQyWmeJ4brxrPGNdQxUq6qXK+HNUa8=; b=N0+uD2UPzcOfe+fwqWoCpHpe0A1LCMfybh/sf078Us3+OWbo8Ij3YQM4uwoP++rfUEtYP1 g/5C5+yOqeVo98ty7YydM0oYHC60+TNVKH06PWjnodm4pZOoMYYKULhA9Ls3PQDTm+tQAJ ABDowCIPdwj8o5JvXZMMjC79u0wfnUA= X-MC-Unique: 3_vAE_6nNqqa1NG6tX4KNw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v3 1/3] scripts: Check spelling Date: Fri, 21 Jan 2022 10:41:48 +0100 Message-Id: <20220121094150.15878-2-twiederh@redhat.com> In-Reply-To: <20220121094150.15878-1-twiederh@redhat.com> References: <20220121094150.15878-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642758150204100002 Content-Type: text/plain; charset="utf-8" This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack of per-directory ignore lists and some oddities regarding capitalization in ignore lists. The ".codespellrc" file is used to coarsly filter out translation and git files, as scanning those makes up for roughly 50% of the run time otherwise. [1] (https://github.com/codespell-project/codespell/) Signed-off-by: Tim Wiederhake --- .codespellrc | 2 + scripts/check-spelling.py | 135 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 .codespellrc create mode 100755 scripts/check-spelling.py diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..0c45be445b --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +skip =3D .git/,*.po diff --git a/scripts/check-spelling.py b/scripts/check-spelling.py new file mode 100755 index 0000000000..ce3e7d89f0 --- /dev/null +++ b/scripts/check-spelling.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python3 + +import argparse +import re +import subprocess +import os + + +IGNORE_LIST =3D [ + # ignore this script + ("scripts/check-spelling.py", []), + + # 3rd-party: keycodemapdb + ("src/keycodemapdb/", []), + + # 3rd-party: VirtualBox SDK + ("src/vbox/vbox_CAPI", []), + + # 3rd-party: qemu + ("tests/qemucapabilitiesdata/caps_", []), + + # other + ("", ["msdos", "MSDOS", "wan", "WAN", "hda", "HDA", "inout"]), + ("NEWS.rst", "crashers"), + ("docs/gitdm/companies/others", "Archiv"), + ("docs/glib-adoption.rst", "preferrable"), + ("docs/js/main.js", "whats"), + ("examples/polkit/libvirt-acl.rules", ["userA", "userB", "userC"]), + ("src/libvirt-domain.c", "PTD"), + ("src/libxl/libxl_logger.c", "purposedly"), + ("src/nwfilter/nwfilter_dhcpsnoop.c", "ether"), + ("src/nwfilter/nwfilter_ebiptables_driver.c", "parm"), + ("src/nwfilter/nwfilter_learnipaddr.c", "ether"), + ("src/qemu/qemu_agent.c", "crypted"), + ("src/qemu/qemu_agent.h", "crypted"), + ("src/qemu/qemu_process.c", "wee"), + ("src/security/apparmor/libvirt-lxc", "devic"), + ("src/security/apparmor/libvirt-qemu", "readby"), + ("src/storage_file/storage_file_probe.c", "conectix"), + ("src/util/virnetdevmacvlan.c", "calld"), + ("src/util/virtpm.c", "parm"), + ("tests/qemuagenttest.c", "IST"), + ("tests/storagepoolxml2xml", "cant"), + ("tests/sysinfodata/", "sie"), + ("tests/testutils.c", "nIn"), + ("tests/vircgroupdata/ovirt-node-6.6.mounts", "hald"), + ("tests/virhostcpudata/", "sie"), + ("tools/virt-host-validate-common.c", "sie"), +] + + +def ignore(filename, linenumber, word, suggestion): + if len(word) <=3D 2: + return True + + for f, w in IGNORE_LIST: + if not filename.startswith(f): + continue + if word in w or not w: + return True + return False + + +def main(): + line_pattern =3D re.compile("^(.*):(.*): (.*) =3D=3D> (.*)$") + output_template =3D "(\"{0}\", \"{2}\"),\t# line {1}, \"{3}\"?" + + parser =3D argparse.ArgumentParser(description=3D"Check spelling") + parser.add_argument( + "dir", + help=3D"Path to source directory. " + "Defaults to parent directory of this script", + type=3Dos.path.realpath, + nargs=3D'?') + parser.add_argument( + "-i", + "--ignore", + help=3D"File to ignore. Can be specified more than once", + metavar=3D"FILE", + default=3Dlist(), + action=3D"append") + parser.add_argument( + "--ignore-untracked", + help=3D"Ignore all files not tracked by git", + action=3D"store_true") + args =3D parser.parse_args() + + if not args.dir: + args.dir =3D os.path.dirname(os.path.dirname(os.path.realpath(__fi= le__))) + + if args.ignore_untracked: + args.ignore.extend(subprocess.check_output( + ["git", "-C", args.dir, "ls-files", "--others"], + universal_newlines=3DTrue).split("\n")) + + try: + process =3D subprocess.run( + [ + "codespell", + args.dir, + "--config", + os.path.join(args.dir, ".codespellrc")], + stdout=3Dsubprocess.PIPE, + stderr=3Dsubprocess.PIPE, + universal_newlines=3DTrue) + except FileNotFoundError: + exit("error: codespell not found") + if process.returncode not in (0, 65): + exit("error: unexpected returncode %s" % process.returncode) + + if process.stderr: + exit("error: unexpected output to stderr: \"%s\"" % process.stderr) + + findings =3D 0 + for line in process.stdout.split("\n"): + line =3D line.strip().replace(args.dir, "").lstrip("/") + if not line: + continue + + match =3D line_pattern.match(line) + if not match: + exit("error: unexpected line: \"%s\"" % line) + + if match.group(1) in args.ignore or ignore(*match.groups()): + continue + + print(output_template.format(*match.groups())) + findings +=3D 1 + + if findings: + exit("error: %s spelling errors" % findings) + + +if __name__ =3D=3D "__main__": + main() --=20 2.31.1 From nobody Mon May 6 06:54:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642758137; cv=none; d=zohomail.com; s=zohoarc; b=gUg88YOiXk/Qp0Xq2RLDie01T/CvE3ul1dJ//bnUuas+9KWqPwJHVWLZ0ulxO7ySQcMtZo/6X/4eTM7KRSuE2cPnA/SSdksbywil1ozSjWAMbG84xSicXSxUWbG2V23OBZkwj/rPmv1vFmUcpJBRHegD/IZ/PUC/VpJYPs993gU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642758137; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eoaFUSr0ufECO96K+svamIDXZy5/1zMiZiSDZskZOTM=; b=g1RdI/8fCCyDUxgMGKy+odaUMrjcvEB7dvse+qmGE+KkK2C5WsLAP7+24Ttr9pAM65/HMUzVFI6DOaubDz9QergCM/BqXbCsJsq/pzctpVv9St1UgTj17EeUYau2TmQV+vls9ggyPEkHg2/Pwq7wnHfIFvMUV8zdUpnnazYLUlk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642758137758932.3922327528827; Fri, 21 Jan 2022 01:42:17 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-65-mCxJ-XulMoaL_44adqHb7g-1; Fri, 21 Jan 2022 04:42:13 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C08001018720; Fri, 21 Jan 2022 09:42:07 +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 50C4C4F87E; Fri, 21 Jan 2022 09:42:06 +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 6AD76180B617; Fri, 21 Jan 2022 09:42:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20L9g2I1028071 for ; Fri, 21 Jan 2022 04:42:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9F8026F119; Fri, 21 Jan 2022 09:42:02 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E008C6D032; Fri, 21 Jan 2022 09:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642758136; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eoaFUSr0ufECO96K+svamIDXZy5/1zMiZiSDZskZOTM=; b=P0WKmtABiOYUiWXYaL1n0DsQRhir/oP6uYTumbr4T+ylWIkDeA2Hxh7itabKf4qRLRMWhA SXPQMWOTGPv/+Y1cZZf94aesZGQhX+IF+8R7wd8hK0WqBji3/g1YjwX8ZN5Lk67i79WnW7 h2ikuPzPVnOQsyQjPdFaHvlh8ToS9bk= X-MC-Unique: mCxJ-XulMoaL_44adqHb7g-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v3 2/3] meson: Add spell checking Date: Fri, 21 Jan 2022 10:41:49 +0100 Message-Id: <20220121094150.15878-3-twiederh@redhat.com> In-Reply-To: <20220121094150.15878-1-twiederh@redhat.com> References: <20220121094150.15878-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642758138721100001 Content-Type: text/plain; charset="utf-8" If "codespell" is installed, use it to find spelling mistakes. Enabled by default, disable with "meson -Dspellcheck=3Ddisabled". Signed-off-by: Tim Wiederhake --- build-aux/meson.build | 16 ++++++++++++++++ meson.build | 1 + meson_options.txt | 1 + scripts/meson.build | 1 + 4 files changed, 19 insertions(+) diff --git a/build-aux/meson.build b/build-aux/meson.build index e491bdeebc..96fa694d26 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -67,3 +67,19 @@ if git ) endforeach endif + + +if get_option('spellcheck').auto() + use_spellcheck =3D git and codespell_prog.found() +else + use_spellcheck =3D get_option('spellcheck').enabled() +endif + +if use_spellcheck + test( + 'check-spelling', + python3_prog, + args: [ check_spelling_prog.path(), '--ignore-untracked' ], + suite: 'syntax-check', + ) +endif diff --git a/meson.build b/meson.build index 70843afcd5..0f0a065247 100644 --- a/meson.build +++ b/meson.build @@ -812,6 +812,7 @@ endforeach =20 optional_programs =3D [ 'augparse', + 'codespell', 'dmidecode', 'ebtables', 'flake8', diff --git a/meson_options.txt b/meson_options.txt index 5b43cdbd6b..b3aabdad35 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,6 +10,7 @@ option('rpath', type: 'feature', value: 'auto', descripti= on: 'whether to include option('docdir', type: 'string', value: '', description: 'documentation in= stallation directory') option('docs', type: 'feature', value: 'auto', description: 'whether to ge= nerate documentation') option('tests', type: 'feature', value: 'auto', description: 'whether to b= uild tests') +option('spellcheck', type: 'feature', value: 'auto', description: 'whether= to check spelling') =20 =20 # build dependencies options diff --git a/scripts/meson.build b/scripts/meson.build index 421e3d2acd..735c963c38 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -7,6 +7,7 @@ scripts =3D [ 'check-drivername.py', 'check-file-access.py', 'check-remote-protocol.py', + 'check-spelling.py', 'check-symfile.py', 'check-symsorting.py', 'dtrace2systemtap.py', --=20 2.31.1 From nobody Mon May 6 06:54:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642758182; cv=none; d=zohomail.com; s=zohoarc; b=K8ycGHwl3+sDslXYSw3DGsVTZZ7R+fYYiyIkPkjfzCTOrPaJH40xsluyWNvL3HFLyK1zOxn3X3Y6fLEas29047kuZMRx93LhKm3v2n6X7gXS6Ed3P5zf+rH2GntCWbbcjQ+YW3vP3STTnVW0tHn4b0baRCBl7L1CjisIjXy6kcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642758182; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5+4OJziYxMLB6ebEJXB7xP0E/86JEurUIeO7XlLTF3A=; b=AA7vEHrmDcULk5akGfMkvp9Eal01226D20jJR4KnLWngkcsWuxKdWreQdJ15s6Xx+3EFBX87tBmfl6KNmajG6ONuF7cUx3D3JnsNDYjwf28ouMQ0rGB3ipwR0ECoPK1E/VRxSEU0K7vyoqaWnK3k98dA+wbTCiHElpU/nKEJmjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642758182599839.2255336699938; Fri, 21 Jan 2022 01:43:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-541-lf1xZ26zPeK0aDRHJJmWXA-1; Fri, 21 Jan 2022 04:42:29 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3BA783DEA9; Fri, 21 Jan 2022 09:42:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C459A6F117; Fri, 21 Jan 2022 09:42:23 +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 9102E4A7C8; Fri, 21 Jan 2022 09:42:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20L9gD2C028094 for ; Fri, 21 Jan 2022 04:42:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 617896F11B; Fri, 21 Jan 2022 09:42:13 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A72096F120; Fri, 21 Jan 2022 09:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642758181; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5+4OJziYxMLB6ebEJXB7xP0E/86JEurUIeO7XlLTF3A=; b=Nvr3bQBmTd5sFhjf3i/KMLtSxg26kIAmsyE8JrQeCcdVjucjINC6cElAFBCnk8h1Xyg/Qs Kxdi0U9z5Rkz7f5jEkhODNV+CmFRc55V2p6GjuS9HokpmZ+K3tL1+pvwLcin4t8HSRm/AR gW3vZ2cCVGCVCd9eM4Zr4petpwkP7sI= X-MC-Unique: lf1xZ26zPeK0aDRHJJmWXA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v3 3/3] ci: Add spell checking Date: Fri, 21 Jan 2022 10:41:50 +0100 Message-Id: <20220121094150.15878-4-twiederh@redhat.com> In-Reply-To: <20220121094150.15878-1-twiederh@redhat.com> References: <20220121094150.15878-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642758184362100001 Content-Type: text/plain; charset="utf-8" Allow the spell checking job to fail to not have false-positives fail the entire build. Signed-off-by: Tim Wiederhake --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ba11a0431..8f43889067 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,11 +82,22 @@ codestyle: before_script: - *script_variables script: - - meson setup build --werror || (cat build/meson-logs/meson-log.txt &&= exit 1) + - meson setup build --werror -Dspellcheck=3Ddisabled || (cat build/mes= on-logs/meson-log.txt && exit 1) - ninja -C build libvirt-pot-dep - meson test -C build --suite syntax-check --no-rebuild --print-errorl= ogs =20 =20 +spellcheck: + stage: sanity_checks + image: $CI_REGISTRY_IMAGE/ci-fedora-35:latest + allow_failure: true + needs: + - x86_64-fedora-35-container + before_script: + - *script_variables + script: + - scripts/check-spelling.py + # This artifact published by this job is downloaded to push to Weblate # for translation usage: # https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?j= ob=3Dpotfile --=20 2.31.1