Skip to content

Commit

Permalink
#114 Initial pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
whatnick authored and uchchwhash committed Jul 12, 2021
1 parent ee17ae5 commit 6fe5241
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.9.2
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
hooks:
- id: bandit
- repo: https://github.com/PyCQA/pylint
rev: v2.9.3
hooks:
- id: pylint
2 changes: 2 additions & 0 deletions lint-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set -eu
set -x

isort --check --diff .
# Consider replacing pycodestyle with autopep8 or flake8
# See discussions here : https://github.com/pre-commit/pre-commit-hooks/issues/319
pycodestyle --max-line-length=120 datacube_wps tests
pylint -j 2 --reports no datacube_wps --disable=C,R,redefined-builtin,fixme,arguments-differ
bandit -s B101,B104 -r .
Expand Down

0 comments on commit 6fe5241

Please sign in to comment.