for all changes rubocop proposes two different options:
controls/ssl_test.rb:93:13: C: [Corrected] Style/NumericPredicate: Use sslports.length.positive? instead of sslports.length > 0.
only_if { sslports.length > 0 }
^^^^^^^^^^^^^^^^^^^
controls/ssl_test.rb:93:13: C: [Corrected] Style/ZeroLengthPredicate: Use !empty? instead of length > 0.
only_if { sslports.length > 0 }
^^^^^^^^^^^^^^^^^^^
the autofix uses the first option, but in this use case the second fix might be better. sslports.!empty? seems pretty natural and easy to unserstand, so I changed this.
for all changes rubocop proposes two different options:
the autofix uses the first option, but in this use case the second fix might be better.
sslports.!empty?
seems pretty natural and easy to unserstand, so I changed this.