awkward icon indicating copy to clipboard operation
awkward copied to clipboard

Introduce clang-format in pre-commit

Open jpivarski opened this issue 1 year ago • 2 comments

(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.

jpivarski avatar Oct 27 '22 16:10 jpivarski

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.

jpivarski avatar Jan 05 '23 14:01 jpivarski

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.

jpivarski avatar Jan 20 '24 00:01 jpivarski