Add pre-commit actions #33
Labels
development
Features/Tools related to development of GridKit, rather than use as a library.
enhancement
New feature or request
We should add
clang-format
and any linters to pre-commit actions. There are a variety of ways that we can implement these actions, but these are the three ways forward I can see:pre-commit
hooks in Git's hook system.clang-format
, for instance, is already installed, aclang-format
hook would install a separate version ofclang-format
specifically for the hook). Python also is added as a dependency.It's also worth noting that all of the above options are entirely opt-in... since Git hooks don't get pushed to the repository, there must be some additional effort put in by the developer to enable these hooks, so we can't depend on developers enabling these hooks. These hooks should only be considered, then, to be warnings or handy conveniences. If we want actual enforcement, then we need to actually put them in CI (#25)
In my opinion, I'm leaning towards option 2 (or 3 if we don't want extra dependencies) since I think we're going to be adding Python as somewhat of a dev dependency for spack anyway (#24).
The text was updated successfully, but these errors were encountered: