Skip to content

Commit fe011e4

Browse files
authored
Merge pull request #208 from puppetlabs/revert-203-maint_exclude_rubocop_versions
Revert "(maint) Exclude breaking rubocop versions"
2 parents 770ddfc + 7bf8b43 commit fe011e4

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

Gemfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ group :development do
2929
end
3030

3131
group :rubocop do
32-
gem 'rubocop', '~> 1.50.0', require: false
33-
gem 'rubocop-rspec', '~> 2.19', require: false
32+
gem 'rubocop', '~> 1.64.0', require: false
33+
gem 'rubocop-rspec', '~> 3.0', require: false
3434
gem 'rubocop-performance', '~> 1.16', require: false
35-
gem 'rubocop-factory_bot', '!= 2.26.0', require: false
36-
gem 'rubocop-rspec_rails', '!= 2.29.0', require: false
3735
end

lib/puppet-lint/lexer/token.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ def find_token_of(direction, type, opts = {})
172172
return nil unless [:next, :prev].include?(direction)
173173

174174
opts[:skip_blocks] ||= true
175-
to_find = Array[*type]
175+
to_find = [*type]
176176

177-
token_iter = send("#{direction}_token".to_sym)
177+
token_iter = send(:"#{direction}_token")
178178
until token_iter.nil?
179179
return token_iter if to_find.include?(token_iter.type) && (opts[:value].nil? || token_iter.value == opts[:value])
180180

@@ -183,18 +183,18 @@ def find_token_of(direction, type, opts = {})
183183

184184
if opts[:skip_blocks]
185185
case token_iter.type
186-
when "#{opening_token}BRACE".to_sym
187-
token_iter = token_iter.send("#{direction}_token_of".to_sym, ["#{closing_token}BRACE".to_sym, opts])
188-
when "#{opening_token}BRACK".to_sym
189-
token_iter = token_iter.send("#{direction}_token_of".to_sym, ["#{closing_token}BRACK".to_sym, opts])
190-
when "#{opening_token}PAREN".to_sym
191-
token_iter = token_iter.send("#{direction}_token_of".to_sym, ["#{closing_token}PAREN".to_sym, opts])
186+
when :"#{opening_token}BRACE"
187+
token_iter = token_iter.send(:"#{direction}_token_of", [:"#{closing_token}BRACE", opts])
188+
when :"#{opening_token}BRACK"
189+
token_iter = token_iter.send(:"#{direction}_token_of", [:"#{closing_token}BRACK", opts])
190+
when :"#{opening_token}PAREN"
191+
token_iter = token_iter.send(:"#{direction}_token_of", [:"#{closing_token}PAREN", opts])
192192
end
193193
end
194194

195195
return nil if token_iter.nil?
196196

197-
token_iter = token_iter.send("#{direction}_token".to_sym)
197+
token_iter = token_iter.send(:"#{direction}_token")
198198
end
199199
nil
200200
end

lib/puppet-lint/tasks/puppet-lint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def define(args, &task_block)
6565

6666
['with_filename', 'fail_on_warnings', 'error_level', 'log_format', 'with_context', 'fix', 'show_ignored', 'relative'].each do |config|
6767
value = instance_variable_get(:"@#{config}")
68-
PuppetLint.configuration.send("#{config}=".to_sym, value) unless value.nil?
68+
PuppetLint.configuration.send(:"#{config}=", value) unless value.nil?
6969
end
7070

7171
@ignore_paths = PuppetLint.configuration.ignore_paths if PuppetLint.configuration.ignore_paths && @ignore_paths.empty?

rubocop_baseline.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,3 @@ Style/Documentation:
8181
- spec/**/*
8282
Style/WordArray:
8383
EnforcedStyle: brackets
84-
####################################################
85-
# Cops below here due for deprecation
86-
####################################################
87-
# ``Rspec/FilePath`` is going to be deprecated in the next major release of rubocop >=3.0.0: see <https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath>
88-
# As the new cops are already present, e.g., Rspec/SpecFilePathPathFormat, then disabling this in preparation
89-
RSpec/FilePath:
90-
Enabled: false

0 commit comments

Comments
 (0)