Lefthook: format py files on commit
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Refer for explanation to following link:
|
||||
# https://lefthook.dev/configuration/
|
||||
|
||||
glob_matcher: doublestar
|
||||
|
||||
templates:
|
||||
av-hooks-dir: "/home/av/projects/private/git-hooks"
|
||||
|
||||
@@ -12,3 +14,7 @@ pre-commit:
|
||||
|
||||
- name: "check secret files"
|
||||
run: "python3 {av-hooks-dir}/pre-commit/check-secrets-encrypted-with-ansible-vault.py"
|
||||
|
||||
- name: "format python"
|
||||
glob: "**/*.py"
|
||||
run: "black --quiet {staged_files}"
|
||||
|
||||
Reference in New Issue
Block a user