awkward
awkward copied to clipboard
Introduce clang-format in pre-commit
(Almost) exactly following https://github.com/scikit-hep/fastjet/pull/125.
The first time we do this will be a big diff in the C++ files, but being in pre-commit will prevent trivial differences in C++ which might make our awkward-core testing infrastructure mandate a new release.
This is a low priority; nice to have before the 2.0.0 release (so that 2.0.0 onward has minimal C++ diffs), and it should be after the awkward/awkward-core split: PR #1778.
The first attempt at this was #1865.
But it should be reapplied to post-v2 code; it should be mostly LLVM style with a few exceptions, most of which were discussed in the comments on #1865.
There's also some configuration to help it find our *.h, *.cpp files, and *.cu (and *.cuh?), which are in a few strange places.
Note that #2902 was an attempt (now closed because it's stale). This is still a good thing to do, but it would have to be a concerted effort, since we only want to do it once.