[PATCH] aiaiai-test-patchset: copy spelling.txt to use with checkpatch.pl

Brian Norris computersforpeace at gmail.com
Wed Oct 22 00:15:14 PDT 2014


As of Linux commit:

    commit 66b47b4a9dad00e45c049d79966de9a3a1f4d337
    Author: Kees Cook <keescook at chromium.org>
    Date:   Mon Oct 13 15:51:57 2014 -0700

        checkpatch: look for common misspellings

checkpatch.pl uses a companion spelling.txt dictionary for checking for
spelling mistakes. This causes aiaiai to error out on the checkpatch.pl
tests like so:

  ...
  checkpatch.pl: Can't open .../aiaiai-test-patchset.4CyY/checkpatch/spelling.txt for reading: No such file or directory
  checkpatch.pl: Can't open .../aiaiai-test-patchset.4CyY/checkpatch/spelling.txt for reading: No such file or directory
  ...

I suppose we should copy the dictionary (if available) along with
checkpatch.pl.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 aiaiai-test-patchset | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
index b3ab3f5a1702..7d7f20f8276a 100755
--- a/aiaiai-test-patchset
+++ b/aiaiai-test-patchset
@@ -454,6 +454,10 @@ if [ -n "$checkpatch" ]; then
 		checkpatch_pl="$tmpdir/checkpatch/checkpatch.pl"
 		git show "$commit_id1:scripts/checkpatch.pl" > "$checkpatch_pl"
 		chmod $verbose u+x "$checkpatch_pl" >&2
+		# checkpatch.pl now comes with a spelling dictionary
+		if git cat-file -e "$commit_id1:scripts/spelling.txt" 2>/dev/null; then
+			git show "$commit_id1:scripts/spelling.txt" > "$tmpdir/checkpatch/spelling.txt"
+		fi
 	else
 		verbose "Can't find checkpatch.pl.. disabling checkpatch tests."
 		checkpatch=
-- 
1.9.1




More information about the aiaiai mailing list