checkpatch: get default codespell dictionary path from package location
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 9 Nov 2021 02:33:34 +0000 (18:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Nov 2021 18:02:50 +0000 (10:02 -0800)
commit0ee3e7b8893eca232cb118cb4874324ebfe9f767
tree7d7f6e94d152f237846be228e70710d7d6be915b
parent70a11659f590b6ac32e6260d5c64a3e83b1272d4
checkpatch: get default codespell dictionary path from package location

The standard location of dictionary.txt is under codespell's package, on
my machine atm (codespell 2.1, Artix Linux):

  /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary.txt

Since we enable the codespell by default for SOF I have constant:

  No codespell typos will be found - file '/usr/share/codespell/dictionary.txt': No such file or directory

The patch proposes to try to fix up the path following the
recommendation found here:

  https://github.com/codespell-project/codespell/issues/1540

Link: https://lkml.kernel.org/r/29e25d1364c8ad7f7657cc0660f60c568074d438.camel@perches.com
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl