gdal icon indicating copy to clipboard operation
gdal copied to clipboard

PROPOSAL: pre-commit for code lint checks

Open snowman2 opened this issue 2 years ago • 1 comments

What are the current thoughts on using pre-commit for code linter support? The checks are run with each commit and can work as an as-you-go type thing. You can also run pre-commit run --all-files.

Examples:

Here are some potentially useful ones:

  • black - really nice because it forces all programmers on the project to use the same code style regardless of our individual preferences
  • isort
  • flake8

snowman2 avatar Aug 07 '22 01:08 snowman2

What are the current thoughts on using pre-commit for code linter support?

why not, although I'm not familar at all with it, but from a cursory review, this looks non intrusive. We should just make sure there isn't too much copy&paste / duplication between CI checks and pre-commit, to avoid updating one place and forgetting the other one

rouault avatar Aug 08 '22 08:08 rouault