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
lib/versionaire/cast.rb -- 1 warning:
[7]:UtilityFunction: Versionaire::Cast#Version doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.0.2/docs/Utility-Function.md]
...for this refinement:
moduleVersionaire# Refines Kernel in order to provide a top-level Version conversion function.moduleCastrefineKerneldodefVersionobjectVersionaire::Versionobjectendendendend
I've investigated this a bit further and it looks like even if Reek correctly recognizes refinements (and it should!), this would still be considered a UtilityFunction, just like in the following case:
🙇 @mvz. OK, so reduced to a utility function but not uncommunicative if I understand correctly? Yep, I'll give this a look once the next version is released of Reek. 😉
Overview
Seeing the following warning:
lib/versionaire/cast.rb -- 1 warning: [7]:UtilityFunction: Versionaire::Cast#Version doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/v6.0.2/docs/Utility-Function.md]
...for this refinement:
Potential Usage:
Desired Behavior
It would be nice to not flag this as a violation in this case. This is similar in nature to what was reported earlier.
Notes
I do a lot with refinements so, for context, this might help:
Version
type, shown above, that I'd like to access at the Kernel level much likeInteger
,String
,Array
,Hash
, etc.The text was updated successfully, but these errors were encountered: