Skip to content

Commit 7202fa8

Browse files
committed
switch to RuboCop 1.68, working with Ruby 3.4
earlier versions did nor require stringio
1 parent 1de2995 commit 7202fa8

3 files changed

Lines changed: 223 additions & 1 deletion

File tree

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ inherit_from: .rubocop_todo.yml
22

33
AllCops:
44
TargetRubyVersion: 2.4
5+
SuggestExtensions: false
56
NewCops: enable
67
Exclude:
78
# Do not check code borrowed from ActiveSupport
@@ -76,6 +77,11 @@ Lint/RescueException:
7677
Naming/PredicateName:
7778
NamePrefix:
7879
# has_ and have_ are allowed
80+
- does_
81+
- is_
82+
ForbiddenPrefixes:
83+
# has_ and have_ are allowed
84+
- does_
7985
- is_
8086

8187
# Offense count: 1

.rubocop_todo.yml

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2025-04-03 13:59:12 UTC using RuboCop version 1.68.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 2
10+
# This cop supports safe autocorrection (--autocorrect).
11+
# Configuration parameters: Include.
12+
# Include: **/*.gemspec
13+
Gemspec/AddRuntimeDependency:
14+
Exclude:
15+
- 'ruby-dbus.gemspec'
16+
17+
# Offense count: 8
18+
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
19+
# SupportedStyles: Gemfile, gems.rb, gemspec
20+
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
21+
Gemspec/DevelopmentDependencies:
22+
Exclude:
23+
- 'ruby-dbus.gemspec'
24+
25+
# Offense count: 1
26+
# This cop supports safe autocorrection (--autocorrect).
27+
# Configuration parameters: Severity, Include.
28+
# Include: **/*.gemspec
29+
Gemspec/RequireMFA:
30+
Exclude:
31+
- 'ruby-dbus.gemspec'
32+
33+
# Offense count: 1
34+
# This cop supports safe autocorrection (--autocorrect).
35+
# Configuration parameters: EnforcedStyle.
36+
# SupportedStyles: leading, trailing
37+
Layout/LineContinuationLeadingSpace:
38+
Exclude:
39+
- 'lib/dbus/object.rb'
40+
41+
# Offense count: 4
42+
# This cop supports safe autocorrection (--autocorrect).
43+
# Configuration parameters: EnforcedStyle.
44+
# SupportedStyles: space, no_space
45+
Layout/LineContinuationSpacing:
46+
Exclude:
47+
- 'lib/dbus/proxy_object.rb'
48+
- 'spec/property_spec.rb'
49+
50+
# Offense count: 1
51+
# This cop supports safe autocorrection (--autocorrect).
52+
# Configuration parameters: EnforcedStyle, IndentationWidth.
53+
# SupportedStyles: aligned, indented
54+
Layout/LineEndStringConcatenationIndentation:
55+
Exclude:
56+
- 'lib/dbus/message.rb'
57+
58+
# Offense count: 9
59+
# This cop supports safe autocorrection (--autocorrect).
60+
Lint/AmbiguousOperatorPrecedence:
61+
Exclude:
62+
- 'lib/dbus/marshall.rb'
63+
- 'lib/dbus/proxy_object.rb'
64+
- 'spec/data_spec.rb'
65+
66+
# Offense count: 3
67+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
68+
Lint/EmptyBlock:
69+
Exclude:
70+
- 'examples/utils/notify.rb'
71+
- 'spec/object_spec.rb'
72+
- 'spec/signal_spec.rb'
73+
74+
# Offense count: 1
75+
# This cop supports unsafe autocorrection (--autocorrect-all).
76+
Lint/IncompatibleIoSelectWithFiberScheduler:
77+
Exclude:
78+
- 'lib/dbus/message_queue.rb'
79+
80+
# Offense count: 2
81+
# This cop supports safe autocorrection (--autocorrect).
82+
Lint/RedundantCopDisableDirective:
83+
Exclude:
84+
- 'lib/dbus/object.rb'
85+
- 'lib/dbus/proxy_object.rb'
86+
87+
# Offense count: 2
88+
# This cop supports safe autocorrection (--autocorrect).
89+
# Configuration parameters: EnforcedStyle.
90+
# SupportedStyles: strict, consistent
91+
Lint/SymbolConversion:
92+
Exclude:
93+
- 'lib/dbus/object.rb'
94+
95+
# Offense count: 1
96+
# This cop supports safe autocorrection (--autocorrect).
97+
# Configuration parameters: Keywords, RequireColon.
98+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
99+
Style/CommentAnnotation:
100+
Exclude:
101+
- 'spec/node_spec.rb'
102+
103+
# Offense count: 3
104+
# This cop supports unsafe autocorrection (--autocorrect-all).
105+
Style/EnvHome:
106+
Exclude:
107+
- 'examples/no-introspect/tracker-test.rb'
108+
- 'lib/dbus/auth.rb'
109+
- 'lib/dbus/bus.rb'
110+
111+
# Offense count: 10
112+
# This cop supports safe autocorrection (--autocorrect).
113+
# Configuration parameters: AllowedVars.
114+
Style/FetchEnvVar:
115+
Exclude:
116+
- 'examples/no-introspect/tracker-test.rb'
117+
- 'lib/dbus/auth.rb'
118+
- 'lib/dbus/bus.rb'
119+
- 'lib/dbus/logger.rb'
120+
- 'spec/connection_spec.rb'
121+
- 'spec/coverage_helper.rb'
122+
- 'spec/session_bus_spec.rb'
123+
- 'spec/spec_helper.rb'
124+
125+
# Offense count: 1
126+
# This cop supports unsafe autocorrection (--autocorrect-all).
127+
# Configuration parameters: AllowSplatArgument.
128+
Style/HashConversion:
129+
Exclude:
130+
- 'lib/dbus/data.rb'
131+
132+
# Offense count: 1
133+
# This cop supports unsafe autocorrection (--autocorrect-all).
134+
Style/MapIntoArray:
135+
Exclude:
136+
- 'lib/dbus/marshall.rb'
137+
138+
# Offense count: 1
139+
# This cop supports unsafe autocorrection (--autocorrect-all).
140+
Style/MinMaxComparison:
141+
Exclude:
142+
- 'lib/dbus/auth.rb'
143+
144+
# Offense count: 2
145+
# This cop supports safe autocorrection (--autocorrect).
146+
Style/NegatedIfElseCondition:
147+
Exclude:
148+
- 'lib/dbus/connection.rb'
149+
150+
# Offense count: 3
151+
Style/OpenStructUse:
152+
Exclude:
153+
- 'spec/packet_marshaller_spec.rb'
154+
- 'spec/packet_unmarshaller_spec.rb'
155+
- 'spec/property_spec.rb'
156+
157+
# Offense count: 5
158+
# This cop supports unsafe autocorrection (--autocorrect-all).
159+
# Configuration parameters: Methods.
160+
Style/RedundantArgument:
161+
Exclude:
162+
- 'lib/dbus/auth.rb'
163+
- 'lib/dbus/introspect.rb'
164+
- 'lib/dbus/object.rb'
165+
166+
# Offense count: 4
167+
# This cop supports safe autocorrection (--autocorrect).
168+
Style/RedundantConstantBase:
169+
Exclude:
170+
- 'spec/data_spec.rb'
171+
172+
# Offense count: 1
173+
# This cop supports unsafe autocorrection (--autocorrect-all).
174+
Style/RedundantEach:
175+
Exclude:
176+
- 'spec/type_spec.rb'
177+
178+
# Offense count: 4
179+
# This cop supports safe autocorrection (--autocorrect).
180+
Style/RedundantLineContinuation:
181+
Exclude:
182+
- 'lib/dbus/type.rb'
183+
- 'spec/property_spec.rb'
184+
185+
# Offense count: 3
186+
# This cop supports safe autocorrection (--autocorrect).
187+
Style/RedundantRegexpArgument:
188+
Exclude:
189+
- 'examples/service/service_newapi.rb'
190+
- 'lib/dbus/object.rb'
191+
- 'spec/mock-service/spaghetti-monster.rb'
192+
193+
# Offense count: 2
194+
# This cop supports unsafe autocorrection (--autocorrect-all).
195+
Style/StringChars:
196+
Exclude:
197+
- 'examples/service/service_newapi.rb'
198+
- 'spec/mock-service/spaghetti-monster.rb'
199+
200+
# Offense count: 6
201+
# This cop supports safe autocorrection (--autocorrect).
202+
Style/SuperArguments:
203+
Exclude:
204+
- 'examples/service/complex-property.rb'
205+
- 'lib/dbus/data.rb'
206+
- 'lib/dbus/introspect.rb'
207+
- 'spec/mock-service/spaghetti-monster.rb'
208+
209+
# Offense count: 2
210+
# This cop supports safe autocorrection (--autocorrect).
211+
Style/SuperWithArgsParentheses:
212+
Exclude:
213+
- 'lib/dbus/object.rb'
214+
- 'spec/mock-service/spaghetti-monster.rb'

ruby-dbus.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ GEMSPEC = Gem::Specification.new do |s|
3434
s.add_development_dependency "packaging_rake_tasks"
3535
s.add_development_dependency "rake"
3636
s.add_development_dependency "rspec", "~> 3"
37-
s.add_development_dependency "rubocop", "= 1.30"
37+
s.add_development_dependency "rubocop", "~> 1.68.0"
38+
# newer versions have a noise deprecation warning
39+
s.add_development_dependency "rubocop-ast", "~> 1.36.0"
3840
s.add_development_dependency "simplecov"
3941
s.add_development_dependency "simplecov-lcov"
4042
end

0 commit comments

Comments
 (0)