Skip to content

Commit b7fb9f5

Browse files
committed
[rb] update to latest rubocop
1 parent a9a909f commit b7fb9f5

3 files changed

Lines changed: 23 additions & 271 deletions

File tree

rb/.rubocop.yml

Lines changed: 10 additions & 258 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,17 @@ require:
44

55
AllCops:
66
TargetRubyVersion: 2.7
7+
NewCops: enable
78
Exclude:
89
- 'lib/selenium/devtools/**/*'
910

10-
Layout/EmptyLinesAroundAttributeAccessor:
11-
Enabled: true
12-
13-
Layout/EmptyLinesAroundClassBody:
14-
Enabled: false
15-
16-
Layout/EmptyLinesAroundModuleBody:
17-
Enabled: false
18-
1911
Layout/LineLength:
2012
AllowedPatterns:
21-
- '\s+# rubocop'
22-
- '^\s*#'
23-
- '^\s*it .*, except: \{.*\} do$'
24-
25-
Layout/SpaceAroundMethodCallOperator:
26-
Enabled: true
13+
- '^\s*#'
2714

2815
Layout/SpaceInsideHashLiteralBraces:
2916
EnforcedStyle: no_space
3017

31-
Lint/DeprecatedOpenSSLConstant:
32-
Enabled: true
33-
34-
Lint/RaiseException:
35-
Enabled: true
36-
37-
Lint/StructNewOverride:
38-
Enabled: true
39-
40-
Lint/SuppressedException:
41-
Enabled: false
42-
4318
Metrics/AbcSize:
4419
Max: 28
4520
Exclude:
@@ -82,9 +57,6 @@ Metrics/ModuleLength:
8257
- 'lib/selenium/webdriver/common/platform.rb'
8358
- 'spec/**/*'
8459

85-
Metrics/ParameterLists:
86-
CountKeywordArgs: false
87-
8860
Metrics/PerceivedComplexity:
8961
Max: 9
9062

@@ -107,37 +79,26 @@ RSpec/AnyInstance:
10779
RSpec/BeforeAfterAll:
10880
Enabled: false
10981

110-
RSpec/ContextWording:
111-
Enabled: false
112-
113-
RSpec/DescribeClass:
114-
Enabled: false
115-
116-
RSpec/DescribedClass:
117-
EnforcedStyle: explicit
118-
11982
RSpec/ExampleLength:
12083
Enabled: false
12184

122-
RSpec/ExampleWording:
123-
Enabled: false
124-
12585
RSpec/InstanceVariable:
12686
Exclude:
12787
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'
12888
- 'spec/integration/selenium/webdriver/chrome/print_pdf_spec.rb'
12989

130-
RSpec/MessageSpies:
131-
Enabled: false
132-
13390
RSpec/MultipleExpectations:
13491
Enabled: false
13592

136-
RSpec/MultipleMemoizedHelpers:
137-
Enabled: false
93+
RSpec/NoExpectationExample:
94+
Exclude:
95+
- 'spec/integration/selenium/webdriver/guard_spec.rb'
96+
- 'spec/integration/selenium/webdriver/takes_screenshot_spec.rb'
13897

139-
Style/Alias:
140-
EnforcedStyle: prefer_alias_method
98+
RSpec/MultipleMemoizedHelpers:
99+
Max: 6
100+
Exclude:
101+
- 'spec/unit/selenium/webdriver/common/interactions/*_spec.rb'
141102

142103
Style/BlockDelimiters:
143104
EnforcedStyle: braces_for_chaining
@@ -155,221 +116,12 @@ Style/Dir:
155116
Style/Documentation:
156117
Enabled: false
157118

158-
Style/ExponentialNotation:
159-
Enabled: true
160-
161119
Style/HashEachMethods:
162120
Enabled: true
163121

164-
Style/HashTransformKeys:
165-
Enabled: true
166-
167-
Style/HashTransformValues:
168-
Enabled: true
169-
170122
# Port Integers do not need underscores
171123
Style/NumericLiterals:
172124
Enabled: false
173125

174126
Style/OptionalBooleanParameter:
175127
Enabled: false
176-
177-
Style/RegexpLiteral:
178-
EnforcedStyle: mixed
179-
180-
Style/SlicingWithRange:
181-
Enabled: true
182-
183-
Style/StringLiterals:
184-
Enabled: false
185-
186-
Style/SignalException:
187-
Exclude:
188-
- 'spec/integration/selenium/webdriver/guard_spec.rb'
189-
190-
RSpec/BeEq:
191-
Enabled: false
192-
193-
# Additional things
194-
Gemspec/DeprecatedAttributeAssignment: # new in 1.10
195-
Enabled: true
196-
Gemspec/RequireMFA: # new in 1.23
197-
Enabled: true
198-
Layout/LineEndStringConcatenationIndentation: # new in 1.18
199-
Enabled: true
200-
Layout/SpaceBeforeBrackets: # new in 1.7
201-
Enabled: true
202-
Lint/AmbiguousAssignment: # new in 1.7
203-
Enabled: true
204-
Lint/AmbiguousOperatorPrecedence: # new in 1.21
205-
Enabled: true
206-
Lint/AmbiguousRange: # new in 1.19
207-
Enabled: true
208-
Lint/DeprecatedConstants: # new in 1.8
209-
Enabled: true
210-
Lint/DuplicateBranch: # new in 1.3
211-
Enabled: true
212-
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
213-
Enabled: true
214-
Lint/EmptyBlock: # new in 1.1
215-
Enabled: true
216-
Lint/EmptyClass: # new in 1.3
217-
Enabled: true
218-
Lint/EmptyInPattern: # new in 1.16
219-
Enabled: true
220-
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
221-
Enabled: true
222-
Lint/LambdaWithoutLiteralBlock: # new in 1.8
223-
Enabled: true
224-
Lint/NoReturnInBeginEndBlocks: # new in 1.2
225-
Enabled: true
226-
Lint/NumberedParameterAssignment: # new in 1.9
227-
Enabled: true
228-
Lint/OrAssignmentToConstant: # new in 1.9
229-
Enabled: true
230-
Lint/RedundantDirGlobSort: # new in 1.8
231-
Enabled: true
232-
Lint/RefinementImportMethods: # new in 1.27
233-
Enabled: true
234-
Lint/RequireRelativeSelfPath: # new in 1.22
235-
Enabled: true
236-
Lint/SymbolConversion: # new in 1.9
237-
Enabled: true
238-
Lint/ToEnumArguments: # new in 1.1
239-
Enabled: true
240-
Lint/TripleQuotes: # new in 1.9
241-
Enabled: true
242-
Lint/UnexpectedBlockArity: # new in 1.5
243-
Enabled: true
244-
Lint/UnmodifiedReduceAccumulator: # new in 1.1
245-
Enabled: true
246-
Lint/UselessRuby2Keywords: # new in 1.23
247-
Enabled: true
248-
Naming/BlockForwarding: # new in 1.24
249-
Enabled: true
250-
Security/CompoundHash: # new in 1.28
251-
Enabled: true
252-
Security/IoMethods: # new in 1.22
253-
Enabled: true
254-
Style/ArgumentsForwarding: # new in 1.1
255-
Enabled: true
256-
Style/CollectionCompact: # new in 1.2
257-
Enabled: true
258-
Style/DocumentDynamicEvalDefinition: # new in 1.1
259-
Enabled: true
260-
Style/EndlessMethod: # new in 1.8
261-
Enabled: true
262-
Style/FetchEnvVar: # new in 1.28
263-
Enabled: true
264-
Style/FileRead: # new in 1.24
265-
Enabled: true
266-
Style/FileWrite: # new in 1.24
267-
Enabled: true
268-
Style/HashConversion: # new in 1.10
269-
Enabled: true
270-
Style/HashExcept: # new in 1.7
271-
Enabled: true
272-
Style/IfWithBooleanLiteralBranches: # new in 1.9
273-
Enabled: true
274-
Style/InPatternThen: # new in 1.16
275-
Enabled: true
276-
Style/MapToHash: # new in 1.24
277-
Enabled: true
278-
Style/MultilineInPatternThen: # new in 1.16
279-
Enabled: true
280-
Style/NegatedIfElseCondition: # new in 1.2
281-
Enabled: true
282-
Style/NestedFileDirname: # new in 1.26
283-
Enabled: true
284-
Style/NilLambda: # new in 1.3
285-
Enabled: true
286-
Style/NumberedParameters: # new in 1.22
287-
Enabled: true
288-
Style/NumberedParametersLimit: # new in 1.22
289-
Enabled: true
290-
Style/ObjectThen: # new in 1.28
291-
Enabled: true
292-
Style/OpenStructUse: # new in 1.23
293-
Enabled: true
294-
Style/QuotedSymbols: # new in 1.16
295-
Enabled: true
296-
Style/RedundantArgument: # new in 1.4
297-
Enabled: true
298-
Style/RedundantInitialize: # new in 1.27
299-
Enabled: true
300-
Style/RedundantSelfAssignmentBranch: # new in 1.19
301-
Enabled: true
302-
Style/SelectByRegexp: # new in 1.22
303-
Enabled: true
304-
Style/StringChars: # new in 1.12
305-
Enabled: true
306-
Style/SwapValues: # new in 1.1
307-
Enabled: true
308-
Performance/AncestorsInclude: # new in 1.7
309-
Enabled: true
310-
Performance/BigDecimalWithNumericArgument: # new in 1.7
311-
Enabled: true
312-
Performance/BlockGivenWithExplicitBlock: # new in 1.9
313-
Enabled: true
314-
Performance/CollectionLiteralInLoop: # new in 1.8
315-
Enabled: true
316-
Performance/ConcurrentMonotonicTime: # new in 1.12
317-
Enabled: true
318-
Performance/ConstantRegexp: # new in 1.9
319-
Enabled: true
320-
Performance/MapCompact: # new in 1.11
321-
Enabled: true
322-
Performance/MethodObjectAsBlock: # new in 1.9
323-
Enabled: true
324-
Performance/RedundantEqualityComparisonBlock: # new in 1.10
325-
Enabled: true
326-
Performance/RedundantSortBlock: # new in 1.7
327-
Enabled: true
328-
Performance/RedundantSplitRegexpArgument: # new in 1.10
329-
Enabled: true
330-
Performance/RedundantStringChars: # new in 1.7
331-
Enabled: true
332-
Performance/ReverseFirst: # new in 1.7
333-
Enabled: true
334-
Performance/SortReverse: # new in 1.7
335-
Enabled: true
336-
Performance/Squeeze: # new in 1.7
337-
Enabled: true
338-
Performance/StringIdentifierArgument: # new in 1.13
339-
Enabled: true
340-
Performance/StringInclude: # new in 1.7
341-
Enabled: true
342-
Performance/Sum: # new in 1.8
343-
Enabled: true
344-
RSpec/BeNil: # new in 2.9.0
345-
Enabled: true
346-
RSpec/ExcessiveDocstringSpacing: # new in 2.5
347-
Enabled: true
348-
RSpec/IdenticalEqualityAssertion: # new in 2.4
349-
Enabled: true
350-
RSpec/SubjectDeclaration: # new in 2.5
351-
Enabled: true
352-
RSpec/VerifiedDoubleReference: # new in 2.10.0
353-
Enabled: true
354-
RSpec/FactoryBot/SyntaxMethods: # new in 2.7
355-
Enabled: true
356-
RSpec/Rails/AvoidSetupHook: # new in 2.4
357-
Enabled: false
358-
Style/EnvHome: # new in 1.29
359-
Enabled: true
360-
Layout/LineContinuationLeadingSpace: # new in 1.31
361-
Enabled: false
362-
Layout/LineContinuationSpacing: # new in 1.31
363-
Enabled: true
364-
Lint/ConstantOverwrittenInRescue: # new in 1.31
365-
Enabled: true
366-
Lint/NonAtomicFileOperation: # new in 1.31
367-
Enabled: true
368-
Style/MapCompactWithConditionalBlock: # new in 1.30
369-
Enabled: true
370-
RSpec/ChangeByZero: # new in 2.11.0
371-
Enabled: true
372-
RSpec/Capybara/SpecificMatcher: # new in 2.12
373-
Enabled: false
374-
RSpec/Rails/HaveHttpStatus: # new in 2.12
375-
Enabled: false

rb/Gemfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ GEM
3434
method_source (~> 1.0)
3535
spoon (~> 0.0)
3636
public_suffix (5.0.1)
37-
rack (2.2.4)
37+
rack (2.2.5)
3838
rainbow (3.1.1)
3939
regexp_parser (2.6.1)
4040
rexml (3.2.5)
@@ -44,29 +44,29 @@ GEM
4444
rspec-mocks (~> 3.12.0)
4545
rspec-core (3.12.0)
4646
rspec-support (~> 3.12.0)
47-
rspec-expectations (3.12.0)
47+
rspec-expectations (3.12.1)
4848
diff-lcs (>= 1.2.0, < 2.0)
4949
rspec-support (~> 3.12.0)
5050
rspec-mocks (3.12.1)
5151
diff-lcs (>= 1.2.0, < 2.0)
5252
rspec-support (~> 3.12.0)
5353
rspec-support (3.12.0)
54-
rubocop (1.40.0)
54+
rubocop (1.42.0)
5555
json (~> 2.3)
5656
parallel (~> 1.10)
5757
parser (>= 3.1.2.1)
5858
rainbow (>= 2.2.2, < 4.0)
5959
regexp_parser (>= 1.8, < 3.0)
6060
rexml (>= 3.2.5, < 4.0)
61-
rubocop-ast (>= 1.23.0, < 2.0)
61+
rubocop-ast (>= 1.24.1, < 2.0)
6262
ruby-progressbar (~> 1.7)
6363
unicode-display_width (>= 1.4.0, < 3.0)
64-
rubocop-ast (1.24.0)
64+
rubocop-ast (1.24.1)
6565
parser (>= 3.1.1.0)
66-
rubocop-performance (1.15.1)
66+
rubocop-performance (1.15.2)
6767
rubocop (>= 1.7.0, < 2.0)
6868
rubocop-ast (>= 0.4.0)
69-
rubocop-rspec (2.15.0)
69+
rubocop-rspec (2.16.0)
7070
rubocop (~> 1.33)
7171
ruby-progressbar (1.11.0)
7272
rubyzip (2.3.2)
@@ -91,9 +91,9 @@ DEPENDENCIES
9191
pry (~> 0.14)
9292
rack (~> 2.0)
9393
rspec (~> 3.0)
94-
rubocop (~> 1.31)
95-
rubocop-performance (~> 1.13)
96-
rubocop-rspec (~> 2.12)
94+
rubocop (~> 1.42)
95+
rubocop-performance (~> 1.15)
96+
rubocop-rspec (~> 2.16)
9797
selenium-devtools!
9898
selenium-webdriver!
9999
webmock (~> 3.5)

rb/selenium-webdriver.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Gem::Specification.new do |s|
5656
s.add_development_dependency 'pry', ['~> 0.14']
5757
s.add_development_dependency 'rack', ['~> 2.0']
5858
s.add_development_dependency 'rspec', ['~> 3.0']
59-
s.add_development_dependency 'rubocop', ['~> 1.31']
60-
s.add_development_dependency 'rubocop-performance', ['~> 1.13']
61-
s.add_development_dependency 'rubocop-rspec', ['~> 2.12']
59+
s.add_development_dependency 'rubocop', ['~> 1.42']
60+
s.add_development_dependency 'rubocop-performance', ['~> 1.15']
61+
s.add_development_dependency 'rubocop-rspec', ['~> 2.16']
6262
s.add_development_dependency 'webmock', ['~> 3.5']
6363
s.add_development_dependency 'webrick', ['~> 1.7']
6464
s.add_development_dependency 'yard', ['~> 0.9.11']

0 commit comments

Comments
 (0)