Neal Chambers
|
edbf4c15a9
|
Safely autocorrect Style/RedundantReturn
Inspecting 1513 files
.........................................................................................................................................................................................................................................................................................................C......................................................C............................................................................................................................................................................................................................................................................................................................................................................................................................................C.........................................................C.......C.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
app/models/product_import/entry_validator.rb:200:7: C: [Corrected] Style/RedundantReturn: Redundant return detected.
return true unless Float(value, exception: false).nil?
^^^^^^
app/models/spree/stock/availability_validator.rb:30:9: C: [Corrected] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return line_item.target_shipment if line_item.target_shipment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/spree/stock/availability_validator.rb:31:9: C: [Corrected] Style/RedundantReturn: Redundant return detected.
return line_item.order.shipments.first if line_item.order&.shipments&.any?
^^^^^^
lib/reporting/reports/enterprise_fee_summary/summarizer.rb:41:11: C: [Corrected] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
return DataRepresentations::IncomingExchangeLineItemFee if for_incoming_exchange?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/reporting/reports/enterprise_fee_summary/summarizer.rb:42:11: C: [Corrected] Style/RedundantReturn: Redundant return detected.
return DataRepresentations::OutgoingExchangeLineItemFee if for_outgoing_exchange?
^^^^^^
lib/stripe/authorize_response_patcher.rb:31:7: C: [Corrected] Style/RedundantReturn: Redundant return detected.
return url if url.match(%r{https?://\S+}) && url.include?("stripe.com")
^^^^^^
lib/tasks/data.rake:99:7: C: [Corrected] Style/RedundantReturn: Redundant return detected.
return true if Integer(value)
^^^^^^
1513 files inspected, 7 offenses detected, 7 offenses corrected
|
2023-11-17 09:00:50 +09:00 |
|
Neal Chambers
|
2a76b1972f
|
Safely autocorrect Lint/SafeNavigationChain
Inspecting 1480 files
........................................................................................................................................................................................................................................................................................................................................W............................W..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
app/models/spree/line_item.rb:283:55: W: [Corrected] Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.
self.final_weight_volume = variant&.unit_value * quantity
^^^^^^^^^^^
app/models/spree/line_item.rb:283:57: C: [Corrected] Layout/SpaceAroundMethodCallOperator: Avoid using spaces around a method call operator.
self.final_weight_volume = variant&.unit_value&. * quantity
^
app/models/spree/stock/availability_validator.rb:31:77: W: [Corrected] Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.
return line_item.order.shipments.first if line_item.order&.shipments.any?
^^^^^
1480 files inspected, 3 offenses detected, 3 offenses corrected
|
2023-07-30 21:29:19 +09:00 |
|
Matt-Yorkley
|
1d5077061e
|
Remove andand
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
|
2021-09-08 14:28:31 +01:00 |
|
Luis Ramos
|
1fb162bb4c
|
Result of running rubocop -a, safe auto correct
|
2021-07-13 23:06:56 +01:00 |
|
Andy Brett
|
e24d2e5077
|
address deprecation warning
|
2021-06-29 09:17:31 -07:00 |
|
Luis Ramos
|
0ca8b6aab6
|
Fix easy rubocop issue
|
2020-07-02 21:24:14 +01:00 |
|
Luis Ramos
|
3e14c9777e
|
Merge decorator with class brought from spree_core
|
2020-07-02 21:24:14 +01:00 |
|
Luis Ramos
|
d505fc2131
|
Bring availability validator from spree_core
|
2020-07-02 21:24:14 +01:00 |
|