gammasim / simtools

Tools and applications for the Simulation System of the CTA Observatory.
https://gammasim.github.io/simtools
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Linter cleanup #942

Closed GernotMaier closed 4 months ago

GernotMaier commented 4 months ago

There is unnecessary duplication in the linters as implemented in the workflows (positive: better to test twice than not at all). This is amplfied by the recent introduction of added pre-commit runs over all files as CI and the introduction of ruff (not yet added to pre-commit, but planned).

This is the suggestion:

  1. Review pre-commit and make sure that any workflows which run reasonable fast are included.
  2. Remove duplications (e.g., flake8 is running in the pre-commits, in CI-linter and CI-unittests! Additionally, ruff is almost 100% compatible with flake8 tests)
  3. Replace pylint by ruff in pre-commit. Continue to run pylint in CI-linter
  4. Review if we need the super-linter workflow in CI-linter. Given that most linters run using the pre-commit workflows, it might be better to run the few which are not explicitly.
  5. If possible, configure tools in pyproject.toml (some tools recently introduced this; e.g., markdownlint)