|
| 1 | +--- |
| 2 | +repos: |
| 3 | +# - repo: https://github.com/asottile/add-trailing-comma.git |
| 4 | +# rev: v2.0.1 |
| 5 | +# hooks: |
| 6 | +# - id: add-trailing-comma |
| 7 | + |
| 8 | +# - repo: https://github.com/timothycrosley/isort.git |
| 9 | +# rev: 5.4.2 |
| 10 | +# hooks: |
| 11 | +# - id: isort |
| 12 | +# args: |
| 13 | +# - --honor-noqa |
| 14 | + |
| 15 | +- repo: https://github.com/Lucas-C/pre-commit-hooks.git |
| 16 | + rev: v1.1.7 |
| 17 | + hooks: |
| 18 | + - id: remove-tabs |
| 19 | + exclude: | |
| 20 | + (?x) |
| 21 | + ^ |
| 22 | + helper/proxy\.pac| |
| 23 | + Makefile| |
| 24 | + proxy/common/pki\.py| |
| 25 | + README\.md| |
| 26 | + .+\.(plist|pbxproj) |
| 27 | + $ |
| 28 | +
|
| 29 | +- repo: https://github.com/pre-commit/pre-commit-hooks.git |
| 30 | + rev: v4.0.1 |
| 31 | + hooks: |
| 32 | + # Side-effects: |
| 33 | + - id: trailing-whitespace |
| 34 | + exclude: | |
| 35 | + (?x) |
| 36 | + ^ |
| 37 | + \.github/workflows/codeql-analysis\.yml| |
| 38 | + dashboard/src/core/plugins/inspect_traffic\.json |
| 39 | + $ |
| 40 | + - id: check-merge-conflict |
| 41 | + - id: double-quote-string-fixer |
| 42 | + exclude: | |
| 43 | + (?x) |
| 44 | + ^ |
| 45 | + ( |
| 46 | + tests/( |
| 47 | + http/exceptions/test_http_proxy_auth_failed| |
| 48 | + plugin/test_http_proxy_plugins |
| 49 | + )| |
| 50 | + proxy/( |
| 51 | + common/constants| |
| 52 | + plugin/(cache/store/disk|filter_by_url_regex|proxy_pool) |
| 53 | + ) |
| 54 | + )\.py |
| 55 | + $ |
| 56 | + - id: end-of-file-fixer |
| 57 | + exclude: | |
| 58 | + (?x) |
| 59 | + ^ |
| 60 | + dashboard/( |
| 61 | + src/core/plugins/inspect_traffic\.json| |
| 62 | + static/bootstrap-4\.3\.1\.min\.(cs|j)s |
| 63 | + )| |
| 64 | + menubar/proxy\.py/( |
| 65 | + Assets\.xcassets/( |
| 66 | + AppIcon\.appiconset/| |
| 67 | + StatusBarButtonImage\.imageset/| |
| 68 | + )| |
| 69 | + Preview\sContent/Preview\sAssets\.xcassets/ |
| 70 | + )Contents\.json| |
| 71 | + requirements-release\.txt |
| 72 | + $ |
| 73 | + - id: requirements-txt-fixer |
| 74 | + exclude: >- |
| 75 | + ^requirements(|-(release|testing|tunnel))\.txt$ |
| 76 | + # Non-modifying checks: |
| 77 | + - id: name-tests-test |
| 78 | + args: |
| 79 | + - --django |
| 80 | + exclude: >- |
| 81 | + ^tests/plugin/utils\.py$ |
| 82 | + files: >- |
| 83 | + ^tests/[^_].*\.py$ |
| 84 | + - id: check-added-large-files |
| 85 | + - id: check-byte-order-marker |
| 86 | + - id: check-case-conflict |
| 87 | + # disabled due to pre-commit/pre-commit-hooks#159 |
| 88 | + #- id: check-docstring-first |
| 89 | + - id: check-json |
| 90 | + - id: check-symlinks |
| 91 | + - id: check-yaml |
| 92 | + # args: |
| 93 | + # - --unsafe |
| 94 | + - id: detect-private-key |
| 95 | + |
| 96 | + # Heavy checks: |
| 97 | + - id: check-ast |
| 98 | + - id: debug-statements |
| 99 | + |
| 100 | +- repo: https://github.com/PyCQA/pydocstyle.git |
| 101 | + rev: 6.1.1 |
| 102 | + hooks: |
| 103 | + - id: pydocstyle |
| 104 | + additional_dependencies: |
| 105 | + - toml |
| 106 | + args: |
| 107 | + - |- |
| 108 | + --ignore= |
| 109 | + D101, |
| 110 | + D102, |
| 111 | + D103, |
| 112 | + D105, |
| 113 | + D106, |
| 114 | + D107, |
| 115 | + D203, |
| 116 | + D205, |
| 117 | + D208, |
| 118 | + D209, |
| 119 | + D212, |
| 120 | + D213, |
| 121 | + D300, |
| 122 | + D400, |
| 123 | + D401, |
| 124 | + D402, |
| 125 | + D403, |
| 126 | + D404, |
| 127 | + D405, |
| 128 | + D407, |
| 129 | + D412, |
| 130 | + D413, |
| 131 | + D415, |
| 132 | +
|
| 133 | +- repo: https://github.com/codespell-project/codespell |
| 134 | + rev: v2.1.0 |
| 135 | + hooks: |
| 136 | + - id: codespell |
| 137 | + exclude: >- |
| 138 | + ^.+\.min\.js$ |
| 139 | +
|
| 140 | +- repo: https://github.com/adrienverge/yamllint.git |
| 141 | + rev: v1.26.2 |
| 142 | + hooks: |
| 143 | + - id: yamllint |
| 144 | + exclude: | |
| 145 | + (?x) |
| 146 | + ^ |
| 147 | + \.pre-commit-config\.yaml| |
| 148 | + ( |
| 149 | + \.github/( |
| 150 | + workflows/( |
| 151 | + codeql-analysis|test-(brew|dashboard|docker|library) |
| 152 | + )| |
| 153 | + FUNDING |
| 154 | + )| |
| 155 | + codecov |
| 156 | + )\.yml |
| 157 | + $ |
| 158 | + args: |
| 159 | + - --strict |
| 160 | + types: [file, yaml] |
| 161 | + |
| 162 | +- repo: https://github.com/PyCQA/flake8.git |
| 163 | + rev: 3.9.2 |
| 164 | + hooks: |
| 165 | + - id: flake8 |
| 166 | + language_version: python3 |
| 167 | + additional_dependencies: |
| 168 | + - flake8-2020 >= 1.6.0 |
| 169 | + - flake8-docstrings >= 1.5.0 |
| 170 | + - flake8-pytest-style >= 1.2.2 |
| 171 | + - wemake-python-styleguide ~= 0.15.0 |
| 172 | + |
| 173 | +- repo: https://github.com/pre-commit/mirrors-mypy.git |
| 174 | + rev: v0.910 |
| 175 | + hooks: |
| 176 | + - id: mypy |
| 177 | + args: |
| 178 | + # FIXME: get rid of missing imports ignore |
| 179 | + - --ignore-missing-imports |
| 180 | + - --install-types |
| 181 | + - --namespace-packages |
| 182 | + - --non-interactive |
| 183 | + - --pretty |
| 184 | + - --show-column-numbers |
| 185 | + - --show-error-codes |
| 186 | + - --show-error-context |
| 187 | + - --strict |
| 188 | + - --strict-optional |
| 189 | + - examples/ |
| 190 | + - proxy/ |
| 191 | + - tests/ |
| 192 | + pass_filenames: false |
| 193 | + |
| 194 | +- repo: local |
| 195 | + hooks: |
| 196 | + - id: pylint |
| 197 | + language: system |
| 198 | + name: PyLint |
| 199 | + files: \.py$ |
| 200 | + entry: python -m pylint |
| 201 | + args: [] |
| 202 | + stages: |
| 203 | + - manual |
0 commit comments