Re: [PATCH v3 8/8] ci/style-check: add `RemoveBracesLLVM` to '.clang-format'

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:

> +# [1]: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removebracesllvm
> +echo "RemoveBracesLLVM: true" >> .clang-format
> +
>  git clang-format --style file --diff --extensions c,h "$baseCommit"

Style: lose the SP between the redirection operator and its operand.

I know this is well intentioned, but will there be any downsides for
running the check always against a dirty working tree?  

I know during a CI run, the working tree will not be completely
clean, as we create and leave build artifacts, but this is as far as
I know the first instance of us munging a tracked path, changing the
working tree in a way that "git describe --dirty" would notice.

This is done as the last (and only) step of check-style job and the
ci/run-style-check.sh script may not do anything like "git describe
--dirty" right now, but things can change.  Perhaps I am worried
about this a bit too much.

I unfortunately couldn't find an option to "git clang-format" to
tell it to read from an extra file in addition to the usual
".clang-format" file---if such an option existed, we obviously could
use an untracked/ignored file to prepare the custom format file and
use it without making the working tree dirty.

So perhaps the posted change, while making us feel dirty, is the
best we could do for this step.

Thanks.






[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