Commit 3e86c7b
committed
Fix a build error
This commit fixes the following build error.
```consle
% bundle exec rake
(snip)
Offenses:
lib/rubocop/cop/rails/delegate.rb:103:13: W: [Correctable]
Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
precedence with parentheses to avoid ambiguity.
include_prefix_case? && method_name == prefixed_method_name(body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/dynamic_find_by.rb:43:21: W: [Correctable]
Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
precedence with parentheses to avoid ambiguity.
return if node.receiver.nil? && !inherit_active_record_base?(node) || allowed_invocation?(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/http_positional_arguments.rb:72:15: W:
[Correctable] Lint/AmbiguousOperatorPrecedence: Wrap expressions with
varying precedence with parentheses to avoid ambiguity.
format_arg?(pair.key) && data.pairs.one?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/pluralization_grammar.rb:64:11: W: [Correctable]
Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
precedence with parentheses to avoid ambiguity.
singular_receiver?(number) && plural_method?(node.method_name) ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/pluralization_grammar.rb:65:13: W: [Correctable]
Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
precedence with parentheses to avoid ambiguity.
plural_receiver?(number) && singular_method?(node.method_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/rubocop/cop/rails/reversible_migration.rb:346:13: W: [Correctable]
Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
precedence with parentheses to avoid ambiguity.
ancestor.block_type? && ...
^^^^^^^^^^^^^^^^^^^^^^^
218 files inspected, 6 offenses detected, 6 offenses auto-correctable
```1 parent efe0ec9 commit 3e86c7b
File tree
5 files changed
+7
-7
lines changed- lib/rubocop/cop/rails
5 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
| 346 | + | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
0 commit comments