LU-13726 build: fix checkpatch fix matching
When the spelling.txt suspect string is a regexp, then the matched
$typo string is different from the regexp, and is not a valid key
in the $spelling_fix associative array. This generates an error:
WARNING: 'foo' may be misspelled - perhaps 'CHECKPATCH ERROR'
because $typo is not found in $spelling_fix and $typo_fix is empty.
If $typo_fix is empty after lookup, iterate the $spelling_fix keys
to find the one matching $typo so that it can be used as $typo_fix.
Avoid length warnings from DNAME usage, improve spelling suggestion.
Test-Parameters: trivial
Fixes:
d097fcc51b ("LU-18810 obd: add a parameter to enable filename encoding")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6d29f9470d16c340ebf5bcd2384b477bac500c13
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58593
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>