Skip to content

Commit 35de077

Browse files
committed
Fix RuboCop configuration and style violations
- Update .rubocop.yml to use 'plugins:' instead of deprecated 'require:' syntax - Add NewCops: enable and explicit configuration for all new cops - Fix line length violations in http_client.rb and spec files - Fix hash alignment and trailing comma issues in specs - Remove trailing whitespace and fix array indentation in spec_helper.rb This resolves all RuboCop warnings and style violations.
1 parent d26877e commit 35de077

File tree

4 files changed

+387
-9
lines changed

4 files changed

+387
-9
lines changed

.rubocop.yml

Lines changed: 378 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
inherit_from: .rubocop_todo.yml
22

3-
require:
3+
plugins:
44
- rubocop-rspec
55
- rubocop-capybara
66

77
AllCops:
88
TargetRubyVersion: 3.0
99
DisplayCopNames: true
1010
DisplayStyleGuide: true
11+
NewCops: enable
1112
Exclude:
1213
- examples/**/*
1314
- vendor/**/*
@@ -59,3 +60,379 @@ RSpec/ExampleLength:
5960

6061
RSpec/FilePath:
6162
Enabled: false
63+
64+
# New cops - explicitly enabled/disabled
65+
Gemspec/AddRuntimeDependency:
66+
Enabled: true
67+
Gemspec/AttributeAssignment:
68+
Enabled: true
69+
Gemspec/DeprecatedAttributeAssignment:
70+
Enabled: true
71+
Gemspec/DevelopmentDependencies:
72+
Enabled: true
73+
Gemspec/RequireMFA:
74+
Enabled: true
75+
Layout/EmptyLinesAfterModuleInclusion:
76+
Enabled: true
77+
Layout/LineContinuationLeadingSpace:
78+
Enabled: true
79+
Layout/LineContinuationSpacing:
80+
Enabled: true
81+
Layout/LineEndStringConcatenationIndentation:
82+
Enabled: true
83+
Layout/SpaceBeforeBrackets:
84+
Enabled: true
85+
Lint/AmbiguousAssignment:
86+
Enabled: true
87+
Lint/AmbiguousOperatorPrecedence:
88+
Enabled: true
89+
Lint/AmbiguousRange:
90+
Enabled: true
91+
Lint/ArrayLiteralInRegexp:
92+
Enabled: true
93+
Lint/ConstantOverwrittenInRescue:
94+
Enabled: true
95+
Lint/ConstantReassignment:
96+
Enabled: true
97+
Lint/CopDirectiveSyntax:
98+
Enabled: true
99+
Lint/DeprecatedConstants:
100+
Enabled: true
101+
Lint/DuplicateBranch:
102+
Enabled: true
103+
Lint/DuplicateMagicComment:
104+
Enabled: true
105+
Lint/DuplicateMatchPattern:
106+
Enabled: true
107+
Lint/DuplicateRegexpCharacterClassElement:
108+
Enabled: true
109+
Lint/DuplicateSetElement:
110+
Enabled: true
111+
Lint/EmptyBlock:
112+
Enabled: true
113+
Lint/EmptyClass:
114+
Enabled: true
115+
Lint/EmptyInPattern:
116+
Enabled: true
117+
Lint/HashNewWithKeywordArgumentsAsDefault:
118+
Enabled: true
119+
Lint/IncompatibleIoSelectWithFiberScheduler:
120+
Enabled: true
121+
Lint/ItWithoutArgumentsInBlock:
122+
Enabled: true
123+
Lint/LambdaWithoutLiteralBlock:
124+
Enabled: true
125+
Lint/LiteralAssignmentInCondition:
126+
Enabled: true
127+
Lint/MixedCaseRange:
128+
Enabled: true
129+
Lint/NoReturnInBeginEndBlocks:
130+
Enabled: true
131+
Lint/NonAtomicFileOperation:
132+
Enabled: true
133+
Lint/NumberedParameterAssignment:
134+
Enabled: true
135+
Lint/NumericOperationWithConstantResult:
136+
Enabled: true
137+
Lint/OrAssignmentToConstant:
138+
Enabled: true
139+
Lint/RedundantDirGlobSort:
140+
Enabled: true
141+
Lint/RedundantRegexpQuantifiers:
142+
Enabled: true
143+
Lint/RedundantTypeConversion:
144+
Enabled: true
145+
Lint/RefinementImportMethods:
146+
Enabled: true
147+
Lint/RequireRangeParentheses:
148+
Enabled: true
149+
Lint/RequireRelativeSelfPath:
150+
Enabled: true
151+
Lint/SharedMutableDefault:
152+
Enabled: true
153+
Lint/SuppressedExceptionInNumberConversion:
154+
Enabled: true
155+
Lint/SymbolConversion:
156+
Enabled: true
157+
Lint/ToEnumArguments:
158+
Enabled: true
159+
Lint/TripleQuotes:
160+
Enabled: true
161+
Lint/UnescapedBracketInRegexp:
162+
Enabled: true
163+
Lint/UnexpectedBlockArity:
164+
Enabled: true
165+
Lint/UnmodifiedReduceAccumulator:
166+
Enabled: true
167+
Lint/UselessConstantScoping:
168+
Enabled: true
169+
Lint/UselessDefaultValueArgument:
170+
Enabled: true
171+
Lint/UselessDefined:
172+
Enabled: true
173+
Lint/UselessNumericOperation:
174+
Enabled: true
175+
Lint/UselessOr:
176+
Enabled: true
177+
Lint/UselessRescue:
178+
Enabled: true
179+
Lint/UselessRuby2Keywords:
180+
Enabled: true
181+
Metrics/CollectionLiteralLength:
182+
Enabled: true
183+
Naming/BlockForwarding:
184+
Enabled: true
185+
Naming/PredicateMethod:
186+
Enabled: true
187+
Security/CompoundHash:
188+
Enabled: true
189+
Security/IoMethods:
190+
Enabled: true
191+
Style/AmbiguousEndlessMethodDefinition:
192+
Enabled: true
193+
Style/ArgumentsForwarding:
194+
Enabled: true
195+
Style/ArrayIntersect:
196+
Enabled: true
197+
Style/ArrayIntersectWithSingleElement:
198+
Enabled: true
199+
Style/BitwisePredicate:
200+
Enabled: true
201+
Style/CollectionCompact:
202+
Enabled: true
203+
Style/CollectionQuerying:
204+
Enabled: true
205+
Style/CombinableDefined:
206+
Enabled: true
207+
Style/ComparableBetween:
208+
Enabled: true
209+
Style/ComparableClamp:
210+
Enabled: true
211+
Style/ConcatArrayLiterals:
212+
Enabled: true
213+
Style/DataInheritance:
214+
Enabled: true
215+
Style/DigChain:
216+
Enabled: true
217+
Style/DirEmpty:
218+
Enabled: true
219+
Style/DocumentDynamicEvalDefinition:
220+
Enabled: true
221+
Style/EmptyHeredoc:
222+
Enabled: true
223+
Style/EmptyStringInsideInterpolation:
224+
Enabled: true
225+
Style/EndlessMethod:
226+
Enabled: true
227+
Style/EnvHome:
228+
Enabled: true
229+
Style/ExactRegexpMatch:
230+
Enabled: true
231+
Style/FetchEnvVar:
232+
Enabled: true
233+
Style/FileEmpty:
234+
Enabled: true
235+
Style/FileNull:
236+
Enabled: true
237+
Style/FileRead:
238+
Enabled: true
239+
Style/FileTouch:
240+
Enabled: true
241+
Style/FileWrite:
242+
Enabled: true
243+
Style/HashConversion:
244+
Enabled: true
245+
Style/HashExcept:
246+
Enabled: true
247+
Style/HashFetchChain:
248+
Enabled: true
249+
Style/HashSlice:
250+
Enabled: true
251+
Style/IfWithBooleanLiteralBranches:
252+
Enabled: true
253+
Style/InPatternThen:
254+
Enabled: true
255+
Style/ItAssignment:
256+
Enabled: true
257+
Style/ItBlockParameter:
258+
Enabled: true
259+
Style/KeywordArgumentsMerging:
260+
Enabled: true
261+
Style/MagicCommentFormat:
262+
Enabled: true
263+
Style/MapCompactWithConditionalBlock:
264+
Enabled: true
265+
Style/MapIntoArray:
266+
Enabled: true
267+
Style/MapToHash:
268+
Enabled: true
269+
Style/MapToSet:
270+
Enabled: true
271+
Style/MinMaxComparison:
272+
Enabled: true
273+
Style/MultilineInPatternThen:
274+
Enabled: true
275+
Style/NegatedIfElseCondition:
276+
Enabled: true
277+
Style/NestedFileDirname:
278+
Enabled: true
279+
Style/NilLambda:
280+
Enabled: true
281+
Style/NumberedParameters:
282+
Enabled: true
283+
Style/NumberedParametersLimit:
284+
Enabled: true
285+
Style/ObjectThen:
286+
Enabled: true
287+
Style/OpenStructUse:
288+
Enabled: true
289+
Style/OperatorMethodCall:
290+
Enabled: true
291+
Style/QuotedSymbols:
292+
Enabled: true
293+
Style/RedundantArgument:
294+
Enabled: true
295+
Style/RedundantArrayConstructor:
296+
Enabled: true
297+
Style/RedundantArrayFlatten:
298+
Enabled: true
299+
Style/RedundantConstantBase:
300+
Enabled: true
301+
Style/RedundantCurrentDirectoryInPath:
302+
Enabled: true
303+
Style/RedundantDoubleSplatHashBraces:
304+
Enabled: true
305+
Style/RedundantEach:
306+
Enabled: true
307+
Style/RedundantFilterChain:
308+
Enabled: true
309+
Style/RedundantFormat:
310+
Enabled: true
311+
Style/RedundantHeredocDelimiterQuotes:
312+
Enabled: true
313+
Style/RedundantInitialize:
314+
Enabled: true
315+
Style/RedundantInterpolationUnfreeze:
316+
Enabled: true
317+
Style/RedundantLineContinuation:
318+
Enabled: true
319+
Style/RedundantRegexpArgument:
320+
Enabled: true
321+
Style/RedundantRegexpConstructor:
322+
Enabled: true
323+
Style/RedundantSelfAssignmentBranch:
324+
Enabled: true
325+
Style/RedundantStringEscape:
326+
Enabled: true
327+
Style/ReturnNilInPredicateMethodDefinition:
328+
Enabled: true
329+
Style/SafeNavigationChainLength:
330+
Enabled: true
331+
Style/SelectByRegexp:
332+
Enabled: true
333+
Style/SendWithLiteralMethodName:
334+
Enabled: true
335+
Style/SingleLineDoEndBlock:
336+
Enabled: true
337+
Style/StringChars:
338+
Enabled: true
339+
Style/SuperArguments:
340+
Enabled: true
341+
Style/SuperWithArgsParentheses:
342+
Enabled: true
343+
Style/SwapValues:
344+
Enabled: true
345+
Style/YAMLFileRead:
346+
Enabled: true
347+
RSpecRails/AvoidSetupHook:
348+
Enabled: true
349+
RSpecRails/HaveHttpStatus:
350+
Enabled: true
351+
RSpecRails/InferredSpecType:
352+
Enabled: true
353+
RSpecRails/MinitestAssertions:
354+
Enabled: true
355+
RSpecRails/NegationBeValid:
356+
Enabled: true
357+
RSpecRails/TravelAround:
358+
Enabled: true
359+
RSpec/BeEmpty:
360+
Enabled: true
361+
RSpec/BeEq:
362+
Enabled: true
363+
RSpec/BeNil:
364+
Enabled: true
365+
RSpec/ChangeByZero:
366+
Enabled: true
367+
RSpec/ContainExactly:
368+
Enabled: true
369+
RSpec/DuplicatedMetadata:
370+
Enabled: true
371+
RSpec/EmptyMetadata:
372+
Enabled: true
373+
RSpec/EmptyOutput:
374+
Enabled: true
375+
RSpec/Eq:
376+
Enabled: true
377+
RSpec/ExcessiveDocstringSpacing:
378+
Enabled: true
379+
RSpec/ExpectInLet:
380+
Enabled: true
381+
RSpec/IdenticalEqualityAssertion:
382+
Enabled: true
383+
RSpec/IndexedLet:
384+
Enabled: true
385+
RSpec/IsExpectedSpecify:
386+
Enabled: true
387+
RSpec/MatchArray:
388+
Enabled: true
389+
RSpec/MetadataStyle:
390+
Enabled: true
391+
RSpec/NoExpectationExample:
392+
Enabled: true
393+
RSpec/PendingWithoutReason:
394+
Enabled: true
395+
RSpec/ReceiveMessages:
396+
Enabled: true
397+
RSpec/RedundantAround:
398+
Enabled: true
399+
RSpec/RedundantPredicateMatcher:
400+
Enabled: true
401+
RSpec/RemoveConst:
402+
Enabled: true
403+
RSpec/RepeatedSubjectCall:
404+
Enabled: true
405+
RSpec/SkipBlockInsideExample:
406+
Enabled: true
407+
RSpec/SortMetadata:
408+
Enabled: true
409+
RSpec/SpecFilePathFormat:
410+
Enabled: true
411+
RSpec/SpecFilePathSuffix:
412+
Enabled: true
413+
RSpec/SubjectDeclaration:
414+
Enabled: true
415+
RSpec/UndescriptiveLiteralsDescription:
416+
Enabled: true
417+
RSpec/VerifiedDoubleReference:
418+
Enabled: true
419+
Capybara/FindAllFirst:
420+
Enabled: true
421+
Capybara/MatchStyle:
422+
Enabled: true
423+
Capybara/NegationMatcher:
424+
Enabled: true
425+
Capybara/NegationMatcherAfterVisit:
426+
Enabled: true
427+
Capybara/RedundantWithinFind:
428+
Enabled: true
429+
Capybara/SpecificActions:
430+
Enabled: true
431+
Capybara/SpecificFinders:
432+
Enabled: true
433+
Capybara/SpecificMatcher:
434+
Enabled: true
435+
Capybara/RSpec/HaveSelector:
436+
Enabled: true
437+
Capybara/RSpec/PredicateMatcher:
438+
Enabled: true

0 commit comments

Comments
 (0)