Messages in this thread | | | Subject | Re: Re: [PATCH v3 1/2] checkpatch: support deprecated terms checking | From | Joe Perches <> | Date | Wed, 10 Jun 2020 01:45:41 -0700 |
| |
On Wed, 2020-06-10 at 10:01 +0200, SeongJae Park wrote: > On Wed, 10 Jun 2020 00:13:42 -0700 Joe Perches <joe@perches.com> wrote: [] > > This is a direct copy of the spelling dictionary > > loading code, so maybe these could be consolidated. > > Agreed, how about below one? [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 524df88f9364..226f24e1f1f3 100755 [] > +sub read_word_corrections { > + my ($file) = @_; > + my $suspects; > + my %fixes;
Right.
But I think this should take a hash reference as the second argument so the complete hash isn't created and returned.
[]
> +# Load deprecated terms and build regular expression list. > +my %deprecated_terms_fix = read_word_corrections($deprecated_terms_file);
So this might be something like:
my %deprecated_terms; read_word_corrections($deprecated_terms_file, \%deprecated_terms);
etc...
| |