Skip to content

pre-commit Configurations

Tip

If you do not want to use the pre-commit hook, run this command:

1
pre-commit uninstall

Hook List

Overview

.pre-commit-config.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
default_stages: [pre-commit]

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: end-of-file-fixer
        name: End of file fixer
        description: Ensure files end with a newline

      - id: check-json
        name: Check JSON
        description: Check that JSON files are valid

      - id: check-toml
        name: Check TOML
        description: Check that TOML files are valid

      - id: check-xml
        name: Check XML
        description: Check that XML files are valid

      - id: check-yaml
        name: Check YAML
        description: Check that YAML files are valid

      - id: detect-private-key
        name: Detect private key
        description: Detect private keys in files

      - id: trailing-whitespace
        name: Trailing whitespace
        description: Remove trailing whitespace from files

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.12.8
    hooks:
      - id: ruff-format
        name: Python Format
        description: Run 'ruff format' for extremely fast Python formatting

      - id: ruff-lint
        name: Python Lint
        description: Run 'ruff check' for extremely fast Python linting
        args: [--fix]

  - repo: local
    hooks:
      - id: ty
        name: Python Type Check
        description: Run 'ty check' for Python type checking
        entry: uv run ty check
        language: python
        types: [python]

  - repo: https://github.com/rhysd/actionlint
    rev: v1.7.10
    hooks:
      - id: actionlint
        name: GitHub Actions Lint
        description: Lint GitHub Actions workflows

  - repo: https://github.com/hadolint/hadolint
    rev: v2.12.0
    hooks:
      - id: hadolint
        name: Dockerfile Lint
        description: Runs hadolint to lint Dockerfiles
        language: system
        types: ["dockerfile"]
        entry: hadolint

  - repo: local
    hooks:
      - id: sqruff-fix
        name: SQL Format
        description: Run 'sqruff fix' for SQL formatting
        entry: uv run sqruff fix
        language: python
        types: [python]

      - id: sqruff-lint
        name: SQL Lint
        description: Run 'sqruff lint' for SQL linting
        entry: uv run sqruff lint
        language: python
        types: [python]

ci:
  autoupdate_schedule: weekly