8

I cannot understand the following text from the clang-format manual:

.clang-format file located in one of the parent
directories of the source file (or current
directory for stdin).

What does "current directory for stdin" mean? Is it the current directory or the stdin?

Is it possible to specify the .clang-format location by a full path?

timrau
  • 22,578
  • 4
  • 51
  • 64
Endre
  • 374
  • 6
  • 18

2 Answers2

9

It is the current directory. And there is no way to set .clang-format path. clang-format only scans from the directories and up until it encounters the file.

Yoonian
  • 547
  • 9
  • 13
0

Concerning VSCode I found this feature request: https://github.com/microsoft/vscode-cpptools/issues/3675

So it is currently not supported to specify the .clang-format location by a full path.