The command line argument -style=<string> has been extended so that a specific format file at location <format_file_path> can be selected. This is supported via the syntax: -style=file:<format_file_path>.
Given that the default clang-format version in Ubuntu 22.04 is >=14~, it's reasonable to expect that the configuration file argument will just be passed as a file path to the invoked clang-format binary (for appropriate versions) rather than as a dumped YAML stream.
Why?
The main use-case for this feature request is to handle cases like #364, where multiple configurations for different languages mean that there are multiple YAML documents in the same file. The YAML load API does not like this, even though this is a perfectly fine use of the clang-format configuration.
What?
From the clang-format v14.0.0 changelog:
Given that the default clang-format version in Ubuntu 22.04 is >=14~, it's reasonable to expect that the configuration file argument will just be passed as a file path to the invoked clang-format binary (for appropriate versions) rather than as a dumped YAML stream.
Why?
The main use-case for this feature request is to handle cases like #364, where multiple configurations for different languages mean that there are multiple YAML documents in the same file. The YAML load API does not like this, even though this is a perfectly fine use of the clang-format configuration.