You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lib/ndb_ascii_parser.rb:70:9: C: Favor the ternary operator (?:) over if/then/else/end constructs.
if gsub_result.nil? then warn( "Malformed alphanumeric value: '#{field}'" ) end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that the same line also triggers IfUnlessModifier, which I would actually expect in this case. On the other hand, OneLineConditional seems like it should only be triggered when there exists an "else" to become the right half of the ternary.
Offending code/output:
Note that the same line also triggers IfUnlessModifier, which I would actually expect in this case. On the other hand, OneLineConditional seems like it should only be triggered when there exists an "else" to become the right half of the ternary.
The text was updated successfully, but these errors were encountered: