clang-format-action
clang-format-action copied to clipboard
Adds `format-filepath` to customize the filepath of `.clang-format`
See title.
This allows any file with valid clang format contents to be specified as the filepath.
In my organization this allows a submodule common across multiple C repositories to contain the clang-format, so an update of the submodule updates the styling across the org.
Closes #156
Should be ready. I needed to rename the format file not .clang-format so clang doesn't automatically find it and use it implicitly.
Please let me know if anything else is needed. Thanks for making a great action!
Wow big oversight on my part. The syntax I am using for clang-format style=file:
I pushed a fix to the CI for the clang 14+ failures.
Hey guys, how is this change progressing? This is something we are looking forward to. It would be great if we could get these changes integrated.
Hey - is this PR still being worked on?
Clang format before v14 does not have the filepath setting. Therefore in order to have passing CI behavior and correct operation on lower versions, I must re-arrange the way we test the format filepath setting. Ill work on that in the next week or two.
@jidicula I may be backwards here, however I am very confused as to how the current CI detects the test/format_files/.clang_format? I was under the impression the root of the github workspace is used, and clang-format traverses up to find the file? Or does the test suite only make use of the fallback style?