Skip to content

Instantly share code, notes, and snippets.

@atemate
Created July 21, 2023 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atemate/da9fd01e2384ec4c39acbd2d8b725ff2 to your computer and use it in GitHub Desktop.
Save atemate/da9fd01e2384ec4c39acbd2d8b725ff2 to your computer and use it in GitHub Desktop.
My .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- id: no-commit-to-branch
- id: check-toml
- id: check-yaml
- id: check-json
- id: pretty-format-json
args: [--no-sort-keys, --autofix, --indent=4]
# yaml pretty formatter
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent=2, --offset=2, --preserve-quotes, --line-width=166]
# shell scripts static analyser
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
args: [--shell=bash, --external-sources, --severity=info]
# python import sorter
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: [--profile=black]
# python code formatter
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
# python style ckecker
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment