No functional change intended
Details
- Reviewers
MyDeveloperDay klimek owenpan - Group Reviewers
Restricted Project - Commits
- rG86825dbe3306: [clang-format] Make '.clang-format' variants finding a loop (NFC)
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thank you for the patch,
I think this looks cleaner and generally LGTM, I think its always good to put a little description of the change along with the NFC in the title to let people know that functionally there isn't any change without them having to work through the code change. Maybe even giving a little rationale as to why you are thinking of making the change.. (which I see from D68569: [clang-format] Also look for .{ext}.clang-format file)
As I understand it, you have changed the code to read the configs from a list of file in a loop rather than reading one and then trying another if that cannot be found, subsequently, this would make it relatively easy to add higher priority search options without confusing the code
I think there is some commonality here that could be used with another suggestion which was to allow --style=<filename> D50147: clang-format: support external styles
Sorry that I havn't gotten back to this.
I started looking into the "PathMatch" idea I floated in D68569 ([clang-format] Also look for .{ext}.clang-format file). That would mean something entirely different than the patch in D68596, making this refactor less needed.
But I can still land it if you think it still relavant on its own.
But I can still land it if you think it still relevant on its own.
I think the design of working through the vector of files is more elegant, especially if we want to consider looking for other files in the future.