git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

C/C++ hooks: cppcheck and include-what-you-use

Open edrex opened this issue 2 years ago • 2 comments

I'm setting up CI for a C/C++ project at https://github.com/alex-courtis/way-displays/pull/86. cppcheck and include-what-you-use are used, and I want to add pre-commit hooks for them.

There is an existing hooks repo that has these at https://github.com/pocc/pre-commit-hooks. The runner scripts are python 3. Does that disqualify them (python3 in nixpkgs has a 131MB closure), or is python3 already pulled in elsewhere?

Otherwise, what would be an ideal way, from the pre-commit-hooks.nix project perspective, to add these? I could just do local hooks for them, but I'd rather get it contributed up.

Thanks!

edrex avatar Apr 12 '23 18:04 edrex

python3 in nixpkgs has a 131MB closure

Looks like there is python3Minimal with 57.5MB closure size.

edrex avatar Apr 12 '23 18:04 edrex

If we can use python3minimal that would be great, note that it doesn't have the openssl (which should be fixed).

domenkozar avatar Jul 29 '23 10:07 domenkozar