-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
59 lines (52 loc) · 1.71 KB
/
.pre-commit-config.yaml
File metadata and controls
59 lines (52 loc) · 1.71 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
55
56
57
58
59
# Pre-commit configuration for Scope SDKs
# Install: cd sdks/python && make pre-commit-install
# Run manually: pre-commit run --all-files
repos:
# ============================================================================
# Python SDK
# ============================================================================
# Ruff for Python linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--fix]
files: ^sdks/python/(src|tests)/
- id: ruff-format
files: ^sdks/python/(src|tests)/
# Local hooks for Python
- repo: local
hooks:
- id: python-mypy
name: python-mypy
entry: bash -c 'cd sdks/python && make typecheck'
language: system
types: [python]
files: ^sdks/python/src/
pass_filenames: false
- id: python-pytest
name: python-pytest
entry: bash -c 'cd sdks/python && make test'
language: system
types: [python]
files: ^sdks/python/(src|tests)/
pass_filenames: false
stages: [pre-commit]
# ============================================================================
# Ruby SDK
# ============================================================================
- id: ruby-rubocop
name: ruby-rubocop
entry: bash -c 'cd sdks/ruby && make lint'
language: system
types: [ruby]
files: ^sdks/ruby/
pass_filenames: false
- id: ruby-rspec
name: ruby-rspec
entry: bash -c 'cd sdks/ruby && make test'
language: system
types: [ruby]
files: ^sdks/ruby/(lib|spec)/
pass_filenames: false
stages: [pre-commit]