Skip to content

Commit ef5772a

Browse files
committed
Add default hooks to README
1 parent f243b6d commit ef5772a

File tree

1 file changed

+40
-6
lines changed

1 file changed

+40
-6
lines changed

README.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ https://devenv.sh/pre-commit-hooks/
4444
ormolu.enable = true;
4545
shellcheck.enable = true;
4646
};
47-
48-
# Set the pkgs to get the tools for the hooks from.
49-
# tools = pkgs;
47+
48+
# Set the pkgs to get the tools for the hooks from.
49+
# tools = pkgs;
5050
5151
# Some hooks offer custom settings that affect how they execute
5252
settings = {
@@ -159,6 +159,13 @@ use nix
159159
- [pyupgrade](https://github.com/asottile/pyupgrade)
160160
- [pylint](https://github.com/PyCQA/pylint)
161161
- [flake8](https://github.com/PyCQA/flake8)
162+
- [python-debug-statements](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/debug_statement_hook.py)
163+
- [check-builtin-literals](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_builtin_literals.py)
164+
- [check-docstring-first](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_docstring_first.py)
165+
- [check-python](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_ast.py)
166+
- [name-tests-test](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/tests_should_end_in_test.py)
167+
- [sort-requirements-txt](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/requirements_txt_fixer.py)
168+
- [fix-encoding-pragma](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/fix_encoding_pragma.py)
162169

163170
## PHP
164171

@@ -222,10 +229,19 @@ use nix
222229
## YAML
223230

224231
- [yamllint](https://github.com/adrienverge/yamllint)
232+
- [check-yaml](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_yaml.py)
233+
- [sort-simple-yaml](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/sort_simple_yaml.py)
225234

226235
## TOML
227236

228237
- [taplo fmt](https://github.com/tamasfe/taplo)
238+
- [check-toml](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_toml.py)
239+
240+
241+
## JSON
242+
243+
- [check-json](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_json.py)
244+
- [pretty-format-json](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/pretty_format_json.py)
229245

230246
## Typst
231247

@@ -241,7 +257,7 @@ use nix
241257
- [typos](https://github.com/crate-ci/typos)
242258
- [cspell](https://cspell.org/)
243259

244-
## Other Formatters
260+
## Various other hooks
245261

246262
- [prettier](https://prettier.io)
247263
- `dhall format`: built-in formatter
@@ -256,6 +272,20 @@ use nix
256272
- [headache](https://github.com/frama-c/headache)
257273
- [crystal](https://crystal-lang.org/reference/man/crystal#crystal-tool-format)
258274
- [cmake-format](https://cmake-format.readthedocs.io/en/latest/)
275+
- [sort-file-contents](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/file_contents_sorter.py)
276+
- [mixed-line-endings](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/mixed_line_ending.py)
277+
- [trim-trailing-whitespace](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/trailing_whitespace_fixer.py)
278+
- [check-case-conflicts](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_case_conflict.py)
279+
- [check-added-large-files](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_added_large_files.py)
280+
- [end-of-file-fixer](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/end_of_file_fixer.py)
281+
- [detect-aws-credentials](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/detect_aws_credentials.py)
282+
- [detect-private-keys](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/detect_private_key.py)
283+
- [check-shebang-scripts-are-executable](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_shebang_scripts_are_executable.py)
284+
- [check-executables-have-shebangs](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_executables_have_shebangs.py)
285+
- [check-symlinks](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_symlinks.py)
286+
- [check-vcs-permalinks](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_vcs_permalinks.py)
287+
- [check-xml](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_xml.py)
288+
- [fix-byte-order-marker](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/fix_byte_order_marker.py)
259289

260290
You may restrict which languages should be formatted by `clang-format` using
261291
`clang-format.types_or`. For example to check only C and C++ files:
@@ -267,7 +297,7 @@ clang-format = {
267297
};
268298
```
269299

270-
Otherwise, the default internal list is used which includes everything that
300+
Otherwise, the default internal list is used which includes everything that
271301
clang-format supports.
272302

273303
## Git
@@ -276,6 +306,10 @@ clang-format supports.
276306
- [gptcommit](https://github.com/zurawiki/gptcommit)
277307
- [convco](https://github.com/convco/convco)
278308
- [annex](https://git-annex.branchable.com/)
309+
- [no-commit-to-branch](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/no_commit_to_branch.py)
310+
- [check-merge-conflicts](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/check_merge_conflict.py)
311+
- [forbid-new-submodules](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/forbid_new_submodules.py)
312+
- [forbid-submodules](https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/forbid_submodules.py)
279313

280314
## Custom hooks
281315

@@ -369,7 +403,7 @@ To run the all the hooks on CI:
369403
nix flake check
370404
```
371405

372-
To install pre-commit hooks developers would run:
406+
To install pre-commit, hooks developers would run:
373407

374408
```bash
375409
nix develop

0 commit comments

Comments
 (0)