libfn / functional

Extending C++ library for functional programming
ISC License
60 stars 8 forks source link

Add pre-commit support for clang-format #117

Closed Twon closed 20 hours ago

codecov[bot] commented 1 day ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.0%. Comparing base (2fd311c) to head (4ccfde9). Report is 3 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/libfn/functional/pull/117/graphs/tree.svg?width=650&height=150&src=pr&token=3RHT38SEU0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libfn)](https://app.codecov.io/gh/libfn/functional/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libfn) ```diff @@ Coverage Diff @@ ## main #117 +/- ## ======================================= Coverage 100.0% 100.0% ======================================= Files 20 20 Lines 858 858 Branches 121 121 ======================================= Hits 858 858 ``` [![Impacted file tree graph](https://app.codecov.io/gh/libfn/functional/pull/117/graphs/tree.svg?width=650&height=150&src=pr&token=3RHT38SEU0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libfn)](https://app.codecov.io/gh/libfn/functional/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libfn)
Bronek commented 1 day ago

I'd be happy to take changes in README.md and new file .pre-commit-config.yaml, also with more checks enabled (and also version of clang-format changed to 18.1.8). I am more than happy to support developers who use (or want to use) pre-commit in their local workflow.

As for using pre-commit in github actions workflow, I am not sure about it - I could be convinced in the future. At this moment I'd rather not perform any installation steps inside the workflow; this is currently met by using the container images as defined in ci/build (and built by the ci workflow) which installs clang from https://apt.llvm.org/