wandb

Форк
0
/
.pre-commit-config.yaml 
145 строк · 4.7 Кб
1
# Install pre-commit hooks via `pip install pre-commit && pre-commit install`
2
default_stages:
3
  - pre-push
4
repos:
5
  - repo: https://github.com/doublify/pre-commit-rust
6
    rev: v1.0
7
    hooks:
8
    - id: clippy
9
      args: ['--manifest-path=client/Cargo.toml', '--all', '--']
10
  - repo: https://github.com/astral-sh/ruff-pre-commit
11
    rev: "v0.1.0"
12
    hooks:
13
      - id: ruff
14
        args: [ --fix]
15
  - repo: https://github.com/psf/black
16
    rev: 23.10.0
17
    hooks:
18
      - id: black-jupyter
19
        exclude: ^(wandb/vendor/|wandb/proto/v.*/.*_pb2\.py|wandb/proto/v.*/.*_pb2_grpc\.py|wandb/proto/wandb_deprecated.py)
20
  - repo: https://github.com/asottile/blacken-docs
21
    rev: 1.16.0
22
    hooks:
23
      - id: blacken-docs
24
        exclude: ^(wandb/vendor/)
25
  - repo: https://github.com/pre-commit/mirrors-clang-format
26
    rev: v17.0.3
27
    hooks:
28
      - id: clang-format
29
        types_or: [proto]
30
  - repo: https://github.com/pre-commit/pre-commit-hooks
31
    rev: v4.5.0
32
    hooks:
33
      - id: check-merge-conflict
34
      - id: trailing-whitespace
35
        name: trailing-whitespace
36
        exclude: ^(wandb/|tests/|src/)
37
      - id: end-of-file-fixer
38
        name: end-of-file-fixer
39
        exclude: ^(wandb/|tests/|src/|.*_durations)
40
      - id: check-yaml
41
        name: check-yaml
42
        exclude: ^(wandb/|tests/)
43
      - id: check-added-large-files
44
        name: check-added-large-files
45
      - id: check-shebang-scripts-are-executable
46
        name: check-shebang-scripts-are-executable
47
        exclude: ^(wandb/|tests/)
48
      - id: check-executables-have-shebangs
49
        name: check-executables-have-shebangs
50
        exclude: ^(wandb/|tests/)
51
      - id: check-symlinks
52
        name: check-symlinks
53
      - id: check-toml
54
        name: check-toml
55
      - id: debug-statements
56
        name: debug-statements
57
        exclude: ^(wandb/__init__.py)
58
      - id: forbid-submodules
59
        name: forbid-submodules
60
  - repo: https://github.com/psf/black
61
    rev: 23.10.0
62
    hooks:
63
      - id: black
64
        files: '^core/'
65
  - repo: local
66
    hooks:
67
      - id: go-generate-proto
68
        name: 'go-generate-proto'
69
        entry: core/scripts/pre-commit-hooks/run-go-generate.sh
70
        files: '\.proto$'
71
        args:
72
          - ./api/proto
73
        pass_filenames: false
74
        language: 'script'
75
        description: "Runs `go generate`, requires golang"
76
      - id: go-generate-graphql
77
        name: 'go-generate-graphql'
78
        entry: core/scripts/pre-commit-hooks/run-go-generate.sh
79
        files: '\.graphql$'
80
        args:
81
          - ./api/graphql
82
        pass_filenames: false
83
        language: 'script'
84
        description: "Runs `go generate`, requires golang"
85
      - id: go-fmt
86
        name: 'go-fmt'
87
        entry: core/scripts/pre-commit-hooks/run-go-fmt.sh
88
        files: '\.go$'
89
        language: 'script'
90
        description: "Runs `gofmt`, requires golang"
91
      - id: go-imports
92
        name: 'go-imports'
93
        entry: core/scripts/pre-commit-hooks/run-go-imports.sh
94
        files: '\.go$'
95
        exclude: 'core/pkg/service/'
96
        language: 'script'
97
        description: "Runs `goimports`, requires golang"
98
      - id: go-unit-tests
99
        name: 'go-unit-tests'
100
        entry: core/scripts/pre-commit-hooks/run-go-unit-tests.sh
101
        files: '\.go$'
102
        language: 'script'
103
        description: "Runs `go test`"
104
        require_serial: true
105
      - id: go-vet
106
        name: 'go-vet'
107
        entry: core/scripts/pre-commit-hooks/run-go-vet.sh
108
        files: '\.go$'
109
        language: 'script'
110
        description: "Runs `go vet`, requires golang"
111
        require_serial: true
112
      - id: golangci-lint
113
        name: 'golangci-lint'
114
        entry: core/scripts/pre-commit-hooks/run-golangci-lint.sh
115
        types: [go]
116
        language: 'script'
117
        pass_filenames: false
118
      - id: go-critic
119
        name: 'go-critic'
120
        entry: core/scripts/pre-commit-hooks/run-go-critic.sh
121
        files: '\.go$'
122
        language: 'script'
123
        pass_filenames: false
124
        description: "Runs `go-critic`, requires https://github.com/go-critic/go-critic"
125
      - id: go-cyclo
126
        name: 'go-cyclo'
127
        entry: core/scripts/pre-commit-hooks/run-go-cyclo.sh
128
        files: '\.go$'
129
        exclude: 'core/pkg/service/'
130
        language: 'script'
131
        description: "Runs `gocyclo`, requires https://github.com/fzipp/gocyclo"
132
        args:
133
          - -over=21
134
      - id: go-mod-tidy
135
        name: 'go-mod-tidy'
136
        entry: core/scripts/pre-commit-hooks/run-go-mod-tidy.sh
137
        pass_filenames: false
138
        language: 'script'
139
        description: "Runs `go mod tidy -v`, requires golang"
140
      - id: go-build
141
        name: 'go-build'
142
        entry: core/scripts/pre-commit-hooks/run-go-build.sh
143
        files: '\.go$'
144
        language: 'script'
145
        description: "Runs `go build`, requires golang"
146

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.