From patchwork Tue Oct 8 07:44:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98481 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 290C53846424 for ; Tue, 8 Oct 2024 07:45:06 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 48560386102F for ; Tue, 8 Oct 2024 07:44:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48560386102F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 48560386102F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; cv=none; b=s3QcwKMa1ZcpOHOzv6OwXnQqGkMUrN+rbwpTQ5IKagfr4X4bC+00g4P0MS7IxknZs67UnUYd8obNrAtxXMafe27Ho5iRknL+Fy75uySWfejMWDNOkKqIQNqQO4DlFMfpsy3aG/a5h3iNsC5rOeAdmApWJ5IjnGqHpafuTJ5snuc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; c=relaxed/simple; bh=M8yBDgL5l6eB1v3WfKPVcdHXeRTq315g5DjGPHLUgrs=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=FheU8SAKALnzba4FxW6P4bexAehr8vK9SRWBRDn1xMkcm6ldIjGvZdBpzZskFSWTNFJQPhM7ENvz0HwBK1NuPTPrmSbuAsIS3x+Dubb9yYmQN0eaeeSZQcaaq495+5iwCCGtHyNoQLcum6RB5zZkPI/aIDBJWY3xfMCFHKVKfzM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4E47D216D7 for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fJGw6Daf6hijtOcNVwZBLV6eg75NbeUlIEx5KPdrBxg=; b=AUIhZSEa7QPVe0mkaRJXS1tzplecGbNC4Db+li++9AYO7/fWvUCOI2GW134fZZwSpf5Yfd OKYDPSz4GFe8BFd8tvKRHlo8Yeg5nxT/IVcrXQGMvzfj/W2KTcEIbENuvdOhtVP6E/29BA fReeB8t3NSFWOddOh4bQ5EukMTO2wEE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fJGw6Daf6hijtOcNVwZBLV6eg75NbeUlIEx5KPdrBxg=; b=luwHcfv0FO2FtcZoCYnYVKJ7NYYjG6kWYNa5KgqwLATHaWU4i8Hw9n5pd06uLgERIOgG7T ZSpRm5NhemqDo3CQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fJGw6Daf6hijtOcNVwZBLV6eg75NbeUlIEx5KPdrBxg=; b=AUIhZSEa7QPVe0mkaRJXS1tzplecGbNC4Db+li++9AYO7/fWvUCOI2GW134fZZwSpf5Yfd OKYDPSz4GFe8BFd8tvKRHlo8Yeg5nxT/IVcrXQGMvzfj/W2KTcEIbENuvdOhtVP6E/29BA fReeB8t3NSFWOddOh4bQ5EukMTO2wEE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fJGw6Daf6hijtOcNVwZBLV6eg75NbeUlIEx5KPdrBxg=; b=luwHcfv0FO2FtcZoCYnYVKJ7NYYjG6kWYNa5KgqwLATHaWU4i8Hw9n5pd06uLgERIOgG7T ZSpRm5NhemqDo3CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2A5FF1340C for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0AeZCMjiBGciFAAAD6G6ig (envelope-from ) for ; Tue, 08 Oct 2024 07:44:08 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/3] [gdb/contrib] Add spellcheck.sh --check Date: Tue, 8 Oct 2024 09:44:00 +0200 Message-Id: <20241008074402.10374-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Add a new option --check to gdb/contrib/spellcheck.sh, to do the spell check and bail out ASAP with an exit code of 1 if misspelled words were found, or 0 otherwise. Verified with shellcheck. --- gdb/contrib/spellcheck.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) base-commit: e808bbbe37dda4a3ec5872ff990090cc746ad7ac diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh index 4203333b846..3188734331c 100755 --- a/gdb/contrib/spellcheck.sh +++ b/gdb/contrib/spellcheck.sh @@ -76,7 +76,7 @@ sed_separator=$(join $sed_or "${sed_separators[@]}") usage () { - echo "usage: $(basename "$0") +" + echo "usage: $(basename "$0") [--check] +" } make_absolute () @@ -101,6 +101,18 @@ parse_args () files=$(mktemp) trap 'rm -f "$files"' EXIT + while true; do + case " $1 " in + " --check ") + check=true + shift + ;; + *) + break + ;; + esac + done + if [ $# -eq -0 ]; then usage exit 1 @@ -311,6 +323,7 @@ replace_word_in_files () main () { declare -a unique_files + check=false parse_args "$@" get_dictionary @@ -329,6 +342,10 @@ main () return fi + if $check; then + exit 1 + fi + declare -A words_done local i word replacement i=0 From patchwork Tue Oct 8 07:44:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98480 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A324C38650D5 for ; Tue, 8 Oct 2024 07:44:46 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 64F2A386181E for ; Tue, 8 Oct 2024 07:44:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64F2A386181E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 64F2A386181E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; cv=none; b=BwKIolFg6UBDO7IshCmJnip/Bag+vyF01gsEbdQ/pwEiO2bMIfMIzbJfQjViwrsUPSBauT6KNGAQbsGswFWm8tTvBU26sTQjnObQJsfKit7W2cRK8s2P/PlJ7xuLUxCETNpMVkn66eWk0VxtAc8Es9V/Spo3Rf9gjkXBYpbhBzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; c=relaxed/simple; bh=az9O5JPQE9PkG4e7EnnSqFdGtsJNg6KnwcYVOhmRow8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=F/l6DNyd+EQvM/3KS0/qRf9GUPnYOmhI2r/Gp3c0xUhGEcWknChL0ZOG2jEHQr5Be3KiFA/RTVu9Vr49st5fJyydJsUT8e2OUA7bBOJ6I4rv5sdJL/KRTsWQLeJ7NI04LW4INezBrKleGcMZz7UfmcRUJaGJ4kkYxQZrtlwZtnc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 699EB219A5 for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WLtG8xVrZU1aSdzauS7aOOkbPLaOaooL8Jk4jaZ3cRM=; b=gDHsn5mwTmfBFy2czR2G77mDgOmXLn9lfTRm2vbN0Miwk77p+nM99kvdnEPqxNWbm6Wk2a 5Gd/1ANLo2MGm4VYn3VuqvhyFAc8P+62sE/gniHyZJy21VVN/uDIqAGcXDTC0AaciYvaBq EWaK78REWE6gim4rMIZRd1yN+eSicdc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WLtG8xVrZU1aSdzauS7aOOkbPLaOaooL8Jk4jaZ3cRM=; b=UeP2KkAGuvchWIbPMp1AcdrQZDAy1itlSKkpCVM7g2F1wHSwKQ+gG6CCT1UQRY50MYbY1l AbXhE7jXRRO145CA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WLtG8xVrZU1aSdzauS7aOOkbPLaOaooL8Jk4jaZ3cRM=; b=gDHsn5mwTmfBFy2czR2G77mDgOmXLn9lfTRm2vbN0Miwk77p+nM99kvdnEPqxNWbm6Wk2a 5Gd/1ANLo2MGm4VYn3VuqvhyFAc8P+62sE/gniHyZJy21VVN/uDIqAGcXDTC0AaciYvaBq EWaK78REWE6gim4rMIZRd1yN+eSicdc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WLtG8xVrZU1aSdzauS7aOOkbPLaOaooL8Jk4jaZ3cRM=; b=UeP2KkAGuvchWIbPMp1AcdrQZDAy1itlSKkpCVM7g2F1wHSwKQ+gG6CCT1UQRY50MYbY1l AbXhE7jXRRO145CA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4D89513A6E for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +N52EcjiBGciFAAAD6G6ig (envelope-from ) for ; Tue, 08 Oct 2024 07:44:08 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/3] [gdb/contrib] Speed up spellcheck.sh --check Date: Tue, 8 Oct 2024 09:44:01 +0200 Message-Id: <20241008074402.10374-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241008074402.10374-1-tdevries@suse.de> References: <20241008074402.10374-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Speed up gdb/contrib/shellcheck.sh by caching the grep pattern. Without cached grep pattern: ... $ time ./gdb/contrib/spellcheck.sh --check gdb/gdb.c real 0m2,750s user 0m0,013s sys 0m0,032s ... and with cached grep pattern: ... $ time ./gdb/contrib/spellcheck.sh --check gdb/gdb.c real 0m0,192s user 0m0,022s sys 0m0,024s ... Tested on aarch64-linux. --- gdb/contrib/spellcheck.sh | 49 +++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/gdb/contrib/spellcheck.sh b/gdb/contrib/spellcheck.sh index 3188734331c..08c745aa92d 100755 --- a/gdb/contrib/spellcheck.sh +++ b/gdb/contrib/spellcheck.sh @@ -20,12 +20,14 @@ # $ ./gdb/contrib/spellcheck.sh gdb* scriptdir=$(cd "$(dirname "$0")" || exit; pwd -P) +this_script=$scriptdir/$(basename "$0") url=https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines cache_dir=$scriptdir/../../.git cache_file=wikipedia-common-misspellings.txt dictionary=$cache_dir/$cache_file local_dictionary=$scriptdir/common-misspellings.txt +cache_file2=spell-check.pat1 # Separators: space, slash, tab, colon, comma. declare -a grep_separators @@ -191,21 +193,38 @@ parse_dictionary () find_files_matching_words () { - local pat - pat="" - for word in "${words[@]}"; do - if [ "$pat" = "" ]; then - pat="$word" - else - pat="$pat|$word" - fi - done - pat="($pat)" - - local sep - sep=$grep_separator - - pat="(^|$sep)$pat($sep|$)" + local cache_id + cache_id=$(cat "$local_dictionary" "$dictionary" "$this_script" \ + | md5sum \ + | awk '{print $1}') + + local patfile + patfile="$cache_dir/$cache_file2".$cache_id + + if [ -f "$patfile" ]; then + pat=$(cat "$patfile") + else + rm -f "$cache_dir/$cache_file2".* + + local pat + pat="" + for word in "${words[@]}"; do + if [ "$pat" = "" ]; then + pat="$word" + else + pat="$pat|$word" + fi + done + pat="($pat)" + + local sep + sep=$grep_separator + + pat="(^|$sep)$pat($sep|$)" + + echo "$pat" \ + > "$patfile" + fi grep -E \ -l \ From patchwork Tue Oct 8 07:44:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98479 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 29B1C3850206 for ; Tue, 8 Oct 2024 07:44:38 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 72119386182B for ; Tue, 8 Oct 2024 07:44:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72119386182B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 72119386182B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; cv=none; b=Y6+75/TMI285F9pEROK1TDLkpTaU/gEK8wHwBwwWtk0y4XsNreorA56YQMyAg6CyXE09EEbyAyxFtCVwp2Xk6mqzCfpB7tnz/giX1jtkkfdqPsryW6T1LlLRhxenO2/Gqo1tPu23+lBrnh/MfLPpYunj1+YK0/vHWqEu/jjXRDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728373451; c=relaxed/simple; bh=gAwFU0M9sRQfZGSdvpJe+RTWiu/chSKiHYsf5XqS0EE=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=VuPet76V9iCYdjHQue7tW0F/0ycdLKDZW5hkns4L2jJnvapP5UUtZxOAbVPJQoQ/Egmphnl/NdqBJ4Hp2vuFvTNsGvbCmV+g/uj8msURJf0j3olg/8OlFP7Qbnbafhv7icy32ypAV9kcWWPnKWK2qJcbfzA7o6JLXax18F+p5q4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 81B31219A7 for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nxD00/d4sjwIAIdRXDh/HYwAIHrJlaYg37puK1OR8jc=; b=Z5yv0CQDAPoG97iVPkmp98TP0cbMR9TYj5fUsWuQIE8IvAVVcBSD1rwp9sPtxX8Gl7nfN4 tdmuW2F3isrM2EZTgMr/NqjsJsgi+uivsse6QfafoSxLeO/k9myeEUZGjBwLRr5QEALhkI y3vpSN4iv2XPNFnb2NCy4qksiUosHpc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nxD00/d4sjwIAIdRXDh/HYwAIHrJlaYg37puK1OR8jc=; b=pBwTbbnhPzqg3uNpZt8gnJbSXt1dvxxkslqJ7nfxlj/a2oyi0Webue0GEGRubegPjgbXEG CKRb9vlU8Lk8J4DQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nxD00/d4sjwIAIdRXDh/HYwAIHrJlaYg37puK1OR8jc=; b=Z5yv0CQDAPoG97iVPkmp98TP0cbMR9TYj5fUsWuQIE8IvAVVcBSD1rwp9sPtxX8Gl7nfN4 tdmuW2F3isrM2EZTgMr/NqjsJsgi+uivsse6QfafoSxLeO/k9myeEUZGjBwLRr5QEALhkI y3vpSN4iv2XPNFnb2NCy4qksiUosHpc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728373448; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nxD00/d4sjwIAIdRXDh/HYwAIHrJlaYg37puK1OR8jc=; b=pBwTbbnhPzqg3uNpZt8gnJbSXt1dvxxkslqJ7nfxlj/a2oyi0Webue0GEGRubegPjgbXEG CKRb9vlU8Lk8J4DQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6C0901340C for ; Tue, 8 Oct 2024 07:44:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id aDzoGMjiBGciFAAAD6G6ig (envelope-from ) for ; Tue, 08 Oct 2024 07:44:08 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 3/3] [gdb] Add spell check pre-commit hook Date: Tue, 8 Oct 2024 09:44:02 +0200 Message-Id: <20241008074402.10374-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20241008074402.10374-1-tdevries@suse.de> References: <20241008074402.10374-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Score: -2.72 X-Spamd-Result: default: False [-2.72 / 50.00]; BAYES_HAM(-2.92)[99.65%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Add a call to gdb/contrib/spellcheck.sh --check in .pre-commit-config.yaml: ... $ time git commit -a -m typo black................................................(no files to check)Skipped flake8...............................................(no files to check)Skipped isort................................................(no files to check)Skipped spell check..............................................................Failed - hook id: spell-check - exit code: 1 real 0m0,493s user 0m0,258s sys 0m0,318s ... Tested on aarch64-linux. --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87726aeb758..4a3fdd79f3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,10 @@ repos: - id: isort types_or: [file] files: 'gdb/.*\.py(\.in)?$' + - repo: local + hooks: + - id: spell-check + name: spell check + language: script + entry: ./gdb/contrib/spellcheck.sh --check + files: ^(gdb|gdbsupport|gdbserver)/