[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73a79b49d0183468a63876b170d1318d38c78d73.camel@perches.com>
Date: Wed, 08 May 2019 07:52:45 -0700
From: Joe Perches <joe@...ches.com>
To: Antonio Borneo <borneo.antonio@...il.com>,
Andy Whitcroft <apw@...onical.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] checkpatch: replace magic value for TAB size
On Wed, 2019-05-08 at 14:27 +0200, Antonio Borneo wrote:
> The size of 8 characters used for both TAB and indentation is
> embedded as magic value allover the checkpatch script, and this
> makes the script less readable.
>
> Replace the magic value 8 with the perl variable "$tabsize".
> From the context of the code it's clear if it is used for
> indentation or tabulation, so no need to use two separate
> variables.
>
> As side benefit of this change, it makes easy to replace the TAB
> size when this script is used by other projects with different
> requirements in their coding style (e.g. OpenOCD [1] requires
> TAB size of 4 characters [2]).
> In these cases the script will be probably modified and adapted,
> so there is no need (at least for the moment) to expose this
> setting on the script's command line.
Disagree. Probably getter to add a --tabsize=<foo> option now.
Powered by blists - more mailing lists