Skip to content

Commit 6953629

Browse files
committed
fix(rubocop): Style/StringConcatenation
Prefer string interpolation to string concatenation
1 parent a096300 commit 6953629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script/alphabetize

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require 'open-uri'
77
require 'json'
88
require 'yaml'
99

10-
files = Dir[File.expand_path('../_data/', File.dirname(__FILE__)) + '/*.yml']
10+
files = Dir["#{File.expand_path('../_data/', File.dirname(__FILE__))}/*.yml"]
1111

1212
files.each do |file|
1313
contents = File.open(file).read
@@ -23,7 +23,7 @@ files.each do |file|
2323
end
2424

2525
# Add extra line break between groups, indent arrays, and strip header
26-
formatted_output = comment + output.to_yaml.gsub(/^(.+?):$/, "\n" + '\1:').gsub(/^- /, ' - ').gsub(/\A---\n/m, '')
26+
formatted_output = comment + output.to_yaml.gsub(/^(.+?):$/, "\n\\1:").gsub(/^- /, ' - ').gsub(/\A---\n/m, '')
2727

2828
File.open(file, 'w') { |f| f.write(formatted_output) }
2929
end

0 commit comments

Comments
 (0)