Shopify / rubocop-sorbet

A collection of RuboCop rules for Sorbet
MIT License
182 stars 27 forks source link

Update RedundantExtendTSig to trim whole line #172

Closed bitwise-aiden closed 1 year ago

bitwise-aiden commented 1 year ago

Description

When running this cop it will leave whatever whitespace occurred at the start of the line, which means that if run in isolation may cause other violations.

This approach is in line with what occurs in ForbidExtendTSigHelpersInShims, replacing the whole line and removing any new line.

The thing to consider is that it will also remove any comment on the line, but this feels like a fine tradeoff since it would likely be to do with the extend in the first place and would need to be cleaned up.