|
| 1 | +fail_fast: true |
| 2 | +repos: |
| 3 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 4 | + rev: v5.0.0 |
| 5 | + hooks: |
| 6 | + - id: check-toml |
| 7 | + name: "[py - check] check toml" |
| 8 | + - id: end-of-file-fixer |
| 9 | + name: "[py - check] validate yaml" |
| 10 | + - id: no-commit-to-branch |
| 11 | + name: "[git - check] no commit to branch" |
| 12 | + args: [ --branch=main ] |
| 13 | + - id: trailing-whitespace |
| 14 | + name: "[file - format] trim trailing whitespace" |
| 15 | + args: [ --markdown-linebreak-ext=md ] |
| 16 | + - id: check-added-large-files |
| 17 | + name: "[file - check] large file" |
| 18 | + args: [ --maxkb=2000 ] |
| 19 | + - id: check-docstring-first |
| 20 | + name: "[py - check] docstring first" |
| 21 | + files: /examples |
| 22 | + types : [file, python ] |
| 23 | + - id: check-json |
| 24 | + name: "[json - check] validate json" |
| 25 | + - id: check-merge-conflict |
| 26 | + name: "[git - check] merge conflict" |
| 27 | + - id: debug-statements |
| 28 | + name: "[py - check] debug statements" |
| 29 | + - id: detect-private-key |
| 30 | + name: "[cred - check] private keys" |
| 31 | + - id: fix-encoding-pragma |
| 32 | + name: "[file - format] coding pragma" |
| 33 | + args: [ --remove ] |
| 34 | + - id: mixed-line-ending |
| 35 | + name: "[file - format] mixed line ending" |
| 36 | + args: [ --fix=auto ] |
| 37 | + - id: pretty-format-json |
| 38 | + name: "[json - format] pretty json" |
| 39 | + args: [ --autofix, |
| 40 | + --indent=4, |
| 41 | + --no-sort-keys ] |
| 42 | + - id: requirements-txt-fixer |
| 43 | + name: "[reqs - format] fix requirements.txt" |
| 44 | + - id: check-yaml |
| 45 | + name: "[yaml - check] validate yaml" |
| 46 | + - repo: https://github.com/pycqa/flake8 |
| 47 | + rev: 7.1.1 |
| 48 | + hooks: |
| 49 | + - id: flake8 |
| 50 | + additional_dependencies: [Flake8-pyproject] |
| 51 | + name: "[py - check] flake8" |
| 52 | + exclude: ^(examples/|tests/) |
| 53 | +# - repo: https://github.com/pycqa/docformatter |
| 54 | +# rev: v1.4 |
| 55 | +# hooks: |
| 56 | +# - id: docformatter |
| 57 | +# name: "[py - format] docformatter" |
| 58 | +# description: 'Formats docstrings to follow PEP 257.' |
| 59 | +# entry: docformatter |
| 60 | +# args: [-i] |
| 61 | +# language: python |
| 62 | +# types: [python] |
| 63 | +# - repo: https://github.com/pycqa/pydocstyle |
| 64 | +# rev: 6.3.0 |
| 65 | +# hooks: |
| 66 | +# - id: pydocstyle |
| 67 | +# name: "[py - check] pydocstyle" |
| 68 | +# files: ^hydrolib/.*\.py$ |
| 69 | + - repo: https://github.com/pycqa/isort |
| 70 | + rev: 5.13.2 |
| 71 | + hooks: |
| 72 | + - id: isort |
| 73 | + name: "[py - format] isort" |
| 74 | + - repo: https://github.com/psf/black |
| 75 | + rev: 24.10.0 |
| 76 | + hooks: |
| 77 | + - id: black |
| 78 | + - repo: https://github.com/lovesegfault/beautysh |
| 79 | + rev: v6.2.1 |
| 80 | + hooks: |
| 81 | + - id: beautysh |
| 82 | + name: "[bash - format] beautysh" |
| 83 | + |
| 84 | + - repo: https://github.com/detailyang/pre-commit-shell |
| 85 | + rev: 1.0.5 |
| 86 | + hooks: |
| 87 | + - id: shell-lint |
| 88 | + name: "[bash - lint] shell-lint" |
| 89 | + |
| 90 | + - repo: https://github.com/rlindsgaard/pre-commit-commit-msg-hooks |
| 91 | + rev: 0.1.0 |
| 92 | + hooks: |
| 93 | + - id: check-description-max-length |
| 94 | + name: "[bash - format] check-description-max-length" |
| 95 | + - id: check-second-line-empty |
| 96 | + name: "[bash - format] check-second-line-empty" |
| 97 | + - id: check-summary-capitalized |
| 98 | + name: "[bash - format] check-summary-capitalized" |
| 99 | + - id: check-summary-imperative |
| 100 | + name: "[bash - format] check-summary-imperative" |
| 101 | + - id: check-summary-max-length |
| 102 | + name: "[bash - format] check-summary-max-length" |
| 103 | + - id: check-summary-punctuation |
| 104 | + name: "[bash - format] check-summary-punctuation" |
| 105 | + |
| 106 | + - repo: https://github.com/PyCQA/bandit |
| 107 | + rev: 1.7.5 |
| 108 | + hooks: |
| 109 | + - id: bandit |
| 110 | + args: ["--skip=B101"] |
| 111 | + |
| 112 | + - repo: https://github.com/gitleaks/gitleaks |
| 113 | + rev: v8.17.0 |
| 114 | + hooks: |
| 115 | + - id: gitleaks |
| 116 | + |
| 117 | + - repo: https://github.com/Yelp/detect-secrets |
| 118 | + rev: v1.4.0 |
| 119 | + hooks: |
| 120 | + - id: detect-secrets |
| 121 | + - repo: https://github.com/bridgecrewio/checkov |
| 122 | + rev: 2.1.63 |
| 123 | + hooks: |
| 124 | + - id: checkov |
| 125 | + |
| 126 | + - repo: https://github.com/trufflesecurity/truffleHog |
| 127 | + rev: v3.88.2 |
| 128 | + hooks: |
| 129 | + - id: trufflehog |
| 130 | + |
| 131 | + - repo: local |
| 132 | + hooks: |
| 133 | + - id: safety |
| 134 | + name: Safety Check |
| 135 | + entry: safety check --full-report |
| 136 | + language: system |
| 137 | + types: [python] |
| 138 | + pass_filenames: false |
| 139 | + |
| 140 | +# - repo: local |
| 141 | +# hooks: |
| 142 | +# - id: pytest-check |
| 143 | +# name: pytest-check |
| 144 | +# entry: pytest -vvv --cov=hydrolib --cov-report term-missing |
| 145 | +# language: system |
| 146 | +# pass_filenames: false |
| 147 | +# always_run: true |
| 148 | + |
| 149 | + - repo: local |
| 150 | + hooks: |
| 151 | + - id: examples-notebook-check |
| 152 | + name: nbval |
| 153 | + entry: pytest --nbval |
| 154 | + language: system |
| 155 | + files: \.ipynb$ |
| 156 | + |
| 157 | +# - repo: local |
| 158 | +# hooks: |
| 159 | +# - id: doctest |
| 160 | +# name: doctest |
| 161 | +# entry: pytest --doctest-modules |
| 162 | +# language: system |
| 163 | +# files: ^hydrolib/.*\.py$ |
0 commit comments