2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717)

This commit is contained in:
David Taylor 2018-12-04 03:48:13 +00:00 committed by Guo Xiang Tan
parent 56948896ff
commit 9248ad1905
30 changed files with 171 additions and 72 deletions

View file

@ -65,7 +65,7 @@ class ImportScripts::Bespoke < ImportScripts::Base
first = true
row = nil
current_row = "";
current_row = ""
double_quote_count = 0
File.open(filename).each_line do |line|

View file

@ -52,7 +52,7 @@ class ImportScripts::DrupalQA < ImportScripts::Drupal
GROUP BY n.nid, n.title, n.uid, n.created, f.body_value
LIMIT #{batch_size}
OFFSET #{offset}
", cache_rows: false);
", cache_rows: false)
break if results.size < 1

View file

@ -67,7 +67,7 @@ class ImportScripts::Jive < ImportScripts::Base
first = true
row = nil
current_row = "";
current_row = ""
double_quote_count = 0
File.open(filename).each_line do |line|

View file

@ -1019,7 +1019,7 @@ SQL
end
def html_for_attachments(user_id, files)
html = "";
html = ""
files.each do |file|
upload, filename = find_upload(user_id, file["attachment_id"], file["file_name"])

View file

@ -172,7 +172,7 @@ class ImportScripts::Nabble < ImportScripts::Base
txt.gsub! /\<quote author="(.*?)"\>/, '[quote="\1"]'
txt.gsub! /\<\/quote\>/, '[/quote]'
txt.gsub!(/\<raw\>(.*?)\<\/raw\>/m) do |match|
c = Regexp.last_match[1].indent(4);
c = Regexp.last_match[1].indent(4)
"\n#{c}\n"
end

View file

@ -53,6 +53,6 @@ module ImportScripts::PhpBB3
end
end
class UnsupportedVersionError < RuntimeError;
class UnsupportedVersionError < RuntimeError
end
end