-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
57 lines (53 loc) · 1.58 KB
/
.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
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
exclude: '^pkg/api/docs/swagger.*\.json$|^pkg/api/docs/swagger.*\.yaml$'
repos:
### Global ###
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1024"]
- id: check-merge-conflict
- id: detect-aws-credentials
args:
- "--allow-missing-credentials"
- id: detect-private-key
exclude: 'hack/certs/key.pem'
- id: end-of-file-fixer
exclude_types:
- json
- id: fix-byte-order-marker
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/sirosen/texthooks
rev: 0.6.7
hooks:
- id: fix-smartquotes
### Golang ###
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-imports
- repo: https://github.com/golangci/golangci-lint
rev: v1.61.0
hooks:
- id: golangci-lint-full
args: [--timeout=5m]
- repo: local
hooks:
- id: check-docs-and-schema
name: Check for outdated schema
entry: ./hack/test-generate-schema.sh
files: "src/types/types.go"
types: [go]
language: script
description: "Checks for schema changes"
### Typescript ###
- repo: local
hooks:
- id: prettier-format
name: prettier format
entry: sh -c 'cd ui && npm run format'
language: system
files: \.(js|ts|svelte|css|postcss|scss|json|md)$