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
When I run reek against this file, Reek reports a warning of Instance Variable Assumption, even though @foo in Foo class is initialized correctly.
[1]:InstanceVariableAssumption: Foo assumes too much for instance variable '@foo' [https://github.com/troessner/reek/blob/v5.4.0/docs/Instance-Variable-Assumption.md]
It looks like the cause is Bar which has a block containing an initialize method.
I confirmed that Reek did not warn if:
Bar does not have an initialize method.
Bar is defined by normal class syntax (class Bar ... end).
Bar is defined after the initialize method of Foo.
Hi, I found an issue about Instance Variable Assumption that occurs when a class have a
Struct
with its owninitialize
method in its block.Example code:
When I run
reek
against this file, Reek reports a warning ofInstance Variable Assumption
, even though@foo
inFoo
class is initialized correctly.It looks like the cause is
Bar
which has a block containing aninitialize
method.I confirmed that Reek did not warn if:
Bar
does not have aninitialize
method.Bar
is defined by normal class syntax (class Bar ... end
).Bar
is defined after theinitialize
method ofFoo
.Similar issue: #1137
The text was updated successfully, but these errors were encountered: