forked from pschmitt/roombapy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add pre commit Signed-off-by: Joostlek <joostlek@outlook.com> * Add pre commit Signed-off-by: Joostlek <joostlek@outlook.com> * Add pre commit Signed-off-by: Joostlek <joostlek@outlook.com> * Add pre commit Signed-off-by: Joostlek <joostlek@outlook.com> --------- Signed-off-by: Joostlek <joostlek@outlook.com>
- Loading branch information
Showing
5 changed files
with
453 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: ruff-check | ||
name: 🐶 Ruff Linter | ||
language: system | ||
types: [python] | ||
entry: poetry run ruff check --fix | ||
require_serial: true | ||
stages: [commit, push, manual] | ||
- id: ruff-format | ||
name: 🐶 Ruff Formatter | ||
language: system | ||
types: [python] | ||
entry: poetry run ruff format | ||
require_serial: true | ||
stages: [commit, push, manual] | ||
- id: check-ast | ||
name: 🐍 Check Python AST | ||
language: system | ||
types: [python] | ||
entry: poetry run check-ast | ||
- id: check-case-conflict | ||
name: 🔠 Check for case conflicts | ||
language: system | ||
entry: poetry run check-case-conflict | ||
- id: check-docstring-first | ||
name: ℹ️ Check docstring is first | ||
language: system | ||
types: [python] | ||
entry: poetry run check-docstring-first | ||
- id: check-executables-have-shebangs | ||
name: 🧐 Check that executables have shebangs | ||
language: system | ||
types: [text, executable] | ||
entry: poetry run check-executables-have-shebangs | ||
stages: [commit, push, manual] | ||
- id: check-json | ||
name: { Check JSON files | ||
language: system | ||
types: [json] | ||
entry: poetry run check-json | ||
- id: check-merge-conflict | ||
name: 💥 Check for merge conflicts | ||
language: system | ||
types: [text] | ||
entry: poetry run check-merge-conflict | ||
- id: check-symlinks | ||
name: 🔗 Check for broken symlinks | ||
language: system | ||
types: [symlink] | ||
entry: poetry run check-symlinks | ||
- id: check-toml | ||
name: ✅ Check TOML files | ||
language: system | ||
types: [toml] | ||
entry: poetry run check-toml | ||
- id: check-xml | ||
name: ✅ Check XML files | ||
entry: check-xml | ||
language: system | ||
types: [xml] | ||
- id: check-yaml | ||
name: ✅ Check YAML files | ||
language: system | ||
types: [yaml] | ||
entry: poetry run check-yaml | ||
- id: detect-private-key | ||
name: 🕵️ Detect Private Keys | ||
language: system | ||
types: [text] | ||
entry: poetry run detect-private-key | ||
- id: end-of-file-fixer | ||
name: ⮐ Fix End of Files | ||
language: system | ||
types: [text] | ||
entry: poetry run end-of-file-fixer | ||
stages: [commit, push, manual] | ||
- id: mypy | ||
name: 🆎 Static type checking using mypy | ||
language: system | ||
types: [python] | ||
entry: poetry run mypy | ||
require_serial: true | ||
- id: no-commit-to-branch | ||
name: 🛑 Don't commit to main branch | ||
language: system | ||
entry: poetry run no-commit-to-branch | ||
pass_filenames: false | ||
always_run: true | ||
args: | ||
- --branch=main | ||
- id: poetry | ||
name: 📜 Check pyproject with Poetry | ||
language: system | ||
entry: poetry check | ||
pass_filenames: false | ||
always_run: true | ||
- id: trailing-whitespace | ||
name: ✄ Trim Trailing Whitespace | ||
language: system | ||
types: [text] | ||
entry: poetry run trailing-whitespace-fixer | ||
stages: [commit, push, manual] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.