jekyll / jekyll-import

:inbox_tray: The "jekyll import" command for importing from various blogs to Jekyll format.
https://import.jekyllrb.com
MIT License
513 stars 314 forks source link

Clean up code to make Rubocop happy #441

Closed parkr closed 3 years ago

parkr commented 3 years ago
lib/jekyll-import/importers/drupal6.rb:52:9: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://rubystyle.guide#if-as-a-modifier)
        if sql_post_data[:alias]
        ^^
lib/jekyll-import/importers/rss.rb:32:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for process is too high. [7/6]
      def self.process(options) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/jekyll-import/importers/rss.rb:44:9: C: Metrics/BlockLength: Block has too many lines. [32/25]
        rss.items.each do |item| ...
        ^^^^^^^^^^^^^^^^^^^^^^^^
lib/jekyll-import/importers/s9y_database.rb:371:15: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled. (https://rubystyle.guide#warn)
              STDERR.puts "Unrecognized media block: #{imgcaption}"
              ^^^^^^^^^^^
parkr commented 3 years ago

@jekyllbot: merge +dev