Douglas Eichelberger

Results 28 issues of Douglas Eichelberger

#### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20true%0A%0Amodule%20M%0A%20%20module_function%0A%0A%20%20extend%20T%3A%3ASig%0A%20%20sig%20%7B%20params%28x%3A%20Integer%29.returns%28Integer%29%20%7D%0A%20%20def%20foo%28x%29%20%3D%20x%0Aend%0A%0Aclass%20C%0A%20%20include%20M%0A%0A%20%20def%20bar%28x%29%20%3D%20foo%28x%29%0Aend%0A%0AM.foo%28'hi'%29%0A%23%20%3D%3E%20%22hi%22%0A%0AC.new.bar%28'hi'%29%0A%23%20TypeError%3A%20Parameter%20'x'%3A%20Expected%20type%20Integer%2C%20got%20type%20String%20with%20value%20%22hi%22%20%28TypeError%29) ```ruby # typed: true module M module_function extend T::Sig sig { params(x: Integer).returns(Integer) } def foo(x) = x end class C include M def...

enhancement

#### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20strict%0A%0Aclass%20C%0A%20%20extend%20T%3A%3ASig%0A%0A%20%20sig%20%7B%20params%28arg%3A%20Object%29.void%20%7D%0A%20%20def%20self.obj%28arg%29%3B%20end%0A%0A%20%20sig%20%7B%20params%28arg%3A%20Integer%29.void%20%7D%0A%20%20def%20self.int%28arg%29%3B%20end%0A%0A%20%20sig%20%7B%20void%20%7D%0A%20%20def%20self.void_return%3B%20end%0Aend%0A%0Avoid%20%3D%20C.void_return%0Avoid.to_s%0AC.obj%28void%29%0AC.int%28void%29%0A) ```ruby # typed: strict class C extend T::Sig sig { params(arg: Object).void } def self.obj(arg); end sig { params(arg: Integer).void } def self.int(arg); end...

enhancement

#### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20true%0Aextend%20T%3A%3ASig%0A%0A%0ARSpec.describe%20'my%20spec'%2C%20%3Aneeds_macos%20do%0A%20%20let%28%3Apath%29%20%7B%20%7D%0Aend%0A%0A%0ARSpec.describe%20'my%20spec'%20do%0A%20%20let%28%3Apath%29%20%7B%20%7D%0Aend%0A) ```ruby # typed: true extend T::Sig RSpec.describe 'my spec', :needs_macos do let(:path) { } end RSpec.describe 'my spec' do let(:path) { } end ```...

bug
unconfirmed

#### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20true%0Aextend%20T%3A%3ASig%0A%0A%0ARSpec.describe%20'specs'%20do%0A%20%20before%28%3Acontext%29%20%7B%7D%0A%0A%20%20before%20%7B%7D%0A%0A%20%20after%28%3Acontext%29%20%7B%7D%0A%0A%20%20after%20%7B%7D%0Aend) ```ruby # typed: true extend T::Sig RSpec.describe 'specs' do before(:context) {} before {} after(:context) {} after {} end ``` #### Observed output ``` editor.rb:5:...

bug
unconfirmed

Hi, I'm seeing some constant resolution errors involving RSpec DSLs that I believe to be spurious: - Sorbet no longer allows `RSpec.shared_context` with multiple args. Here is a sorbet.run [example](https://sorbet.run/#%23%20typed%3A%20true%0A%0ARSpec.shared_context%28'my%20context'%2C%20%3Aversioning%29%20do%0A%0Aend%0A%0ARSpec.describe%20'my%20spec'%20do%0A%20%20include_context%20'my%20context'%0Aend),...

bug
unconfirmed

#### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20false%0A%0A%0Amodule%20M%0A%20%20class%20C%0A%20%20end%0Aend%0A%0Amodule%20A%0A%20%20include%20M%0A%20%20C.new%0A%20%20RSpec.describe%20B%20do%0A%20%20%20%20it%20'tests%20something'%20do%0A%20%20%20%20%20%20expect%28C%29.to%20eq%28C.new.class%29%0A%20%20%20%20end%0A%20%20end%0Aend) ```ruby # typed: false module M class C end end module A include M C.new RSpec.describe do it 'tests something' do expect(C).to eq(C.new.class) end...

bug
unconfirmed

Using include_context with a context declared with a base `shared_context` is not supported: #### Input [→ View on sorbet.run](https://sorbet.run/#%23%20typed%3A%20true%0A%0ARSpec.shared_context%28'RSpec%20context'%29%20%7B%7D%0Ashared_context%28'monkey-patched%20context'%29%20%7B%7D%0A%0ARSpec.describe%20'spec'%20do%0A%20%20include_context%28'RSpec%20context'%29%0A%20%20include_context%28'monkey-patched%20context'%29%0Aend) ```ruby # typed: true RSpec.shared_context('RSpec context') {} shared_context('monkey-patched context') {} RSpec.describe...

bug
unconfirmed

## Is your feature request related to a problem? Please describe. `Performance/DoubleStartEndWith` already exists to flag repeated calls to `start_with?`/`end_with?` that could be replaced by a single call. Another pattern...