-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.structenforce.yaml
More file actions
73 lines (70 loc) · 2.08 KB
/
.structenforce.yaml
File metadata and controls
73 lines (70 loc) · 2.08 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# structenforce.yaml - STRICT enforcement mode
# This configuration is overly restrictive and enforces exact structure
# No new folders allowed beyond what's explicitly listed!
dir_structure:
allowedPaths:
# ONLY these exact paths are allowed - nothing else!
- "." # Root directory only
- "cmd" # cmd directory
- "cmd/structlint" # cmd subdirectory
- "internal" # internal directory
- "internal/app" # internal subdirectories
- "internal/build"
- "internal/cli"
- "internal/config"
- "internal/logging"
- "internal/validator"
- "test" # test directory
- "docs" # docs directory (if it exists)
- "scripts" # scripts directory (if it exists)
# NO wildcards like "cmd/**" - be explicit!
disallowedPaths:
# Explicitly disallow common violations
- "vendor/**"
- "node_modules/**"
- "tmp/**"
- "temp/**"
- ".git/**"
- "*.log"
requiredPaths:
# These MUST exist
- "cmd"
- "internal"
- "test"
file_naming_pattern:
allowed:
# ONLY these exact patterns allowed
- "*.go" # Go source files
- "*.mod" # Go module file
- "*.sum" # Go sum file
- "*.yaml" # YAML config files
- "*.yml" # YAML config files
- "*.md" # Markdown files
- "Makefile" # Makefile
- ".gitignore" # Git ignore
- ".structlint.yaml" # Our config
- ".structenforce.yaml" # Our strict config
- "validation-report.json" # Validation reports
- "large-scale-report.json"
disallowed:
# Strictly forbid these
- "*.env*"
- "*.log"
- "*.tmp"
- "*~"
- "*.swp"
- "*.swo"
- "*.bak"
- "*.backup"
- ".DS_Store"
- "Thumbs.db"
required:
# These MUST exist
- "go.mod"
- "README.md"
- ".gitignore"
- "*.go" # At least one Go file
ignore:
# Minimal ignore list - only what's absolutely necessary
- ".git"
- "bin"