Created
September 11, 2024 19:43
-
-
Save ryanpeach/05b840f88c5d5339a53708f752ef2c2a to your computer and use it in GitHub Desktop.
My favorite pre-commits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exclude: "docs|.git" | |
default_stages: [commit] | |
fail_fast: false | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.4.0 | |
hooks: | |
- id: trailing-whitespace | |
- id: end-of-file-fixer | |
- id: check-added-large-files | |
- id: check-json | |
- id: check-merge-conflict | |
- id: check-toml | |
- id: check-xml | |
- id: detect-private-key | |
- id: mixed-line-ending | |
args: ["--fix=lf"] | |
- id: no-commit-to-branch | |
args: [--branch, debug, --branch, master] | |
- id: pretty-format-json | |
args: ["--autofix"] | |
- repo: https://github.com/Lucas-C/pre-commit-hooks | |
rev: v1.4.1 | |
hooks: | |
- id: remove-tabs | |
- id: remove-crlf | |
- repo: https://github.com/gruntwork-io/pre-commit | |
rev: v0.1.23 | |
hooks: | |
- id: shellcheck | |
- id: markdown-link-check | |
# Terraform | |
- repo: https://github.com/antonbabenko/pre-commit-terraform | |
rev: v1.78.0 | |
hooks: | |
- id: terraform_docs | |
- repo: https://github.com/gruntwork-io/pre-commit | |
rev: v0.1.23 | |
hooks: | |
- id: terraform-fmt | |
- id: terraform-docs | |
- id: terraform-validate | |
- id: tflint | |
# K8s | |
- repo: https://github.com/gruntwork-io/pre-commit | |
rev: v0.1.23 | |
hooks: | |
- id: helmlint | |
# Rust | |
- repo: https://github.com/doublify/pre-commit-rust | |
rev: v1.0 | |
hooks: | |
- id: fmt | |
- id: cargo-check | |
- id: clippy | |
# Python | |
- repo: https://github.com/astral-sh/ruff-pre-commit | |
# Ruff version. | |
rev: v0.6.4 | |
hooks: | |
# Run the linter. | |
- id: ruff | |
types_or: [python, pyi] | |
args: [--fix] | |
# Run the formatter. | |
- id: ruff-format | |
types_or: [python, pyi] | |
- repo: https://github.com/RobertCraigie/pyright-python | |
rev: v1.1.379 | |
hooks: | |
- id: pyright | |
# Golang | |
- repo: https://github.com/gruntwork-io/pre-commit | |
rev: v0.1.23 | |
hooks: | |
- id: gofmt | |
- id: golint | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment