CADET-Core icon indicating copy to clipboard operation
CADET-Core copied to clipboard

Add auto formatting and pre-commit

Open jbreue16 opened this issue 10 months ago • 2 comments

As per discussion in #402

Todo

  • [ ] Fixes #99
  • [ ] Mention this in contributing.md, see https://github.com/cadet/CADET-Project-Management/issues/91

jbreue16 avatar May 06 '25 08:05 jbreue16

Note, for now the PR only includes a .pre-commit file. This only performs a very limited number of formatting steps (e.g. removing trailing whitespace). clang-format still would need to be configured (but could also be added to the pre-commit hook.

Note, we also need to add instructions on how to install pre-commit, e.g.:

sudo apt install pre-commit

and how to activate it:

pre-commit install

schmoelder avatar May 06 '25 09:05 schmoelder

PR is probably also a duplicate of #148

schmoelder avatar May 06 '25 09:05 schmoelder