Skip to content

Add pre-commit hooks to prevent issues with build tools earlier #64

@kinow

Description

@kinow

Suggested by @sgaist (thanks!). We have pull requests where contributors may spend a long time trying to fix the build (especially around things like 80 characters-lines, and simple unit tests).

It is simply impossible to wait for the functional tests, or even the unit tests I think, as you wouldn't want to wait 1 minute for a git commit ... to finish. So the hook must be kept as simple as possible.

Example of hooks from other projects:

This also means that users contributing to the project are not able to commit without a working environment (well, there's always --no-verify I guess). For JupyterHub, last time I tried to commit something there, it raised an error and asked me to activate my virtualenvironment if I remember well 👍

EDIT: list of projects that would need the pre-commit hooks added:

  • cylc/cylc-flow
  • cylc/cylc-uiserver
  • cylc/cylc-ui
  • cylc/cylc-doc
  • cylc/cylc-xtriggers
  • cylc/cylc-sphinx-extensions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions