jeromedalbert / rubocop-obsession

RuboCop extension focused on higher-level concepts, like checking that code reads from top to bottom
https://rubydoc.info/gems/rubocop-obsession
MIT License
97 stars 0 forks source link

Auto-correct moves methods away from Sorbet sigs #3

Open bmulholland opened 1 day ago

bmulholland commented 1 day ago

First of all, thanks for a great gem. Stuff like this is why I love Ruby land.

If a method has a Sorbet sig above it, then the autocorrect will move the method but not the method's sig block. These obviously must be sequential, so the result is broken code that hard to correctly understand.

Most immediately, perhaps don't auto-correct if a method has a sig above it?

jeromedalbert commented 9 hours ago

Thanks for the report! I never used Sorbet so I'm not surprised it doesn't work. 🤠 I will look into it unless someone else wants to have a go at it.