-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.yard-lint.yml
More file actions
275 lines (247 loc) · 5.65 KB
/
.yard-lint.yml
File metadata and controls
275 lines (247 loc) · 5.65 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# YARD-Lint Configuration
# See https://github.com/mensfeld/yard-lint for documentation
# Global settings for all validators
AllValidators:
YardOptions:
- "--private"
- "--protected"
Exclude:
- .git/**/*
- vendor/**/*
- node_modules/**/*
- test/**/*
FailOnSeverity: convention
MinCoverage: 98.0
DiffMode:
DefaultBaseRef:
# Documentation validators
Documentation/UndocumentedObjects:
Description: Checks for classes, modules, and methods without documentation.
Enabled: true
Severity: error
ExcludedMethods:
- initialize/0
- "/^_/"
Documentation/UndocumentedMethodArguments:
Description: Checks for method parameters without @param tags.
Enabled: true
Severity: error
Documentation/UndocumentedBooleanMethods:
Description: Checks that question mark methods document their boolean return.
Enabled: true
Severity: error
Documentation/UndocumentedOptions:
Description: Detects methods with options hash parameters but no @option tags.
Enabled: true
Severity: error
Documentation/MarkdownSyntax:
Description: Detects common markdown syntax errors in documentation.
Enabled: true
Severity: error
Documentation/EmptyCommentLine:
Description: Detects empty comment lines at the start or end of documentation blocks.
Enabled: true
Severity: convention
EnabledPatterns:
Leading: true
Trailing: true
Documentation/BlankLineBeforeDefinition:
Description: Detects blank lines between YARD documentation and method definition.
Enabled: true
Severity: convention
OrphanedSeverity: convention
EnabledPatterns:
SingleBlankLine: true
OrphanedDocs: true
# Tags validators
Tags/Order:
Description: Enforces consistent ordering of YARD tags.
Enabled: true
Severity: error
EnforcedOrder:
- param
- option
- return
- raise
- example
Tags/InvalidTypes:
Description: Validates type definitions in @param, @return, @option tags.
Enabled: true
Severity: error
ValidatedTags:
- param
- option
- return
Tags/TypeSyntax:
Description: Validates YARD type syntax using YARD parser.
Enabled: true
Severity: error
ValidatedTags:
- param
- option
- return
- yieldreturn
Tags/MeaninglessTag:
Description: Detects @param/@option tags on classes, modules, or constants.
Enabled: true
Severity: error
CheckedTags:
- param
- option
InvalidObjectTypes:
- class
- module
- constant
Tags/CollectionType:
Description: Validates Hash collection syntax consistency.
Enabled: true
Severity: error
EnforcedStyle: long
ValidatedTags:
- param
- option
- return
- yieldreturn
Tags/TagTypePosition:
Description: Validates type annotation position in tags.
Enabled: true
Severity: error
CheckedTags:
- param
- option
EnforcedStyle: type_after_name
Tags/ApiTags:
Description: Enforces @api tags on public objects.
Enabled: false
Severity: error
AllowedApis:
- public
- private
- internal
Tags/OptionTags:
Description: Requires @option tags for methods with options parameters.
Enabled: true
Severity: error
Tags/ExampleSyntax:
Description: Validates Ruby syntax in @example tags.
Enabled: true
Severity: warning
Tags/RedundantParamDescription:
Description: Detects meaningless parameter descriptions that add no value.
Enabled: true
Severity: convention
CheckedTags:
- param
- option
Articles:
- The
- the
- A
- a
- An
- an
MaxRedundantWords: 6
GenericTerms:
- object
- instance
- value
- data
- item
- element
EnabledPatterns:
ArticleParam: true
PossessiveParam: true
TypeRestatement: true
ParamToVerb: true
IdPattern: true
DirectionalDate: true
TypeGeneric: true
Tags/InformalNotation:
Description: Detects informal tag notation patterns like "Note:" instead of @note.
Enabled: true
Severity: warning
CaseSensitive: false
RequireStartOfLine: true
Patterns:
Note: "@note"
Todo: "@todo"
TODO: "@todo"
FIXME: "@todo"
See: "@see"
See also: "@see"
Warning: "@deprecated"
Deprecated: "@deprecated"
Author: "@author"
Version: "@version"
Since: "@since"
Returns: "@return"
Raises: "@raise"
Example: "@example"
Tags/NonAsciiType:
Description: Detects non-ASCII characters in type annotations.
Enabled: true
Severity: warning
ValidatedTags:
- param
- option
- return
- yieldreturn
- yieldparam
Tags/TagGroupSeparator:
Description: Enforces blank line separators between different YARD tag groups.
Enabled: false
Severity: convention
TagGroups:
param:
- param
- option
return:
- return
error:
- raise
- throws
example:
- example
meta:
- see
- note
- todo
- deprecated
- since
- version
- api
yield:
- yield
- yieldparam
- yieldreturn
RequireAfterDescription: false
# 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: error