ansys / openapi-common

Common authentication components for OpenAPI client libraries
https://openapi.docs.pyansys.com/
MIT License
2 stars 0 forks source link

pre-commit hooks #59

Closed beliaev-maksim closed 2 years ago

beliaev-maksim commented 2 years ago

hi guys, I suggest to remove .githooks

and create .pre-commit-config.yaml file, like here https://github.com/ansys/aedt-testing/blob/master/.pre-commit-config.yaml

you can add installation of the hooks automatically via Makefile

setup-git: install-pre-commit
    pre-commit install
da1910 commented 2 years ago

Changing to flit has removed the need for pre-commit hooks. In general I like the idea of them but the execution is dreadful, why are they not stored as part of the repository and therefore shareable by default?

For what it's worth, most people who use Granta MI do so from windows, and are unlikely to have CMake, so most of the make-based automations for installing hooks are less helpful. I will look at that package though, I've seen it mentioned in a few places.

beliaev-maksim commented 2 years ago

first of all you can install make via chocolatey

even if not, just do

pip install pre-commit
pre-commit install

githooks are not stored in repo since it is a part of user environment

da1910 commented 2 years ago

Changing to flt removes the necessity for the pre-commit hook, closing.