Commit 66d7a382 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: add spell checking of email subject line

Only commit log and patch additions are checked for typos and spelling
errors currently.  Add a check of the email subject line too.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Suggested-by: default avatarJani Nikula <jani.nikula@linux.intel.com>
Tested-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6ab3a970
...@@ -2303,7 +2303,8 @@ sub process { ...@@ -2303,7 +2303,8 @@ sub process {
} }
# Check for various typo / spelling mistakes # Check for various typo / spelling mistakes
if (defined($misspellings) && ($in_commit_log || $line =~ /^\+/)) { if (defined($misspellings) &&
($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:$|[^a-z@])/gi) { while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:$|[^a-z@])/gi) {
my $typo = $1; my $typo = $1;
my $typo_fix = $spelling_fix{lc($typo)}; my $typo_fix = $spelling_fix{lc($typo)};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment