Skip to content

Commit

Permalink
- enable Style/IndentArray
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Nov 6, 2018
1 parent 970d61a commit bbe12e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
9 changes: 0 additions & 9 deletions .rubocop.yml
Expand Up @@ -151,15 +151,6 @@ Style/IfUnlessModifier:
- 'src/include/iscsi-client/widgets.rb'
- 'src/modules/IscsiClientLib.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
Exclude:
- 'src/modules/IscsiClientLib.rb'
- 'test/ScanDiscovered_spec.rb'

# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down
10 changes: 5 additions & 5 deletions src/modules/IscsiClientLib.rb
Expand Up @@ -795,11 +795,11 @@ def equalNodes?(n1, n2)
return false if n1.empty?

keys = [
"iface.transport_name",
"iface.initiatorname",
"node.name",
"node.conn[0].address"
]
"iface.transport_name",
"iface.initiatorname",
"node.name",
"node.conn[0].address"
]

keys.all? { |key| n1[key] == n2[key] }
end
Expand Down
8 changes: 4 additions & 4 deletions test/ScanDiscovered_spec.rb
Expand Up @@ -66,10 +66,10 @@
"\t\tIface Name: default"]
)). to eq(
[
"[2620:113:80c0:8080:e051:f9ea:73c7:9171]:3260 iqn.2013-10.de.suse:test_file2 default",
"10.120.66.182:3260 iqn.2013-10.de.suse:test_file2 default",
"[2620:113:80c0:8080:a00:27ff:fe1b:a7fe]:3260 iqn.2013-10.de.suse:test_file2 default"
]
"[2620:113:80c0:8080:e051:f9ea:73c7:9171]:3260 iqn.2013-10.de.suse:test_file2 default",
"10.120.66.182:3260 iqn.2013-10.de.suse:test_file2 default",
"[2620:113:80c0:8080:a00:27ff:fe1b:a7fe]:3260 iqn.2013-10.de.suse:test_file2 default"
]
)
end
end
Expand Down

0 comments on commit bbe12e7

Please sign in to comment.