-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
35 lines (31 loc) · 1.17 KB
/
.pre-commit-config.yaml
File metadata and controls
35 lines (31 loc) · 1.17 KB
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
minimum_pre_commit_version: "2"
# To use hooks on the pre-commit stage only, run
# pre-commit install --hook-type pre-commit
repos:
- repo: local
hooks:
- id: gitleaks-pre-commit
name: gitleaks-pre-commit
description: Detect hardcoded secrets pre-commit using Gitleaks
entry: gitleaks protect --verbose --no-banner --redact --staged
language: golang
additional_dependencies: [ github.com/zricethezav/gitleaks@latest ]
stages: [commit]
- id: gitleaks-pre-push
# To use this pre-push hook, run
# pre-commit install --hook-type pre-push
name: gitleaks-pre-push
description: Detect hardcoded secrets pre-push using Gitleaks
entry: gitleaks detect --verbose --no-banner --redact --log-opts "origin..HEAD"
language: golang
additional_dependencies: [ github.com/zricethezav/gitleaks@latest ]
stages: [push]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.11
hooks:
# Run the linter / organize imports
- id: ruff-check
args: [ "--select", "I", "--fix" ]
# Run the formatter.
- id: ruff-format