mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Enable unless
cops
We discussed the use of `unless` internally and decided to enforce available rules from rubocop to restrict its most problematic uses.
This commit is contained in:

committed by
Loïc Guitaut

parent
87de3c2319
commit
f7c57fbc19
@ -213,10 +213,10 @@ task "javascript:update" => "clean_up" do
|
||||
dependencies.each do |f|
|
||||
src = "#{library_src}/#{f[:source]}"
|
||||
|
||||
unless f[:destination]
|
||||
filename = f[:source].split("/").last
|
||||
else
|
||||
if f[:destination]
|
||||
filename = f[:destination]
|
||||
else
|
||||
filename = f[:source].split("/").last
|
||||
end
|
||||
|
||||
if src.include? "highlightjs"
|
||||
|
@ -90,7 +90,7 @@ task "qunit:test", %i[timeout qunit_path filter] do |_, args|
|
||||
Net::HTTP.get(uri)
|
||||
rescue Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL, Net::ReadTimeout, EOFError
|
||||
sleep 1
|
||||
retry unless elapsed() > 60
|
||||
retry if elapsed() <= 60
|
||||
puts "Timed out. Can not connect to forked server!"
|
||||
exit 1
|
||||
end
|
||||
|
@ -19,10 +19,10 @@ task "svgicons:update" do
|
||||
dependencies.each do |f|
|
||||
src = "#{library_src}/#{f[:source]}/."
|
||||
|
||||
unless f[:destination]
|
||||
filename = f[:source].split("/").last
|
||||
else
|
||||
if f[:destination]
|
||||
filename = f[:destination]
|
||||
else
|
||||
filename = f[:source].split("/").last
|
||||
end
|
||||
|
||||
dest = "#{vendor_svgs}/#{filename}"
|
||||
|
Reference in New Issue
Block a user