Skip to content

Commit

Permalink
.pre-commit-config.yaml add some more hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Jul 13, 2024
1 parent ab06de6 commit 964d591
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
# - id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
Expand All @@ -44,32 +44,53 @@ repos:
# conflict with black below
# - id: double-quote-string-fixer
- id: end-of-file-fixer
- id: file-contents-sorter
files: ^(deploy-whitelist.txt|\.gitignore|\.dockerignore)$
# - id: file-contents-sorter
# files: ^(deploy-whitelist.txt|\.gitignore|\.dockerignore)$
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ["--remove"]
- id: forbid-new-submodules
# - id: forbid-submodules
# args: ['--fix=lf']
- id: mixed-line-ending
args: ["--fix=lf"]
- id: name-tests-test
args: ["--pytest"]
# - id: no-commit-to-branch
# args: [--branch, staging]
# not, since it decodes utf-8
# - id: pretty-format-json
# args: ["--autofix"]
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"]
- id: requirements-txt-fixer
# - id: sort-simple-yaml
# files: ^config/simple/
- id: trailing-whitespace

# ruff
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.5.1"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

# security
- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
args: ["--skip", "B101"]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks

- repo: https://github.com/trufflesecurity/truffleHog
rev: v3.79.0
hooks:
- id: trufflehog

# minor formatting
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand All @@ -91,6 +112,7 @@ repos:
# hooks:
# - id: mypy

# markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
Expand All @@ -104,10 +126,11 @@ repos:
- id: cspell

# CRLF -> LF
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
# replaced by .gitattributes file
# - repo: https://github.com/Lucas-C/pre-commit-hooks
# rev: v1.5.5
# hooks:
# - id: remove-crlf

# # Perl
# - repo: https://github.com/henryykt/pre-commit-perl
Expand Down

0 comments on commit 964d591

Please sign in to comment.