[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 20:13:09 PDT 2024
owenca wrote:
@jediry, can you open a github issue for this?
We probably should continue the discussion on your [RFC](https://discourse.llvm.org/t/rfc-clang-format-option-to-include-another-configuration-file/74891) before getting into the details of the implementation. At the very least, I need to understand what exactly you are proposing to extend `BasedOnStyle` from the user's perspective. (See [here](https://clang.llvm.org/docs/ClangFormat.html#clang-format-ignore) for an example.)
Some questions off the top of my head:
- Should both absolute and relative file paths be supported?
- How would the other configs in the .clang-format file work with the imported ones?
- What happens if the imported config file also imports another config file, possibly the one that imports it?
- Is the search path (or environment variable) mechanism necessary?
https://github.com/llvm/llvm-project/pull/107312
More information about the cfe-commits
mailing list