class RuboCop::Cop::Sorbet::CheckedTrueInSignature
sig { void }
# good
sig { void.checked(true) }
# bad
@example
be redundant; only ‘checked(false)` or `soft` would change the behaviour.
Additionally, in the event where checks are enabled, `checked(true)` would
even if runtime checks have not been enabled on the class or globally.
confusion; it could lead some people to believe that a method would be checked
This cop disallows the usage of `checked(true)`. This usage could cause
def on_block(node)
def on_block(node) return unless signature?(node) error = offending_node(node).first return unless error add_offense( error, location: source_range( processed_source.buffer, error.location.line, (error.location.selector.begin_pos)..(error.location.end.begin_pos), ), message: MESSAGE ) end