open-plan-tool / gui

Energy Planning Application
Other
8 stars 4 forks source link

Feature/add pre commit hook for linting #217

Open 4lm opened 1 year ago

4lm commented 1 year ago

This PR is based on unmerged PR #197.

Closes #215.

@Bachibouzouk, please review this PR and merge on approval. But first, PR #197 needs to be fixed as spoken by you and merged because this PR depends on it.

This PR uses pre-commit for installing and managing Git hooks.

Initial installation:

The config can be found in .pre-commit-config.yaml in the root folder.

Hooks run before every commit.

Run changed files manually:

Run all files manually (recommended after installing a new hook):

Please note: I configured that hooks shall fail fast. This can result in running the commit (or pre-commit) multiple times. If we realize that this behavior is different from what we want to see, we can change it in the config in the future.