-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathroam-guard-rules.default.yml
More file actions
36 lines (35 loc) · 1.3 KB
/
Copy pathroam-guard-rules.default.yml
File metadata and controls
36 lines (35 loc) · 1.3 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
# Roam Guard — DEFAULT rule pack (built-in).
#
# Copy this file, edit `file_patterns`, and pass `--rules templates/examples/roam-guard-rules.default.yml` to
# `roam guard-pr` (or `roam verification-contract --rules templates/examples/roam-guard-rules.default.yml`).
#
# Each `file_patterns` entry:
# id: verdict reason code emitted when the pattern matches.
# regex: Python re.IGNORECASE pattern matched against changed files.
# applies_to_kinds: command_graph kinds (test / lint / migration / build / ...)
# that should run when this pattern fires.
name: default
version: '1.0'
file_patterns:
- id: auth_file_changed
regex: (?:^|/)auth[/_]|(?:^|/)(?:sessions?|login|jwt|oauth|sanctum)\.|/middleware/auth\b
applies_to_kinds:
- test
- id: migration_file_changed
regex: /(?:migrations?|migrate)/|\.migration\.|database/migrations/
applies_to_kinds:
- migration
- test
- id: public_api_changed
regex: ^(?:src/.*\.py|src/.*\.ts|lib/.*\.rb|app/.*\.php)$
applies_to_kinds:
- test
- id: config_file_changed
regex: \.(?:env|toml|yaml|yml|json)$|^pyproject\.toml$|^package\.json$|^Cargo\.toml$
applies_to_kinds:
- lint
- test
- id: test_file_changed
regex: (?:^|/)(?:tests?|spec|__tests__)(?:/|$)|_test\.|\.test\.|\.spec\.
applies_to_kinds:
- test