c4dt / showcase

Code that helps organize the labs' projects and present them nicely
0 stars 1 forks source link

Add linters to the pre-commit hook #312

Closed lanterno closed 3 months ago

lanterno commented 1 year ago

Our current pre-commit hook includes the "prettier" linter, which ensures the YAML data files look nice.

In this ticket, I'm suggesting we also add:

  1. check-yaml
  2. end-of-file-fixer
  3. trailing-whitespace
  4. check-added-large-files

As basic checks for non-python files.

And more importantly, for python files:

  1. Black - For highly opinionated linting
  2. isort - Ensuring a consistent ordering for imports
  3. [Optional] https://github.com/pre-commit/mirrors-yapf

I also considered adding flake8 to the tooling, but it would introduce some incompatibility with black, and our first goal is to maintain a fast development workflow rather than the best looking code.

lanterno commented 3 months ago

I would kill this ticket for now. The topic will be revisited on the new iteration on the project.