Add linting as pre-commit hook
Feature request Add the linting which is already happening in the Gitlab CI pipeline to a pre-commit hook.
What does this feature / why does DuMux need it: It will prevent Gitlab CI pipelines from failing at the linting stage.
Anything else we need to know?: Related to #1320, but is much easier to implement, as the rules and most syntax already exist and just has to be put into a pre-commit file.
Implementation
- codespell: https://calmcode.io/pre-commit/spelling.html
- black: https://black.readthedocs.io/en/stable/integrations/source_version_control.html
- flake8: https://flake8.pycqa.org/en/latest/user/using-hooks.html
- pylint: https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html