forked from manyfold3d/manyfold
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.yard-lint.yml
More file actions
175 lines (150 loc) · 4.25 KB
/
.yard-lint.yml
File metadata and controls
175 lines (150 loc) · 4.25 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# YARD-Lint Configuration
# See https://github.com/mensfeld/yard-lint for documentation
# Global settings for all validators
AllValidators:
# YARD command-line options (applied to all validators by default)
YardOptions:
# - --private
# - --protected
# Global file exclusion patterns
Exclude:
- '\.git'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'spec/**/*'
- 'test/**/*'
- 'config/db/**/*'
# Exit code behavior (error, warning, convention, never)
FailOnSeverity: warning
# Minimum documentation coverage percentage (0-100)
# Fails if coverage is below this threshold
# MinCoverage: 80.0
# Diff mode settings
DiffMode:
# Default base ref for --diff (auto-detects main/master if not specified)
DefaultBaseRef: ~
# Documentation validators
Documentation/UndocumentedObjects:
Description: 'Checks for classes, modules, and methods without documentation.'
Enabled: true
Severity: warning
ExcludedMethods:
- 'initialize/0' # Exclude parameter-less initialize
- '/^_/' # Exclude private methods (by convention)
Documentation/UndocumentedMethodArguments:
Description: 'Checks for method parameters without @param tags.'
Enabled: true
Severity: warning
Documentation/UndocumentedBooleanMethods:
Description: 'Checks that question mark methods document their boolean return.'
Enabled: true
Severity: warning
Documentation/UndocumentedOptions:
Description: 'Detects methods with options hash parameters but no @option tags.'
Enabled: true
Severity: warning
Documentation/MarkdownSyntax:
Description: 'Detects common markdown syntax errors in documentation.'
Enabled: true
Severity: warning
# Tags validators
Tags/Order:
Description: 'Enforces consistent ordering of YARD tags.'
Enabled: true
Severity: convention
EnforcedOrder:
- param
- option
- return
- raise
- example
Tags/InvalidTypes:
Description: 'Validates type definitions in @param, @return, @option tags.'
Enabled: true
Severity: warning
ValidatedTags:
- param
- option
- return
Tags/TypeSyntax:
Description: 'Validates YARD type syntax using YARD parser.'
Enabled: true
Severity: warning
ValidatedTags:
- param
- option
- return
- yieldreturn
Tags/MeaninglessTag:
Description: 'Detects @param/@option tags on classes, modules, or constants.'
Enabled: true
Severity: warning
CheckedTags:
- param
- option
InvalidObjectTypes:
- class
- module
- constant
Tags/CollectionType:
Description: 'Validates Hash collection syntax consistency.'
Enabled: true
Severity: convention
EnforcedStyle: long # 'long' for Hash{K => V} (YARD standard), 'short' for {K => V}
ValidatedTags:
- param
- option
- return
- yieldreturn
Tags/TagTypePosition:
Description: 'Validates type annotation position in tags.'
Enabled: true
Severity: convention
CheckedTags:
- param
- option
# EnforcedStyle: 'type_after_name' (YARD standard: @param name [Type])
# or 'type_first' (@param [Type] name)
EnforcedStyle: type_after_name
Tags/ApiTags:
Description: 'Enforces @api tags on public objects.'
Enabled: false # Opt-in validator
Severity: warning
AllowedApis:
- public
- private
- internal
Tags/OptionTags:
Description: 'Requires @option tags for methods with options parameters.'
Enabled: true
Severity: warning
# Warnings validators - catches YARD parser errors
Warnings/UnknownTag:
Description: 'Detects unknown YARD tags.'
Enabled: true
Severity: error
Warnings/UnknownDirective:
Description: 'Detects unknown YARD directives.'
Enabled: true
Severity: error
Warnings/InvalidTagFormat:
Description: 'Detects malformed tag syntax.'
Enabled: true
Severity: error
Warnings/InvalidDirectiveFormat:
Description: 'Detects malformed directive syntax.'
Enabled: true
Severity: error
Warnings/DuplicatedParameterName:
Description: 'Detects duplicate @param tags.'
Enabled: true
Severity: error
Warnings/UnknownParameterName:
Description: 'Detects @param tags for non-existent parameters.'
Enabled: true
Severity: error
# Semantic validators
Semantic/AbstractMethods:
Description: 'Ensures @abstract methods do not have real implementations.'
Enabled: true
Severity: warning