Add and apply Style/SingleLineMethods rubocop rule
Single line methods are hard to read, at least with this syntax. The syntax used in Ruby 3.0 is accepted since Rubocop 1.7.0.
This commit is contained in:
@@ -517,6 +517,9 @@ Style/RedundantSelf:
|
|||||||
Style/SafeNavigation:
|
Style/SafeNavigation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/SingleLineMethods:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/SoleNestedConditional:
|
Style/SoleNestedConditional:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
# not use compression
|
# not use compression
|
||||||
class SitemapGenerator::FileAdapter
|
class SitemapGenerator::FileAdapter
|
||||||
def gzip(stream, data); stream.write(data); stream.close end
|
def gzip(stream, data)
|
||||||
|
stream.write(data)
|
||||||
|
stream.close
|
||||||
|
end
|
||||||
end
|
end
|
||||||
SitemapGenerator::Sitemap.namer = SitemapGenerator::SimpleNamer.new(:sitemap, extension: ".xml")
|
SitemapGenerator::Sitemap.namer = SitemapGenerator::SimpleNamer.new(:sitemap, extension: ".xml")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user