v0.16.6
Sep 5, 2024
304
124
version = 1
[[analyzers]]
name = "ruby"
Anti-pattern
142
Bug risk
93
Documentation
2
Performance
31
Security
23
Style
13
Params to the method are passed without parentheses. Presence of some operators, like +
, -
, *
, **
and &
, make the method invocation look ambiguous.
ensure
block detected RB-LI1016The ensure
block must not be empty.
BigDecimal.new
RB-LI1005BigDecimal.new
has been deprecated since BigDecimal 1.3.3 and removed in 2.0.0. Use BigDecimal()
to create new instances of BigDecimal
.
while
/until
detected in begin
block RB-LI1033while
/until
should be used at the beginning of the block, and without the begin
statement.
In math and Python, we can use x < y < z
style comparison to compare multiple value. However, we can't use the comparison in Ruby. However, the comparison is not syntax error. This cop checks the bad usage of comparison operators.