[cfe-dev] how clang-tidy finds clang-format file

Adam Cieszkiel via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 20 13:25:30 PDT 2017


Hello,

I have a question:
Do you know maybe how to make clang-tidy in version 4.0 use formatting
style for fixes (-fix) from .clang-format file?

I tried in many different ways but I failed.

Documentation mentions 'clang-format config file to be found' but anywhere
I put it, it is still not used by clang-tidy also if I put in in location
pointed by '-p' option.

http://releases.llvm.org/4.0.0/tools/clang/tools/extra/
docs/clang-tidy/index.html

-style=<string>              -
Fallback style for reformatting after inserting fixes
               if there is no clang-format config file found.

I have no idea where I should put .clang-format file so it could be used by
clang-tidy for applying clang-tidy fixes.

Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170720/6f37cea1/attachment.html>


More information about the cfe-dev mailing list