scripts/checkpatch: Support codespell checking
commite072af19fc06b18065f5081ff71cc7b2e6dca7bf
authorZhao Liu <zhao1.liu@intel.com>
Fri, 5 Jan 2024 08:38:48 +0000 (5 16:38 +0800)
committerThomas Huth <thuth@redhat.com>
Thu, 11 Jan 2024 13:13:07 +0000 (11 14:13 +0100)
tree89f0e34d426970dd3f4b5ff3190872af524b5d90
parent7af0cc147ce6394bed3ac7546c6c5ef82eac3bd6
scripts/checkpatch: Support codespell checking

Add two spelling check options (--codespell and --codespellfile) to
enhance spelling check through dictionary, which copied the Linux
kernel's implementation in checkpatch.pl.

This check uses the dictionary at "/usr/share/codespell/dictionary.txt"
by default, if there is no dictionary specified under this path, it
will look for the dictionary of python3's codespell (This requires user
to add python3's path in environment variable $PATH, and to install
codespell by "pip install codespell").

Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Tested-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240105083848.267192-1-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
scripts/checkpatch.pl