CSSUoB / TeX-Bot-Py-V2

TeX-Bot, but back in Python! (V2)
Apache License 2.0
2 stars 6 forks source link

Add more linting workflows #159

Open CarrotManMatt opened 10 months ago

CarrotManMatt commented 10 months ago

Add linters for more file types: Dockerfile, YAML, etc. Some libraries already exist:

Pre-commit hooks should also be added. See: https://github.com/CarrotManMatt/RateMyModule/blob/main/.pre-commit-config.yaml & https://github.com/CarrotManMatt/rcft-pymarkdown/blob/main/.pre-commit-config.yaml

It would also be helpful to investigate whether Dependabot update checking can be used with Poetry's dependency format.

codemicro commented 5 months ago

May I suggest Black? It'll very happily solve a lot of the code formatting qualms for you, and it has a check mode

CarrotManMatt commented 5 months ago

Most of the linting features provided by black are already available in the tool ruff that we use. It also contains checking rules for other tools beyond black, like pylint, flake8 & pyflakes. These pre-commit checks are more intented to aid in non-python specific formatting beyond the scope of ruff/black. For example gitleaks that scans to check for possible tokens/passwords accidentally added even before a commit is made, or hadolint that will lint our Dockerfile.

CarrotManMatt commented 4 months ago

Dependabot update checking is added in #275