|
| 1 | +ci: |
| 2 | + autofix_prs: false |
| 3 | + autoupdate_schedule: quarterly |
| 4 | + |
| 5 | +repos: |
| 6 | + |
| 7 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
| 8 | + rev: v5.0.0 |
| 9 | + hooks: |
| 10 | + - id: check-ast |
| 11 | + name: validate Python code |
| 12 | + - id: check-merge-conflict |
| 13 | + name: check for git merge conflicts |
| 14 | + exclude: .*\.rst |
| 15 | + - id: check-case-conflict |
| 16 | + name: check for filename case conflicts |
| 17 | + - id: name-tests-test |
| 18 | + args: [--pytest-test-first] |
| 19 | + exclude: src/plasmapy/tests/_helpers/.* |
| 20 | + - id: trailing-whitespace |
| 21 | + - id: end-of-file-fixer |
| 22 | + - id: check-json |
| 23 | + - id: check-toml |
| 24 | + - id: check-yaml |
| 25 | + |
| 26 | +- repo: https://github.com/python-jsonschema/check-jsonschema |
| 27 | + rev: 0.33.2 |
| 28 | + hooks: |
| 29 | + - id: check-github-workflows |
| 30 | + |
| 31 | +- repo: https://github.com/sirosen/texthooks |
| 32 | + rev: 0.6.8 |
| 33 | + hooks: |
| 34 | + - id: fix-smartquotes |
| 35 | + - id: fix-spaces |
| 36 | + - id: fix-ligatures |
| 37 | + - id: forbid-bidi-controls |
| 38 | + |
| 39 | +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks |
| 40 | + rev: v2.15.0 |
| 41 | + hooks: |
| 42 | + - id: pretty-format-ini |
| 43 | + args: [--autofix] |
| 44 | + - id: pretty-format-yaml |
| 45 | + args: [--autofix] |
| 46 | + # For the labeler GitHub Action, labels with spaces in them must |
| 47 | + # be put in quotes. However, the pretty-format-yaml hook will |
| 48 | + # remove the quotes which will break that action, so we should not |
| 49 | + # run this hook on `labeler.yml` (or certain other files). |
| 50 | + exclude: .github/labeler.yml|.pre-commit-search-and-replace.yaml |
| 51 | + |
| 52 | +- repo: https://github.com/pre-commit/pygrep-hooks |
| 53 | + rev: v1.10.0 |
| 54 | + hooks: |
| 55 | + - id: python-check-blanket-noqa |
| 56 | + name: noqa comments have an error code |
| 57 | + exclude: ^docs/plasmapy_sphinx/ |
| 58 | + - id: rst-directive-colons |
| 59 | + - id: rst-inline-touching-normal |
| 60 | + - id: text-unicode-replacement-char |
| 61 | + |
| 62 | +- repo: https://github.com/codespell-project/codespell |
| 63 | + rev: v2.4.1 |
| 64 | + hooks: |
| 65 | + - id: codespell |
| 66 | + name: codespell (add false positives to pyproject.toml) |
| 67 | + args: [--write-changes] |
| 68 | + additional_dependencies: |
| 69 | + - tomli |
| 70 | + |
| 71 | +- repo: https://github.com/crate-ci/typos |
| 72 | + rev: v1.34.0 |
| 73 | + hooks: |
| 74 | + - id: typos |
| 75 | + name: typos (add false positives to _typos.toml) |
| 76 | + |
| 77 | +- repo: https://github.com/astral-sh/ruff-pre-commit |
| 78 | + rev: v0.12.3 |
| 79 | + hooks: |
| 80 | + - id: ruff |
| 81 | + name: ruff (see https://docs.astral.sh/ruff/rules) |
| 82 | + args: [--fix] |
| 83 | + - id: ruff-format |
| 84 | + name: autoformat source code with ruff-format |
| 85 | + |
| 86 | +- repo: https://github.com/abravalheri/validate-pyproject |
| 87 | + rev: v0.24.1 |
| 88 | + hooks: |
| 89 | + - id: validate-pyproject |
| 90 | + additional_dependencies: ['validate-pyproject-schema-store[all]'] |
| 91 | + |
| 92 | +- repo: https://github.com/tox-dev/pyproject-fmt |
| 93 | + rev: v2.6.0 |
| 94 | + hooks: |
| 95 | + - id: pyproject-fmt |
| 96 | + |
| 97 | +- repo: https://github.com/hukkin/mdformat |
| 98 | + rev: 0.7.22 |
| 99 | + hooks: |
| 100 | + - id: mdformat |
| 101 | + name: Format .md files |
| 102 | + # Skip wrapping line length because doing so can mess up |
| 103 | + # formatting of GitHub issues created from files in |
| 104 | + # .github/content, and some files use semantic line breaks. |
| 105 | + exclude: licenses/.*|LICENSE.md|PATENT.md |
| 106 | + additional_dependencies: |
| 107 | + - mdformat-black |
| 108 | + - mdformat-footnote |
| 109 | + - mdformat-frontmatter |
| 110 | + - mdformat-gfm |
| 111 | + - mdformat-gfm-alerts |
0 commit comments