[GRASS-dev] pre-commit hooks

Hi again,

a former colleague recommended using pre-commit hooks for python projects:
https://pre-commit.com/

For people like me who often forget to run black or flake8 before pushing to github, using pre-commit hooks may be helpful. I have not tried myself yet, but if you consider that useful for the project, I could have a look at this and maybe come up with a suggestion for how to implement (including opt-out / opt-in possibilities)…

Cheers
Stefan

Hi Stefan,

On Wed, 5 Oct 2022 at 07:31, Stefan Blumentrath <Stefan.Blumentrath@gmx.de> wrote:

… come up with a suggestion for how to implement (including opt-out / opt-in possibilities)…

I thought pre-commit hooks are always opt-in. In any case, that’s probably the first thing which would inform other decisions.

Best,
Vaclav

Ok, will try and then report back.

Gesendet: Donnerstag, 06. Oktober 2022 um 13:33 Uhr
Von: “Vaclav Petras” wenzeslaus@gmail.com
An: “Stefan Blumentrath” Stefan.Blumentrath@gmx.de
Cc: grass-dev@lists.osgeo.org
Betreff: Re: [GRASS-dev] pre-commit hooks

Hi Stefan,

On Wed, 5 Oct 2022 at 07:31, Stefan Blumentrath <Stefan.Blumentrath@gmx.de> wrote:

… come up with a suggestion for how to implement (including opt-out / opt-in possibilities)…

I thought pre-commit hooks are always opt-in. In any case, that’s probably the first thing which would inform other decisions.

Best,
Vaclav