-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
54 lines (49 loc) · 1.32 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
54 lines (49 loc) · 1.32 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
repos:
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-json
- id: detect-private-key
# Cleanup generated files before Go hooks
- repo: local
hooks:
- id: cleanup-generated
name: Remove generated files
entry: sh -c 'rm -f generated_tasks.go generated_tasks'
language: system
stages: [pre-commit]
pass_filenames: false
# Go-specific hooks
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.2
hooks:
- id: go-fmt
- id: go-vet-mod
- id: go-mod-tidy
- id: golangci-lint-mod
# YAML formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types: [yaml]
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
- id: markdownlint
args: ["--fix"]
# Nix formatting
- repo: https://github.com/nix-community/nixpkgs-fmt
rev: v1.3.0
hooks:
- id: nixpkgs-fmt