Project

General

Profile

Actions

Refactoring #2200

closed

Fix rubocop offenses

Added by liaham 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/08/2024
Due date:
% Done:

100%

Estimated time:
Compatible Redmine Version:
5.1.z

Description

lib/redmine_news_notification/hooks/news_notification_listener.rb:55:9: C: [Correctable] Style/MapIntoArray: Use map instead of each to map elements into an array. (https://rubystyle.guide#functional-code)
        all_unread_news.each do |news| ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/redmine_news_notification/hooks/news_notification_listener.rb:64:9: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around a logical expression.
        (ids.presence || [0])
        ^^^^^^^^^^^^^^^^^^^^^
lib/redmine_news_notification/overrides/news_controller_patch.rb:52:22: C: [Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
            news_id: news_id,
                     ^^^^^^^
lib/redmine_news_notification/overrides/news_controller_patch.rb:64:22: C: [Correctable] Style/HashSyntax: Omit the hash value. (https://rubystyle.guide#hash-literals)
            news_id: news_id
Actions #1

Updated by liaham 9 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #2

Updated by liaham 9 months ago

  • Compatible Redmine Version 5.1.z added
Actions

Also available in: Atom PDF