-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.dclintrc.yaml
More file actions
97 lines (78 loc) · 3.27 KB
/
.dclintrc.yaml
File metadata and controls
97 lines (78 loc) · 3.27 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Docker Compose Linter Configuration for BeeCompose
# https://github.com/zavoloklom/docker-compose-linter
#
# Rule Severity Levels:
# 0 = Disabled
# 1 = Warning
# 2 = Error
#
# Auto-fix Usage:
# To automatically fix many issues, run:
# docker run --rm -v "$(pwd):/app" zavoloklom/dclint:latest /app/services -r --fix
#
# This will fix:
# - Remove quotes from volume paths
# - Add quotes to ports
# - Sort services alphabetically
# - Sort dependencies alphabetically
# - Reorder service keys
# Exclude directories from linting
exclude:
- "node_modules"
- ".git"
- "backups"
- "data"
# Rule Configuration
# Note: This project uses version: "3" for all compose files (optional, deprecated)
# and Traefik v3 labels
rules:
# =============================================================================
# Style Rules - Keep configurations consistent and maintainable
# =============================================================================
# Volumes should not have quotes (auto-fixable)
no-quotes-in-volumes: 2
# Sort service dependencies alphabetically (auto-fixable)
service-dependencies-alphabetical-order: 1
# Enforce consistent key ordering within services (auto-fixable)
# Using warning level to allow gradual adoption
service-keys-order: 1
# Sort ports alphabetically within services (auto-fixable)
service-ports-alphabetical-order: 1
# Sort services alphabetically (auto-fixable)
# Using warning level - existing files may not be sorted
services-alphabetical-order: 1
# Enforce top-level property order (auto-fixable)
top-level-properties-order: 1
# =============================================================================
# Security Rules - Prevent vulnerabilities and conflicts
# =============================================================================
# Container names must be unique across all compose files
no-duplicate-container-names: 2
# Exported ports must be unique to avoid conflicts
no-duplicate-exported-ports: 2
# Require explicit interface binding for ports (0.0.0.0)
# All ports must specify the interface to bind to
no-unbound-port-interfaces: 2
# Container names must follow Docker naming conventions
service-container-name-regex: 2
# Require explicit image tags instead of 'latest' or 'stable'
# This is critical for reproducible deployments
# Exception: Redis uses latest per AGENTS.md guidelines
service-image-require-explicit-tag: 2
# =============================================================================
# Best Practice Rules - Reliable and maintainable configurations
# =============================================================================
# Services should use either 'build' or 'image', not both
no-build-and-image: 2
# DISABLED: version field check
# BeeCompose requires version: "3" for all compose files per AGENTS.md
# The linter recommends removing it, but we keep it for compatibility
no-version-field: 0
# Require project 'name' field for explicit project naming
# All compose files must have a name field
require-project-name-field: 2
# Ports should be quoted to prevent YAML parsing issues
# Especially important for ports like 22:22 which could be parsed as base-60
require-quotes-in-ports:
- 2
- quoteType: "double"