Re: [PATCH v2 0/3] clang-format: modify rules to reduce false-positives

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:

> This series is in response to an email thread [1] around the usage of
> '.clang-format' and its effectiveness.
>
> The goal of the series is to improve the usage of 'clang-format' in the
> repository. To do this we:
> 1. Reduce the number of false positives. Majority of which is due to
>    line-wrapping. We remove the 'ColumnLimit' from 'clang-format'. This
>    removes the responsibility of line-wrapping from 'clang-format' and puts
>    it into the hands of the user.
> 2. Add a rule to 'meson' to run 'git clang-format' by running 'meson
>    compile style'.
> 3. Make the 'RemoveBracesLLVM' permanent by moving it to
>    '.clang-format'.

Thanks for working on this. While the changes are not huge, I appreciate
them.

> With this, running `git clang-format` for the last 25 commits in master,
> seems to produce much less false positives.
>
> [snip]
>
>   diff --git a/pathspec.h b/pathspec.h
>   index 5e3a6f1fe7..601b9ca201 100644
>   --- a/pathspec.h
>   +++ b/pathspec.h
>   @@ -80,7 +80,7 @@ struct pathspec {
>     * For git diff --no-index, indicate that we are operating without
>     * a repository or index.
>     */
>   -#define PATHSPEC_NO_REPOSITORY (1<<7)
>   +#define PATHSPEC_NO_REPOSITORY (1 << 7)

I'm surprised, but I couldn't find a setting to change this...


-- 
Cheers,
Toon




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux