From nobody Sun Feb 8 16:24:16 2026 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