Skip to content

Setup git hooks#158

Open
Stevinson wants to merge 1 commit intodevfrom
edward/setup-git-hooks
Open

Setup git hooks#158
Stevinson wants to merge 1 commit intodevfrom
edward/setup-git-hooks

Conversation

@Stevinson
Copy link
Copy Markdown
Collaborator

We have git hooks that run ruff (linter), black (code formatter), and isort (standardising imports), to improve maintainability of the code base.

To set these up all you need to do is run:

pre-commit install 

Now every time you try to make a commit, the hooks will run automatically on your staged files.

Further instructions:

  • To manually run the hooks on all files: pre-commit run --all-files
  • To manually run on staged files only: pre-commit run
  • To skip (not recommended) for a commit: git commit -m "your message" --no-verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant