Wednesday, November 11, 2020

Re: clang formating

Hi Gisle,

`file` is not a placeholder but the literal argument. `--style=file`
tells `clang-format` to search for a `.clang-format` file in the current
and parent folders.

Cheers
Johannes

On 11.11.20 13:19, Gisle Vanem wrote:
> Johannes Demel wrote:
>
>> unless the clang-format behavior changed, the function call should be:
>>
>> clang-format --style=file -i path/to/file.cc
>>
>> The `--style=file` option tells clang-format to search for a
>> `.clang-format` file.
>
> Does not work on Windows (using clang-format v10.0.0).
> In a .bat-file I have:
>   clang-format.exe -style=%GR_ROOT%/.clang-format -i %*
>
> No matter how style is; '--style' or '-style', it
> says 'Invalid value for -style'.
>
> Only these values works:
>   LLVM, Google, Chromium, Mozilla, WebKit.
> which all are equally ugly.
>

No comments:

Post a Comment