Skip to content
Snippets Groups Projects
Commit 60f5fd20 authored by nimrod's avatar nimrod
Browse files

pre-commit hooks.

Update, cleanup the file, replace my shellcheck hook with one that has
the binary bundled in the Python package, remove duplicate Python hooks
(prospector wraps quite a few linters).
parent cb86f75e
No related branches found
No related tags found
No related merge requests found
Pipeline #281 passed
# vim:ff=unix ts=2 sw=2 ai expandtab # vim:ff=unix ts=2 sw=2 ai expandtab
--- ---
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.4.0 rev: v3.4.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
...@@ -12,43 +12,30 @@ repos: ...@@ -12,43 +12,30 @@ repos:
myclirc|netrc|packet-cli|mycli-history|scwrc|gcloud\.json|\.envrc\.private myclirc|netrc|packet-cli|mycli-history|scwrc|gcloud\.json|\.envrc\.private
- id: detect-private-key - id: detect-private-key
- id: trailing-whitespace - id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git - repo: https://github.com/ambv/black.git
rev: v0.6.0 rev: 20.8b1
hooks: hooks:
- id: shell-lint - id: black
exclude: &excluded_shellscripts |- exclude: &excluded_pythonscripts pythonrc.py|rabbitmqadmin
\.bash_completion\.d/(docker-machine\.bash|fabric-completion.bash|docker-compose)|\.travis/travis\.sh|toolbox args:
- id: shellcheck - |
exclude: *excluded_shellscripts --line-length=79
- id: shell-lint
name: shell-lint .bashrc - repo: https://github.com/adrienverge/yamllint.git
files: \.bashrc rev: v1.25.0
types: [text]
- id: shellcheck
name: Shellcheck .bashrc
files: \.bashrc
types: [text]
- repo: https://github.com/adrienverge/yamllint
rev: v1.19.0
hooks: hooks:
- id: yamllint - id: yamllint
- repo: https://github.com/amperser/proselint/
- repo: https://github.com/amperser/proselint.git
rev: 0.10.2 rev: 0.10.2
hooks: hooks:
- id: proselint - id: proselint
types: [plain-text] types: [plain-text]
exclude: LICENSE exclude: LICENSE
- repo: https://github.com/ambv/black
rev: 19.10b0 - repo: https://github.com/PyCQA/prospector.git
hooks: rev: 1.3.1
- id: black
exclude: &excluded_pythonscripts pythonrc.py|rabbitmqadmin
args:
- |
--line-length=79
- repo: https://github.com/PyCQA/prospector
rev: 1.1.7
hooks: hooks:
- id: prospector - id: prospector
exclude: *excluded_pythonscripts exclude: *excluded_pythonscripts
...@@ -56,37 +43,60 @@ repos: ...@@ -56,37 +43,60 @@ repos:
- |- - |-
--max-line-length=79 --max-line-length=79
- |- - |-
--tool=pyroma --with-tool=pyroma
- |-
--with-tool=bandit
- |-
--without-tool=pep257
- |- - |-
--tool=dodgy --doc-warnings
- |-
--test-warnings
- |-
--full-pep8
- |-
--strictness=high
- |-
--no-autodetect
additional_dependencies: additional_dependencies:
- bandit
- pyroma - pyroma
- dodgy
- repo: https://gitlab.com/pycqa/flake8 - repo: https://gitlab.com/pycqa/flake8.git
rev: 3.7.9 rev: 3.8.4
hooks: hooks:
- id: flake8 - id: flake8
exclude: *excluded_pythonscripts exclude: *excluded_pythonscripts
args: args:
- |- - |-
--max-line-length=79 --doctests
additional_dependencies: additional_dependencies:
- flake8-bugbear - flake8-bugbear
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.4.4
hooks: - repo: https://github.com/Yelp/detect-secrets.git
- id: pylint rev: v0.14.3
exclude: *excluded_pythonscripts
args:
- |-
--disable=R0801
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
exclude: *excluded_pythonscripts
- repo: https://github.com/Yelp/detect-secrets
rev: v0.13.0
hooks: hooks:
- id: detect-secrets - id: detect-secrets
exclude: rabbitmqadmin|\.config/git/config|Pipfile\.lock exclude: rabbitmqadmin|\.config/git/config|Pipfile\.lock
- repo: https://git.shore.co.il/nimrod/shell-pre-commit.git
rev: v0.6.0
hooks:
- id: shell-lint
exclude: &excluded_shellscripts |-
\.bash_completion\.d/(docker-machine\.bash|fabric-completion.bash|docker-compose)|\.travis/travis\.sh|toolbox
- id: shell-lint
name: shell-lint .bashrc
files: \.bashrc
types: [text]
- repo: https://github.com/shellcheck-py/shellcheck-py.git
rev: v0.7.1.1
hooks:
- id: shellcheck
exclude: *excluded_shellscripts
- id: shellcheck
name: Shellcheck .bashrc
files: \.bashrc
types: [text]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment