From 772d8b42b65e4a1eb381d441219bc5c589ae6373 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 17 Apr 2019 08:00:38 +0200 Subject: [PATCH] checkpatch: don't spell-check the spelling file Prevent checkpatch to complain for commits that add new entries in the dictionary of misspelled words. Remove the ignore flag TYPO_SPELLING from .checkpatch.conf, now spelling is functional. Change-Id: I911dedafc243e34f753d2be687977066719ff2eb Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/5123 Tested-by: jenkins --- .checkpatch.conf | 3 --- tools/scripts/checkpatch.pl | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.checkpatch.conf b/.checkpatch.conf index 9280280032..1ab743e2c7 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -27,6 +27,3 @@ --ignore SWITCH_CASE_INDENT_LEVEL --ignore TRACING_LOGGING --ignore VOLATILE - -# Temporarily lines, to commit checkpatch itself. To be removed! ---ignore TYPO_SPELLING diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 07dca63db9..6f877c379e 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -3398,6 +3398,9 @@ sub process { # Check for various typo / spelling mistakes if (defined($misspellings) && + # OpenOCD specific: Begin: don't check spelling on spelling_file + index($spelling_file, $realfile) + length($realfile) != length($spelling_file) && + # OpenOCD specific: End ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) { while ($rawline =~ /(?:^|[^\w\-'`])($misspellings)(?:[^\w\-'`]|$)/gi) { my $typo = $1; -- 2.30.2