Re: [PATCH v2] checkpatch: Allow to pass config directory
From: Petr Vorel
Date: Fri Mar 27 2026 - 05:54:40 EST
> On Thu, 2026-03-26 at 21:50 +0100, Petr Vorel wrote:
> > > my $paths = $def_configuration_dirs;
> > > $paths = "$ENV{$env_config_dir}:$paths" if exists($ENV{$env_config_dir});
> > +1, sure, thanks!
> Why have two uses of $ENV{$env_config_dir}?
Your suggestion in v1 :).
> Seems typo error prone and somewhat difficult to read.
In v3 I'll just prepend it without checking, because we do the check later on
if (-e "$path/$conf").
And add a note that one can add more dirs (like in PATH or LD_LIBRARY_PATH).
But again, it looks to me more better to point just a single file.
Check would be done only on the directory to which variable points, that's what
would user probably want (not silently fallbacking into the default
directories). But that would require slightly more code changes.
Kind regards,
Petr