format-code: don't spellcheck the commit author's name
Use the git-log --format option to only dump the "raw body (unwrapped
subject and body)", and omit the "commit"/"Author:"/"Date:" lines which
can trigger false positives.
Tested: `format-code.sh --enable commit_spelling` doesn't reject my
commits :)
Change-Id: Ic03c1c9703a91dab9f268f5f7bbca29cabeeb067
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
diff --git a/scripts/format-code.sh b/scripts/format-code.sh
index 90475ca..7644239 100755
--- a/scripts/format-code.sh
+++ b/scripts/format-code.sh
@@ -153,7 +153,7 @@
function do_commit_spelling() {
# Write the commit message to a temporary file
- git log -1 > "$commit_filename"
+ git log --format='%B' -1 > "$commit_filename"
# Some names or emails appear as false-positive misspellings, remove them
sed -i "s/Signed-off-by.*//" "$commit_filename"