manual/cops_sorbet.md in rubocop-sorbet-0.8.5 vs manual/cops_sorbet.md in rubocop-sorbet-0.8.6

- old
+ new

@@ -757,9 +757,46 @@ sig { void } def no_op; end end ``` +## Sorbet/Refinement + +Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged +--- | --- | --- | --- | --- +Enabled | Yes | No | <<next>> | - + +Checks for the use of Ruby Refinements library. Refinements add +complexity and incur a performance penalty that can be significant +for large code bases. Good examples are cases of unrelated +methods that happen to have the same name as these module methods. + +### Examples + +```ruby +# bad +module Foo + refine(Date) do + end +end + +# bad +module Foo + using(Date) do + end +end + +# good +module Foo + bar.refine(Date) +end + +# good +module Foo + bar.using(Date) +end +``` + ## Sorbet/SignatureBuildOrder Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged --- | --- | --- | --- | --- Enabled | Yes | Yes | 0.3.0 | -