Fix braces and add .clang-format to keep the directory formatted.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unfortunately this is causing the failing the "premerge checks" on reviews likely because this machine is using an earlier version of clang-format
To be honest, I'd love to fix this by making this "unknown key" just a warning. For some keys we don't need them to be recognized (this is one, RemoveBracesLLVM is another)
Isn't this the case for any new option? IMO anyone who updated the source to include a new option should build a new clang-format and use that for pre-merge checks.
I'm not sure what version of clang-format they use in the premerge checks, I don't know who we contact to get it updated. I guess the clang-format check might come before any building of the code.
You know if we relex the "Unknown" YAML option, this would go a long way not only to help us here but also to that situation where new options break people using older clang-format version.
+1.
You know if we relex the "Unknown" YAML option, this would go a long way not only to help us here but also to that situation where new options break people using older clang-format version.
Changing an unknown/misspelled-option error to a warning will also change the return code of clang-format. That would be unacceptable to a lot people, I believe.
In general, new options won't cause problems for people unless they add them to config files without updating clang-format. The situation with clang-format sources is very unique and rarely occurs, so it's probably better to just leave it as is.