solargraph-rails 1.1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/linter.yml +94 -0
- data/.github/workflows/test.yml +185 -0
- data/.github/workflows/typecheck.yml +83 -0
- data/.overcommit.yml +51 -0
- data/.rubocop.yml +334 -0
- data/.rubocop_todo.yml +784 -0
- data/.solargraph.yml +8 -2
- data/CHANGELOG.md +51 -1
- data/DEVELOPMENT.md +8 -19
- data/Gemfile +22 -9
- data/README.md +39 -25
- data/bin/overcommit +27 -0
- data/bin/rubocop +27 -0
- data/ci/auto_yard/plugins.rb +0 -1
- data/lib/solargraph/rails/annotate.rb +10 -0
- data/lib/solargraph/rails/annotations/action_controller.rb +57 -5
- data/lib/solargraph/rails/annotations/action_text.rb +11 -0
- data/lib/solargraph/rails/annotations/active_job.rb +276 -0
- data/lib/solargraph/rails/annotations/active_model.rb +18 -0
- data/lib/solargraph/rails/annotations/active_record.rb +54 -3
- data/lib/solargraph/rails/annotations/active_storage.rb +113 -0
- data/lib/solargraph/rails/annotations/active_support.rb +3 -0
- data/lib/solargraph/rails/annotations/array.rb +7 -0
- data/lib/solargraph/rails/annotations/class.rb +2 -0
- data/lib/solargraph/rails/annotations/date.rb +8 -0
- data/lib/solargraph/rails/annotations/module.rb +13 -0
- data/lib/solargraph/rails/annotations/object.rb +3 -0
- data/lib/solargraph/rails/annotations/rails.rb +4 -0
- data/lib/solargraph/rails/annotations/time.rb +6 -2
- data/lib/solargraph/rails/delegate.rb +44 -10
- data/lib/solargraph/rails/model.rb +252 -31
- data/lib/solargraph/rails/rails_api.rb +2 -2
- data/lib/solargraph/rails/schema.rb +27 -8
- data/lib/solargraph/rails/util.rb +45 -4
- data/lib/solargraph/rails/version.rb +1 -1
- data/lib/solargraph-rails.rb +1 -1
- data/script/generate_definitions.rb +49 -24
- data/solargraph-rails.gemspec +14 -5
- metadata +64 -17
- data/.github/workflows/ruby.yml +0 -76
data/.rubocop.yml
ADDED
@@ -0,0 +1,334 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
Gemspec/AddRuntimeDependency: # new in 1.65
|
4
|
+
Enabled: true
|
5
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
6
|
+
Enabled: true
|
7
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
8
|
+
Enabled: true
|
9
|
+
Gemspec/RequireMFA: # new in 1.23
|
10
|
+
Enabled: true
|
11
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
12
|
+
Enabled: true
|
13
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
14
|
+
Enabled: true
|
15
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
16
|
+
Enabled: true
|
17
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
18
|
+
Enabled: true
|
19
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
20
|
+
Enabled: true
|
21
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
22
|
+
Enabled: true
|
23
|
+
Lint/AmbiguousRange: # new in 1.19
|
24
|
+
Enabled: true
|
25
|
+
Lint/ArrayLiteralInRegexp: # new in 1.71
|
26
|
+
Enabled: true
|
27
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
28
|
+
Enabled: true
|
29
|
+
Lint/ConstantReassignment: # new in 1.70
|
30
|
+
Enabled: true
|
31
|
+
Lint/CopDirectiveSyntax: # new in 1.72
|
32
|
+
Enabled: true
|
33
|
+
Lint/DeprecatedConstants: # new in 1.8
|
34
|
+
Enabled: true
|
35
|
+
Lint/DuplicateBranch: # new in 1.3
|
36
|
+
Enabled: true
|
37
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
38
|
+
Enabled: true
|
39
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
40
|
+
Enabled: true
|
41
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
42
|
+
Enabled: true
|
43
|
+
Lint/DuplicateSetElement: # new in 1.67
|
44
|
+
Enabled: true
|
45
|
+
Lint/EmptyBlock: # new in 1.1
|
46
|
+
Enabled: true
|
47
|
+
Lint/EmptyClass: # new in 1.3
|
48
|
+
Enabled: true
|
49
|
+
Lint/EmptyInPattern: # new in 1.16
|
50
|
+
Enabled: true
|
51
|
+
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
|
52
|
+
Enabled: true
|
53
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
54
|
+
Enabled: true
|
55
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
56
|
+
Enabled: true
|
57
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
58
|
+
Enabled: true
|
59
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
60
|
+
Enabled: true
|
61
|
+
Lint/MixedCaseRange: # new in 1.53
|
62
|
+
Enabled: true
|
63
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
64
|
+
Enabled: true
|
65
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
66
|
+
Enabled: true
|
67
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
68
|
+
Enabled: true
|
69
|
+
Lint/NumericOperationWithConstantResult: # new in 1.69
|
70
|
+
Enabled: true
|
71
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
72
|
+
Enabled: true
|
73
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
74
|
+
Enabled: true
|
75
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
76
|
+
Enabled: true
|
77
|
+
Lint/RedundantTypeConversion: # new in 1.72
|
78
|
+
Enabled: true
|
79
|
+
Lint/RefinementImportMethods: # new in 1.27
|
80
|
+
Enabled: true
|
81
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
82
|
+
Enabled: true
|
83
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
84
|
+
Enabled: true
|
85
|
+
Lint/SharedMutableDefault: # new in 1.70
|
86
|
+
Enabled: true
|
87
|
+
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
|
88
|
+
Enabled: true
|
89
|
+
Lint/SymbolConversion: # new in 1.9
|
90
|
+
Enabled: true
|
91
|
+
Lint/ToEnumArguments: # new in 1.1
|
92
|
+
Enabled: true
|
93
|
+
Lint/TripleQuotes: # new in 1.9
|
94
|
+
Enabled: true
|
95
|
+
Lint/UnescapedBracketInRegexp: # new in 1.68
|
96
|
+
Enabled: true
|
97
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
98
|
+
Enabled: true
|
99
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
100
|
+
Enabled: true
|
101
|
+
Lint/UselessConstantScoping: # new in 1.72
|
102
|
+
Enabled: true
|
103
|
+
Lint/UselessDefaultValueArgument: # new in 1.76
|
104
|
+
Enabled: true
|
105
|
+
Lint/UselessDefined: # new in 1.69
|
106
|
+
Enabled: true
|
107
|
+
Lint/UselessNumericOperation: # new in 1.66
|
108
|
+
Enabled: true
|
109
|
+
Lint/UselessOr: # new in 1.76
|
110
|
+
Enabled: true
|
111
|
+
Lint/UselessRescue: # new in 1.43
|
112
|
+
Enabled: true
|
113
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
114
|
+
Enabled: true
|
115
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
116
|
+
Enabled: true
|
117
|
+
Naming/BlockForwarding: # new in 1.24
|
118
|
+
Enabled: true
|
119
|
+
Naming/PredicateMethod: # new in 1.76
|
120
|
+
Enabled: true
|
121
|
+
Naming/PredicatePrefix:
|
122
|
+
Exclude:
|
123
|
+
- lib/solargraph/rails/annotations/**/*.rb
|
124
|
+
Security/CompoundHash: # new in 1.28
|
125
|
+
Enabled: true
|
126
|
+
Security/IoMethods: # new in 1.22
|
127
|
+
Enabled: true
|
128
|
+
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
|
129
|
+
Enabled: true
|
130
|
+
Style/ArgumentsForwarding: # new in 1.1
|
131
|
+
Enabled: true
|
132
|
+
Style/ArrayIntersect: # new in 1.40
|
133
|
+
Enabled: true
|
134
|
+
Style/BitwisePredicate: # new in 1.68
|
135
|
+
Enabled: true
|
136
|
+
Style/CollectionCompact: # new in 1.2
|
137
|
+
Enabled: true
|
138
|
+
Style/CombinableDefined: # new in 1.68
|
139
|
+
Enabled: true
|
140
|
+
Style/ComparableBetween: # new in 1.74
|
141
|
+
Enabled: true
|
142
|
+
Style/ComparableClamp: # new in 1.44
|
143
|
+
Enabled: true
|
144
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
145
|
+
Enabled: true
|
146
|
+
Style/DataInheritance: # new in 1.49
|
147
|
+
Enabled: true
|
148
|
+
Style/DigChain: # new in 1.69
|
149
|
+
Enabled: true
|
150
|
+
Style/DirEmpty: # new in 1.48
|
151
|
+
Enabled: true
|
152
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
153
|
+
Enabled: true
|
154
|
+
Style/EmptyHeredoc: # new in 1.32
|
155
|
+
Enabled: true
|
156
|
+
Style/EmptyStringInsideInterpolation: # new in 1.76
|
157
|
+
Enabled: true
|
158
|
+
Style/EndlessMethod: # new in 1.8
|
159
|
+
Enabled: true
|
160
|
+
Style/EnvHome: # new in 1.29
|
161
|
+
Enabled: true
|
162
|
+
Style/ExactRegexpMatch: # new in 1.51
|
163
|
+
Enabled: true
|
164
|
+
Style/FetchEnvVar: # new in 1.28
|
165
|
+
Enabled: true
|
166
|
+
Style/FileEmpty: # new in 1.48
|
167
|
+
Enabled: true
|
168
|
+
Style/FileNull: # new in 1.69
|
169
|
+
Enabled: true
|
170
|
+
Style/FileRead: # new in 1.24
|
171
|
+
Enabled: true
|
172
|
+
Style/FileTouch: # new in 1.69
|
173
|
+
Enabled: true
|
174
|
+
Style/FileWrite: # new in 1.24
|
175
|
+
Enabled: true
|
176
|
+
Style/HashConversion: # new in 1.10
|
177
|
+
Enabled: true
|
178
|
+
Style/HashExcept: # new in 1.7
|
179
|
+
Enabled: true
|
180
|
+
Style/HashFetchChain: # new in 1.75
|
181
|
+
Enabled: true
|
182
|
+
Style/HashSlice: # new in 1.71
|
183
|
+
Enabled: true
|
184
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
185
|
+
Enabled: true
|
186
|
+
Style/InPatternThen: # new in 1.16
|
187
|
+
Enabled: true
|
188
|
+
Style/ItAssignment: # new in 1.70
|
189
|
+
Enabled: true
|
190
|
+
Style/ItBlockParameter: # new in 1.75
|
191
|
+
Enabled: true
|
192
|
+
Style/KeywordArgumentsMerging: # new in 1.68
|
193
|
+
Enabled: true
|
194
|
+
Style/MagicCommentFormat: # new in 1.35
|
195
|
+
Enabled: true
|
196
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
197
|
+
Enabled: true
|
198
|
+
Style/MapIntoArray: # new in 1.63
|
199
|
+
Enabled: true
|
200
|
+
Style/MapToHash: # new in 1.24
|
201
|
+
Enabled: true
|
202
|
+
Style/MapToSet: # new in 1.42
|
203
|
+
Enabled: true
|
204
|
+
Style/MinMaxComparison: # new in 1.42
|
205
|
+
Enabled: true
|
206
|
+
Style/MultilineInPatternThen: # new in 1.16
|
207
|
+
Enabled: true
|
208
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
209
|
+
Enabled: true
|
210
|
+
Style/NestedFileDirname: # new in 1.26
|
211
|
+
Enabled: true
|
212
|
+
Style/NilLambda: # new in 1.3
|
213
|
+
Enabled: true
|
214
|
+
Style/NumberedParameters: # new in 1.22
|
215
|
+
Enabled: true
|
216
|
+
Style/NumberedParametersLimit: # new in 1.22
|
217
|
+
Enabled: true
|
218
|
+
Style/ObjectThen: # new in 1.28
|
219
|
+
Enabled: true
|
220
|
+
Style/OpenStructUse: # new in 1.23
|
221
|
+
Enabled: true
|
222
|
+
Style/OperatorMethodCall: # new in 1.37
|
223
|
+
Enabled: true
|
224
|
+
Style/OptionalBooleanParameter:
|
225
|
+
Exclude:
|
226
|
+
- lib/solargraph/rails/annotations/**/*.rb
|
227
|
+
Style/QuotedSymbols: # new in 1.16
|
228
|
+
Enabled: true
|
229
|
+
Style/RedundantArgument: # new in 1.4
|
230
|
+
Enabled: true
|
231
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
232
|
+
Enabled: true
|
233
|
+
Style/RedundantArrayFlatten: # new in 1.76
|
234
|
+
Enabled: true
|
235
|
+
Style/RedundantConstantBase: # new in 1.40
|
236
|
+
Enabled: true
|
237
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
238
|
+
Enabled: true
|
239
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
240
|
+
Enabled: true
|
241
|
+
Style/RedundantEach: # new in 1.38
|
242
|
+
Enabled: true
|
243
|
+
Style/RedundantFilterChain: # new in 1.52
|
244
|
+
Enabled: true
|
245
|
+
Style/RedundantFormat: # new in 1.72
|
246
|
+
Enabled: true
|
247
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
248
|
+
Enabled: true
|
249
|
+
Style/RedundantInitialize: # new in 1.27
|
250
|
+
Enabled: true
|
251
|
+
Style/RedundantInterpolationUnfreeze: # new in 1.66
|
252
|
+
Enabled: true
|
253
|
+
Style/RedundantLineContinuation: # new in 1.49
|
254
|
+
Enabled: true
|
255
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
256
|
+
Enabled: true
|
257
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
258
|
+
Enabled: true
|
259
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
260
|
+
Enabled: true
|
261
|
+
Style/RedundantStringEscape: # new in 1.37
|
262
|
+
Enabled: true
|
263
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
264
|
+
Enabled: true
|
265
|
+
Style/SafeNavigationChainLength: # new in 1.68
|
266
|
+
Enabled: true
|
267
|
+
Style/SelectByRegexp: # new in 1.22
|
268
|
+
Enabled: true
|
269
|
+
Style/SendWithLiteralMethodName: # new in 1.64
|
270
|
+
Enabled: true
|
271
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
272
|
+
Enabled: true
|
273
|
+
Style/StringChars: # new in 1.12
|
274
|
+
Enabled: true
|
275
|
+
Style/SuperArguments: # new in 1.64
|
276
|
+
Enabled: true
|
277
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
278
|
+
Enabled: true
|
279
|
+
Style/SwapValues: # new in 1.1
|
280
|
+
Enabled: true
|
281
|
+
Style/YAMLFileRead: # new in 1.53
|
282
|
+
Enabled: true
|
283
|
+
Performance/AncestorsInclude: # new in 1.7
|
284
|
+
Enabled: true
|
285
|
+
Performance/BigDecimalWithNumericArgument: # new in 1.7
|
286
|
+
Enabled: true
|
287
|
+
Performance/CollectionLiteralInLoop: # new in 1.8
|
288
|
+
Enabled: true
|
289
|
+
Performance/ConcurrentMonotonicTime: # new in 1.12
|
290
|
+
Enabled: true
|
291
|
+
Performance/ConstantRegexp: # new in 1.9
|
292
|
+
Enabled: true
|
293
|
+
Performance/MapCompact: # new in 1.11
|
294
|
+
Enabled: true
|
295
|
+
Performance/MapMethodChain: # new in 1.19
|
296
|
+
Enabled: true
|
297
|
+
Performance/MethodObjectAsBlock: # new in 1.9
|
298
|
+
Enabled: true
|
299
|
+
Performance/RedundantEqualityComparisonBlock: # new in 1.10
|
300
|
+
Enabled: true
|
301
|
+
Performance/RedundantSortBlock: # new in 1.7
|
302
|
+
Enabled: true
|
303
|
+
Performance/RedundantSplitRegexpArgument: # new in 1.10
|
304
|
+
Enabled: true
|
305
|
+
Performance/RedundantStringChars: # new in 1.7
|
306
|
+
Enabled: true
|
307
|
+
Performance/ReverseFirst: # new in 1.7
|
308
|
+
Enabled: true
|
309
|
+
Performance/SortReverse: # new in 1.7
|
310
|
+
Enabled: true
|
311
|
+
Performance/Squeeze: # new in 1.7
|
312
|
+
Enabled: true
|
313
|
+
Performance/StringBytesize: # new in 1.23
|
314
|
+
Enabled: true
|
315
|
+
Performance/StringIdentifierArgument: # new in 1.13
|
316
|
+
Enabled: true
|
317
|
+
Performance/StringInclude: # new in 1.7
|
318
|
+
Enabled: true
|
319
|
+
Performance/Sum: # new in 1.8
|
320
|
+
Enabled: true
|
321
|
+
Performance/ZipWithoutBlock: # new in 1.24
|
322
|
+
Enabled: true
|
323
|
+
RSpec/IncludeExamples: # new in 3.6
|
324
|
+
Enabled: true
|
325
|
+
Gemspec/AttributeAssignment: # new in 1.77
|
326
|
+
Enabled: true
|
327
|
+
Style/CollectionQuerying: # new in 1.77
|
328
|
+
Enabled: true
|
329
|
+
|
330
|
+
plugins:
|
331
|
+
- rubocop-performance
|
332
|
+
- rubocop-rspec
|
333
|
+
- rubocop-rake
|
334
|
+
- rubocop-yard
|