pre-commit-hooks

Some out-of-the-box hooks for pre-commit (by pre-commit)

Pre-commit-hooks Alternatives

Similar projects and alternatives to pre-commit-hooks

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better pre-commit-hooks alternative or higher similarity.

Suggest an alternative to pre-commit-hooks

Reviews and mentions

Posts with mentions or reviews of pre-commit-hooks. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-08-25.
  • Using Prettier with Prisma.io (pre-commit config)
    dev.to | 2021-08-25
    - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.3.2 # Use the sha or tag you want to point at hooks: - id: prettier additional_dependencies: - [email protected] - '[email protected]' - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: - id: trailing-whitespace - id: check-merge-conflict - id: check-yaml - id: end-of-file-fixer - id: no-commit-to-branch args: [-b, main, -b, production, -b, staging]
  • Chickity-check yo self before you wreck yo self!
    dev.to | 2021-07-06
    --- # .pre-commit-config.yaml # ======================== # # pre-commit clean # pre-commit install # pre-commit install-hooks # # precommit hooks installation # # - pre-commit autoupdate # # - pre-commit run black # # continuous integration # ====================== # # - pre-commit run --all-files # repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements - id: check-merge-conflict - id: sort-simple-yaml - id: fix-encoding-pragma args: ["--remove"] - id: forbid-new-submodules - id: mixed-line-ending args: ["--fix=lf"] description: Forces to replace line ending by the UNIX 'lf' character. - id: check-added-large-files args: ["--maxkb=500"] - id: no-commit-to-branch args: [--branch, master] - id: check-yaml - id: check-json files: ^tests/app/ - id: pretty-format-json args: ["--no-sort-keys", "--autofix"] files: ^tests/app/ - repo: meta hooks: - id: check-hooks-apply - id: check-useless-excludes - repo: https://github.com/ambv/black rev: 21.5b1 hooks: - id: black language_version: python3.9 - repo: https://github.com/PyCQA/bandit rev: 1.7.0 hooks: - id: bandit description: Security oriented static analyser for python code exclude: tests/|scripts/ args: - -s - B101 - repo: https://github.com/codespell-project/codespell rev: v2.1.0 hooks: - id: codespell name: codespell description: Checks for common misspellings in text files. entry: codespell language: python types: [text] - repo: https://github.com/asottile/pyupgrade rev: v2.19.4 hooks: - id: pyupgrade
  • Make your Django project newbie contributor friendly with pre-commit
    dev.to | 2021-07-04
    $ pre-commit install pre-commit installed at .git/hooks/pre-commit $ git add .pre-commit-config.yaml $ git commit -m "Add pre-commit config" [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://gitlab.com/pycqa/flake8. [INFO] Initializing environment for https://github.com/pycqa/isort. [INFO] Initializing environment for https://github.com/python/black. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitlab.com/pycqa/flake8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pycqa/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/python/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Trim Trailing Whitespace.................................................Passed Check Yaml...............................................................Passed Check for merge conflicts................................................Passed Debug Statements (Python)............................(no files to check)Skipped Check for added large files..............................................Passed Fix requirements.txt.................................(no files to check)Skipped Check django project for potential problems..........(no files to check)Skipped Check django project for missing migrations..........(no files to check)Skipped flake8...............................................(no files to check)Skipped isort................................................(no files to check)Skipped black................................................(no files to check)Skipped
  • TIL: Use pre-commit hook - the framework
    dev.to | 2021-06-14
    $ pre-commit run --all-files [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Trim Trailing Whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing MANIFEST.SKIP Fixing .github/dependabot.yml Fix End of Files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing _config.yml Fixing .github/dependabot.yml Check Yaml...............................................................Passed Check for added large files..............................................Passed
  • A Makefile for Rasa
    dev.to | 2021-04-30
  • Terraform v15.0 with AWS (EKS deployment)
    dev.to | 2021-04-17
    CMD> echo 'repos: - repo: git://github.com/antonbabenko/pre-commit-terraform rev: master hooks: - id: terraform_fmt - id: terraform_validate - id: terraform_docs - id: terraform_docs_without_aggregate_type_defaults - id: terraform_tflint args: - 'args=--enable-rule=terraform_documented_variables' - id: terraform_tfsec - repo: https://github.com/pre-commit/pre-commit-hooks rev: master hooks: - id: check-merge-conflict - id: end-of-file-fixer' > .pre-commit-config.yaml CMD> pre-commit install pre-commit installed at .git/hooks/pre-commit

Stats

Basic pre-commit-hooks repo stats
6
2,448
7.8
6 days ago

pre-commit/pre-commit-hooks is an open source project licensed under MIT License which is an OSI approved license.

Scout APM: A developer's best friend. Try free for 14-days
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
scoutapm.com
Find remote Python jobs at our new job board 99remotejobs.com. There are 10 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.