Skip to content

lint: RuboCop MultipleComparison warning - #134

Open
sjavonehq wants to merge 1 commit into
pythonicrubyist:masterfrom
sjavonehq:rubocop-warning-multiple-comparison
Open

lint: RuboCop MultipleComparison warning#134
sjavonehq wants to merge 1 commit into
pythonicrubyist:masterfrom
sjavonehq:rubocop-warning-multiple-comparison

Conversation

@sjavonehq

Copy link
Copy Markdown

Fix RuboCop Style/MultipleComparison offense in Creek sheet parser

This PR cleans up a RuboCop Style/MultipleComparison offense in lib/creek/sheet.rb by replacing repeated equality checks with a more idiomatic and readable Array#include? expression.

Before
(node.name == name_v || node.name == name_t) && node.node_type == opener

After
[name_v, name_t].include?(node.name) && node.node_type == opener

注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

1 participant