JamFactoryApp / jamfactory-backend

JamFactory - Your virtual DJ with a democratic playlist ♫ This is the backend of the JamFactory app
https://jamfactory.app
7 stars 1 forks source link

Add pre-commit hooks #96

Closed drjole closed 2 years ago

drjole commented 2 years ago

This is very useful for development. (Automated go fmt especially before every commit :tada:)

Refer to their page for installation instructions: https://pre-commit.com/#install

Once installed, you do not have to do anything besides re-adding changed files if a pre-commit hook "failed" which just means, that a hook actually did something (like having to change files with go fmt). You can review what the hook actually did but it should not destroy anything. You can, though, run the hooks manually with pre-commit run --all-files.

Python is required.

I added four hooks initially which you can see in the .pre-commit-config.yaml file.

drjole commented 2 years ago

The two other changed files in this commit were already changed by the new commit hooks.