mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Inspecting 1480 files
...................................................................................................................................................................................................................................W..........................W........................................................W................W..............W................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
app/models/calculator/flexi_rate.rb:38:7: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
count * preferred_additional_item.to_f + preferred_first_item.to_f
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/enterprise.rb:362:12: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
cat << "sells_" + sells
^^^^^^^^^^^^^^^^
app/models/enterprise.rb:496:21: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
phone_number && "https://wa.me/" + phone_number.tr('+ ', '')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/spree/ability.rb:27:33: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
order.user == user || order.token && token == order.token
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/spree/ability.rb:30:33: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
order.user == user || order.token && token == order.token
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/spree/line_item.rb:205:16: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
(price + fees / quantity).round(2)
^^^^^^^^^^^^^^^
app/models/spree/preferences/store.rb:28:11: W: [Corrected] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
should_persist? && Spree::Preference.where(key: key).exists?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1480 files inspected, 7 offenses detected, 7 offenses corrected