Skip to content

Commit

Permalink
#214 rubocop up
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jun 29, 2023
1 parent f15a8fe commit d4291eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -27,8 +27,8 @@ gem 'minitest', '5.16.2', require: false
gem 'rake', '13.0.6', require: false
gem 'rdoc', '6.4.0', require: false
gem 'rspec-rails', '5.1.2', require: false
gem 'rubocop', '1.32.0', require: false
gem 'rubocop-rspec', '2.12.1', require: false
gem 'rubocop', '1.53.1', require: false
gem 'rubocop-rspec', '2.22.0', require: false
gem 'simplecov', '0.22.0', require: false
gem 'slop', '4.9.2', require: false
gem 'xcop', '0.7.1', require: false
4 changes: 2 additions & 2 deletions bin/pdd
Expand Up @@ -40,7 +40,7 @@ begin
body = File.read(cfg)
extra = body.split(/\s+/).map(&:strip)
args += extra
puts "Found #{body.split(/\n/).length} lines in #{File.absolute_path(cfg)}"
puts "Found #{body.split("\n").length} lines in #{File.absolute_path(cfg)}"
end
args += ARGV

Expand Down Expand Up @@ -90,7 +90,7 @@ https://github.com/cqfn/pdd/blob/master/README.md"
body = File.read(cfg)
extra = body.split(/\s+/).map(&:strip)
opts['skip-gitignore'] = extra
PDD.log.info "Found #{body.split(/\n/).length} lines in #{File.absolute_path(cfg)}"
PDD.log.info "Found #{body.split("\n").length} lines in #{File.absolute_path(cfg)}"
end

Encoding.default_external = Encoding::UTF_8
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/steps.rb
Expand Up @@ -48,7 +48,7 @@
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
File.open(file, 'w:ASCII-8BIT') do |f|
f.write(text.gsub(/\\xFF/, 0xFF.chr))
f.write(text.gsub('\\xFF', 0xFF.chr))
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pdd.rb
Expand Up @@ -145,7 +145,7 @@ def rules(xml)
doc = Nokogiri::XML(xml)
total = 0
list = @opts[:rule] || []
unless list.select { |r| r.start_with?('max-duplicates:') }.empty?
unless list.none? { |r| r.start_with?('max-duplicates:') }
raise PDD::Error, 'You can\'t modify max-duplicates, it\'s always 1'
end

Expand Down

0 comments on commit d4291eb

Please sign in to comment.