The previous add_offense errors when the file is empty: Range 0..1 makes no sense in that context. The error occurs during output:
test.rbi:1:1: C: Sorbet/ForbidRBIOutsideOfAllowedPaths: RBI file path should match one of: rbi/**, sorbet/rbi/**
index 0 outside of array bounds: 0...0
add_global_offense was added for Rubocop v1 which is great since 1.0.0 is now the minimum required version.
Why even bother?
I created a new rbi file for testing and ruby-lsp runs over it with rubocop immediatly which means it will error.
The previous
add_offense
errors when the file is empty: Range 0..1 makes no sense in that context. The error occurs during output:add_global_offense
was added for Rubocop v1 which is great since 1.0.0 is now the minimum required version.Why even bother?
I created a new rbi file for testing and
ruby-lsp
runs over it with rubocop immediatly which means it will error.