Re: [PATCH docs-next] scripts/kernel-doc: reindent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[I should have sent this when I wrote it a few hours ago....]


On 2/8/24 08:17, Vegard Nossum wrote:
> This file is using an ungodly mixture of 4 spaces, 2-wide tabs, 4-wide
> tabs, _and_ 8-wide tabs, making it really hard to find good editor
> settings for working with this file.
> 
> Bite the bullet and reindent it by hand. I tried using both perltidy
> and vim, but neither of them were up to the task without changing too
> much or getting confused about what they were supposed to be doing.
> 
> I did change a few instances of
> 
>     }
>     else
> 
> into
> 
>     } else

ack.

> (and same for elsif); the file is again written using both styles, and
> I left functions which already seemed self-consistent alone.
> 
> You can verify that this commit only changes whitespace using e.g.:
> 
>     git diff --ignore-all-space --word-diff
> 
> or to see (only) the instances where newlines were added/removed:
> 
>     git diff --ignore-all-space
> 
> You can also see the delta from what perltidy would have wanted to
> do to this file (when asked to only indent it), which isn't that much
> in the end:
> 
>     perltidy -io -fnl scripts/kernel-doc
>     git diff --no-index scripts/kernel-doc{,.tdy}
> 
> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>

I'm not verifying that the changes are whitespace only, but this change
needs to be done.

The only downside of it for me is finding what commit to blame for
a Fixes: tag. I have no good skills for doing that.

> ---
> I know that reindenting whole files is frowned upon and I apologize
> in advance, but having this file be so completely out of whack is
> not helping anybody. FWIW, I am working on other patches that would
> benefit from the reindent in the sense of being easier to review.
> 
> Of the currently active stable releases, I only see a handful of
> patches to this file that have ever been backported to stable:
> 
> 5.10
> 9fd7bdaffe0e stddef: Introduce struct_group() helper macro
> 9cee26031015 scripts: kernel-doc: fix parsing function-like typedefs
> 5c0aa48d046d scripts: kernel-doc: Restore anonymous enum parsing
> 
> 5.15
> 1d9bd723e7b4 stddef: Introduce DECLARE_FLEX_ARRAY() helper
> d57ab893cdf8 stddef: Introduce struct_group() helper macro
> 
> This should hopefully alleviate concerns about backporting troubles
> due to this reindent. I also volunteer to help with anything that
> needs to be backported across this patch.
> 
>  scripts/kernel-doc | 2522 ++++++++++++++++++++++----------------------
>  1 file changed, 1258 insertions(+), 1264 deletions(-)
> 

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Thanks.

-- 
#Randy




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux