| 1 |
[[repos]] |
| 2 |
repo = "local" |
| 3 |
|
| 4 |
[[repos.hooks]] |
| 5 |
id = "ruff-check" |
| 6 |
name = "Ruff Linter" |
| 7 |
language = "system" |
| 8 |
entry = "ruff check" |
| 9 |
types = ["python"] |
| 10 |
pass_filenames = true |
| 11 |
|
| 12 |
[[repos.hooks]] |
| 13 |
id = "ruff-format" |
| 14 |
name = "Ruff Formatter" |
| 15 |
language = "system" |
| 16 |
entry = "ruff format" |
| 17 |
types = ["python"] |
| 18 |
pass_filenames = true |
| 19 |
|
| 20 |
[[repos.hooks]] |
| 21 |
id = "check-ast" |
| 22 |
name = "Check Python AST" |
| 23 |
language = "system" |
| 24 |
entry = "check-ast" |
| 25 |
types = ["python"] |
| 26 |
|
| 27 |
[[repos.hooks]] |
| 28 |
id = "check-case-conflict" |
| 29 |
name = "Check for case conflicts" |
| 30 |
language = "system" |
| 31 |
entry = "check-case-conflict" |
| 32 |
|
| 33 |
[[repos.hooks]] |
| 34 |
id = "check-docstring-first" |
| 35 |
name = "Check docstring is first" |
| 36 |
language = "system" |
| 37 |
entry = "check-docstring-first" |
| 38 |
types = ["python"] |
| 39 |
|
| 40 |
[[repos.hooks]] |
| 41 |
id = "check-executables-have-shebangs" |
| 42 |
name = "Check that executables have shebangs" |
| 43 |
language = "system" |
| 44 |
entry = "check-executables-have-shebangs" |
| 45 |
types = ["text", "executable"] |
| 46 |
|
| 47 |
[[repos.hooks]] |
| 48 |
id = "check-json" |
| 49 |
name = "Check JSON files" |
| 50 |
language = "system" |
| 51 |
entry = "check-json" |
| 52 |
types = ["json"] |
| 53 |
|
| 54 |
[[repos.hooks]] |
| 55 |
id = "check-merge-conflict" |
| 56 |
name = "Check for merge conflicts" |
| 57 |
language = "system" |
| 58 |
entry = "check-merge-conflict" |
| 59 |
types = ["text"] |
| 60 |
|
| 61 |
[[repos.hooks]] |
| 62 |
id = "check-symlinks" |
| 63 |
name = "Check for broken symlinks" |
| 64 |
language = "system" |
| 65 |
entry = "check-symlinks" |
| 66 |
types = ["symlink"] |
| 67 |
|
| 68 |
[[repos.hooks]] |
| 69 |
id = "check-toml" |
| 70 |
name = "Check TOML files" |
| 71 |
language = "system" |
| 72 |
entry = "check-toml" |
| 73 |
types = ["toml"] |
| 74 |
|
| 75 |
[[repos.hooks]] |
| 76 |
id = "check-xml" |
| 77 |
name = "Check XML files" |
| 78 |
language = "system" |
| 79 |
entry = "check-xml" |
| 80 |
types = ["xml"] |
| 81 |
|
| 82 |
[[repos.hooks]] |
| 83 |
id = "check-yaml" |
| 84 |
name = "Check YAML files" |
| 85 |
language = "system" |
| 86 |
entry = "check-yaml" |
| 87 |
types = ["yaml"] |
| 88 |
|
| 89 |
[[repos.hooks]] |
| 90 |
id = "codespell" |
| 91 |
name = "Check code for common misspellings" |
| 92 |
language = "system" |
| 93 |
entry = "codespell --ignore-words-list=fo,incomfort,nam,bloc,ue" |
| 94 |
types = ["text"] |
| 95 |
exclude = "^uv.lock$" |
| 96 |
pass_filenames = true |
| 97 |
|
| 98 |
[[repos.hooks]] |
| 99 |
id = "detect-private-key" |
| 100 |
name = "Detect Private Keys" |
| 101 |
language = "system" |
| 102 |
entry = "detect-private-key" |
| 103 |
types = ["text"] |
| 104 |
pass_filenames = true |
| 105 |
|
| 106 |
[[repos.hooks]] |
| 107 |
id = "end-of-file-fixer" |
| 108 |
name = "Fix End of Files" |
| 109 |
language = "system" |
| 110 |
entry = "end-of-file-fixer" |
| 111 |
types = ["text"] |
| 112 |
pass_filenames = true |
| 113 |
|
| 114 |
[[repos.hooks]] |
| 115 |
id = "mypy" |
| 116 |
name = "Static type checking using mypy" |
| 117 |
language = "system" |
| 118 |
entry = "mypy" |
| 119 |
types = ["python"] |
| 120 |
pass_filenames = true |
| 121 |
|
| 122 |
[[repos.hooks]] |
| 123 |
id = "no-commit-to-branch" |
| 124 |
name = "Don't commit to main branch" |
| 125 |
language = "system" |
| 126 |
entry = "no-commit-to-branch --branch=main" |
| 127 |
pass_filenames = false |
| 128 |
always_run = true |
| 129 |
|
| 130 |
[[repos.hooks]] |
| 131 |
id = "check-pyproject" |
| 132 |
name = "Check pyproject with tomllib" |
| 133 |
language = "system" |
| 134 |
entry = "python -c \"import tomllib; tomllib.load(open('pyproject.toml', 'rb'))\"" |
| 135 |
pass_filenames = false |
| 136 |
always_run = true |
| 137 |
|
| 138 |
[[repos.hooks]] |
| 139 |
id = "prettier" |
| 140 |
name = "Ensuring files are prettier" |
| 141 |
language = "system" |
| 142 |
entry = "npm run prettier" |
| 143 |
types = ["yaml", "json", "markdown"] |
| 144 |
pass_filenames = false |
| 145 |
|
| 146 |
[[repos.hooks]] |
| 147 |
id = "pylint" |
| 148 |
name = "Starring code with pylint" |
| 149 |
language = "system" |
| 150 |
entry = "pylint" |
| 151 |
types = ["python"] |
| 152 |
pass_filenames = true |
| 153 |
|
| 154 |
[[repos.hooks]] |
| 155 |
id = "pytest" |
| 156 |
name = "Running tests and test coverage with pytest" |
| 157 |
language = "system" |
| 158 |
entry = "pytest" |
| 159 |
types = ["python"] |
| 160 |
pass_filenames = false |
| 161 |
always_run = true |
| 162 |
|
| 163 |
[[repos.hooks]] |
| 164 |
id = "trailing-whitespace-fixer" |
| 165 |
name = "Trim Trailing Whitespace" |
| 166 |
language = "system" |
| 167 |
entry = "trailing-whitespace-fixer" |
| 168 |
types = ["text"] |
| 169 |
pass_filenames = true |
| 170 |
|
| 171 |
[[repos.hooks]] |
| 172 |
id = "yamllint" |
| 173 |
name = "Check YAML files with yamllint" |
| 174 |
language = "system" |
| 175 |
entry = "yamllint" |
| 176 |
types = ["yaml"] |
| 177 |
pass_filenames = true |