|
| 1 | +fail_fast: true |
1 | 2 | repos: |
2 | | -- repo: https://github.com/pre-commit/pre-commit-hooks |
3 | | - rev: v2.3.0 |
4 | | - hooks: |
5 | | - - id: end-of-file-fixer |
6 | | - name: "[py - check] validate yaml" |
7 | | - - id: trailing-whitespace |
8 | | - name: "[file - format] trim trailing whitespace" |
9 | | - args: [ --markdown-linebreak-ext=md ] |
10 | | - - id: check-added-large-files |
| 3 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 4 | + rev: v4.1.0 |
| 5 | + hooks: |
| 6 | + - id: end-of-file-fixer |
| 7 | + name: "[py - check] validate yaml" |
| 8 | + - id: trailing-whitespace |
| 9 | + name: "[file - format] trim trailing whitespace" |
| 10 | + args: [ --markdown-linebreak-ext=md ] |
| 11 | + - id: check-added-large-files |
11 | 12 | name: "[file - check] large file" |
12 | 13 | args: [ --maxkb=5000 ] |
13 | | - - id: check-docstring-first |
| 14 | + - id: check-docstring-first |
14 | 15 | name: "[py - check] docstring first" |
15 | 16 | files: /examples |
16 | 17 | types : [file, python ] |
17 | | - - id: check-json |
| 18 | + - id: check-json |
18 | 19 | name: "[json - check] validate json" |
19 | | - - id: check-merge-conflict |
| 20 | + - id: check-merge-conflict |
20 | 21 | name: "[git - check] merge conflict" |
21 | | - - id: debug-statements |
| 22 | + - id: debug-statements |
22 | 23 | name: "[py - check] debug statements" |
23 | | - - id: detect-private-key |
| 24 | + - id: detect-private-key |
24 | 25 | name: "[cred - check] private keys" |
25 | | - - id: fix-encoding-pragma |
| 26 | + - id: fix-encoding-pragma |
26 | 27 | name: "[file - format] coding pragma" |
27 | 28 | args: [ --remove ] |
28 | | - - id: mixed-line-ending |
| 29 | + - id: mixed-line-ending |
29 | 30 | name: "[file - format] mixed line ending" |
30 | 31 | args: [ --fix=auto ] |
31 | | - - id: pretty-format-json |
| 32 | + - id: pretty-format-json |
32 | 33 | name: "[json - format] pretty json" |
33 | 34 | args: [ --autofix, |
34 | 35 | --indent=4, |
35 | 36 | --no-sort-keys ] |
36 | | - - id: requirements-txt-fixer |
| 37 | + - id: requirements-txt-fixer |
37 | 38 | name: "[reqs - format] fix requirements.txt" |
38 | | - - id: check-yaml |
| 39 | + - id: check-yaml |
39 | 40 | name: "[yaml - check] validate yaml" |
40 | | -- repo: https://github.com/PyCQA/docformatter |
41 | | - rev: v1.4 |
42 | | - hooks: |
43 | | - - id: docformatter |
44 | | - name: "[py - format] docformatter" |
45 | | - args: [ -i, --wrap-summaries, "0" ] |
| 41 | +# - repo: https://github.com/pre-commit/mirrors-isort |
| 42 | +# rev: v5.10.1 |
| 43 | +# hooks: |
| 44 | +# - id: isort |
| 45 | +# name: "[py - format] isort" |
| 46 | + - repo: https://github.com/PyCQA/docformatter |
| 47 | + rev: v1.4 |
| 48 | + hooks: |
| 49 | + - id: docformatter |
| 50 | + name: "[py - format] docformatter" |
| 51 | + args: [ -i, --wrap-summaries, "0" ] |
46 | 52 |
|
47 | | -- repo: https://github.com/PyCQA/pydocstyle |
48 | | - rev: 6.1.1 |
49 | | - hooks: |
50 | | - - id: pydocstyle |
51 | | - name: "[py - check] pydocstyle" |
52 | | - files: ^Hapi/ |
| 53 | + - repo: https://github.com/PyCQA/pydocstyle |
| 54 | + rev: 6.1.1 |
| 55 | + hooks: |
| 56 | + - id: pydocstyle |
| 57 | + name: "[py - check] pydocstyle" |
| 58 | + files: ^Hapi/ |
53 | 59 |
|
54 | | -- repo: https://gitlab.com/pycqa/flake8 |
55 | | - rev: 3.8.4 |
56 | | - hooks: |
57 | | - - id: flake8 |
58 | | - name: "[py - check] flake8" |
59 | | - language_version: python3.9 |
60 | | - exclude: ^(examples/|tests/) |
| 60 | + - repo: https://gitlab.com/pycqa/flake8 |
| 61 | + rev: 4.0.1 |
| 62 | + hooks: |
| 63 | + - id: flake8 |
| 64 | + name: "[py - check] flake8" |
| 65 | + language_version: python3.9 |
| 66 | + exclude: ^(examples/|tests/) |
61 | 67 |
|
62 | | -- repo: https://github.com/psf/black |
63 | | - rev: 22.8.0 |
64 | | - hooks: |
65 | | - - id: black |
66 | | -- repo: https://github.com/pre-commit/mirrors-isort |
67 | | - rev: v5.7.0 |
68 | | - hooks: |
69 | | - - id: isort |
70 | | - name: "[py - format] isort" |
71 | | -- repo: https://github.com/ambv/black |
72 | | - rev: 22.8.0 |
73 | | - hooks: |
74 | | - - id: black |
75 | | - name: "[py - format] black" |
76 | | - language_version: python3.9 |
| 68 | + #- repo: https://github.com/psf/black |
| 69 | + # rev: 22.8.0 |
| 70 | + # hooks: |
| 71 | + # - id: black |
| 72 | + - repo: https://github.com/ambv/black |
| 73 | + rev: 22.8.0 |
| 74 | + hooks: |
| 75 | + - id: black |
| 76 | + name: "[py - format] black" |
| 77 | + language_version: python3.9 |
| 78 | + - repo: https://github.com/lovesegfault/beautysh |
| 79 | + rev: v6.2.1 |
| 80 | + hooks: |
| 81 | + - id: beautysh |
| 82 | + name: "[bash - format] beautysh" |
77 | 83 |
|
78 | | -- repo: local |
79 | | - hooks: |
80 | | - - id: pytest-check |
81 | | - name: pytest-check |
82 | | - entry: pytest -vvv --cov=Hapi |
83 | | - language: system |
84 | | - pass_filenames: false |
85 | | - always_run: true |
| 84 | + # pre-commit-shell: Checks shell scripts against shellcheck. |
| 85 | + - repo: https://github.com/detailyang/pre-commit-shell |
| 86 | + rev: v1.0.6 |
| 87 | + hooks: |
| 88 | + - id: shell-lint |
| 89 | + name: "[bash - lint] shell-lint" |
| 90 | + |
| 91 | + - repo: https://github.com/rlindsgaard/pre-commit-commit-msg-hooks |
| 92 | + rev: 0.1.0 |
| 93 | + hooks: |
| 94 | + - id: check-description-max-length |
| 95 | + name: "[bash - format] check-description-max-length" |
| 96 | + - id: check-second-line-empty |
| 97 | + name: "[bash - format] check-second-line-empty" |
| 98 | + - id: check-summary-capitalized |
| 99 | + name: "[bash - format] check-summary-capitalized" |
| 100 | + - id: check-summary-imperative |
| 101 | + name: "[bash - format] check-summary-imperative" |
| 102 | + - id: check-summary-max-length |
| 103 | + name: "[bash - format] check-summary-max-length" |
| 104 | + - id: check-summary-punctuation |
| 105 | + name: "[bash - format] check-summary-punctuation" |
| 106 | + |
| 107 | + - repo: local |
| 108 | + hooks: |
| 109 | + - id: pytest-check |
| 110 | + name: pytest-check |
| 111 | + entry: pytest -vvv --cov=Hapi |
| 112 | + language: system |
| 113 | + pass_filenames: false |
| 114 | + always_run: true |
0 commit comments