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:
|
||||
Enabled: true
|
||||
|
||||
Style/SingleLineMethods:
|
||||
Enabled: true
|
||||
|
||||
Style/SoleNestedConditional:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# not use compression
|
||||
class SitemapGenerator::FileAdapter
|
||||
def gzip(stream, data); stream.write(data); stream.close end
|
||||
def gzip(stream, data)
|
||||
stream.write(data)
|
||||
stream.close
|
||||
end
|
||||
end
|
||||
SitemapGenerator::Sitemap.namer = SitemapGenerator::SimpleNamer.new(:sitemap, extension: ".xml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user