Actions
Maintenance #2059
closedFix rubocop complaints
Start date:
Due date:
% Done:
100%
Estimated time:
Compatible Redmine Version:
Pull Request Link:
Description
app/helpers/dashboards_helper.rb:70:25: C: [Correctable] Performance/StringIdentifierArgument: Use :"render_#{block_object[:type]}_block" instead of "render_#{block_object[:type]}_block".
block_object.send "render_#{block_object[:type]}_block", block_id, settings, dashboard
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/dashboards_queries_helper.rb:26:5: W: [Correctable] Lint/SymbolConversion: Unnecessary symbol conversion; use :"#{object_type}_query" instead.
"#{object_type}_query".to_sym
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/dashboard.rb:48:22: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around an expression.
scope :by_project, (->(project_id) { where project_id: project_id if project_id.present? })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/dashboard.rb:49:18: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around an expression.
scope :sorted, (-> { order "#{Dashboard.table_name}.name" })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/dashboard.rb:50:24: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around an expression.
scope :welcome_only, (-> { where dashboard_type: DashboardContentWelcome::TYPE_NAME })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/dashboard.rb:426:5: C: [Correctable] Style/RedundantParentheses: Don't use parentheses around a logical expression.
(author == user && user.allowed_to?(:manage_own_dashboards, prj, global: true))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/dashboard_block.rb:189:10: C: [Correctable] Performance/StringIdentifierArgument: Use :"#{attr[0]}=" instead of "#{attr[0]}=".
send("#{attr[0]}=", nil)
Updated by liaham about 1 year ago
- Tracker changed from Improvement to Maintenance
Updated by liaham about 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Actions