Skip to content

Commit

Permalink
chore(commit): add pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
fenngwd committed Jun 8, 2022
1 parent 33fbd4f commit 830e336
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = app,blinker,cachext,celery,configs,google,grpc,helloworld_pb2,helloworld_pb2_grpc,mock,peewee,peeweext,pendulum,pkg_resources,pytest,sentry_sdk,setuptools,worldhello_pb2,worldhello_pb2_grpc
34 changes: 29 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v7.0.1
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v2.2.3
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
- id: trailing-whitespace
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [ --branch, master, --branch, develop ]
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.1
hooks:
- id: seed-isort-config
- repo: "https://github.com/pre-commit/mirrors-isort"
rev: v5.10.1
hooks:
- id: isort
- repo: "https://github.com/ambv/black"
rev: 22.3.0
hooks:
- id: black
language_version: python3
exclude: "(configs|protos|tests)"
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v2.2.3
hooks:
- id: flake8
exclude: "(configs|protos|tests)"
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
- id: gitlint

0 comments on commit 830e336

Please sign in to comment.