How to use different format for C and C++?

Viewed 1079

In our project, we have C and C++ files. These files do not follow the same guidelines. Is there any way to distinguish between C and C++ in clang-format?

You can declare several languages in a .clang-format file but it does not recognize Language:C unfortunately.

Do we have to declare multiple .clang-format files in different directories (based on which language this directory contains)?

Ideally, we would like to use -style=file and be able to run clang-format on each file in our project.

0 Answers
Related