Re: [PATCH 2/2] checkpatch: Add --conf-dir option

From: Petr Vorel

Date: Mon Feb 23 2026 - 10:53:37 EST


> On Mon, 2026-02-02 at 15:42 +0100, Petr Vorel wrote:
> > ```
> > This allows to directly use project configuration file for projects
> > which vendored checkpatch.pl (e.g. LTP or u-boot).

> > Options from the configuration file has been read before processing
> > command line options with Getopt::Long since the start (000d1cc1829f9)
> > because options read from config file needs to be unshifted from command
> > line arguments (@ARGV) before processing with Getopt::Long. Therefore
> > parse --conf-dir with direct reading @ARGV.

> nack.

> Extend 'sub which_conf {' and the perhaps the code that uses it
> if you really need this capability.

Thanks for a hint. If there is a chance it will be accepted I'll have look on
it. We would certainly appreciated not having to carry yet another checkpatch.pl
patch in LTP.

> Though I think it's not all that useful.

We use LTP in makefile targets run from various subdirectories. For that we
define our checkpatch.pl options (--ignore list and others) in certain Makefile.
Then we have b4 configuration, where we also use checkpatch.pl options.

Mixing cd to rootdir and passing path to the sources is of course doable
(to reach config file in .scripts in project root directory) but quite ugly.

Also, allowing to pass a configuration file (quite common feature for any
software) would allow to run checkpatch.pl with different configs for different
projects.

Kind regards,
Petr