Class: Sorbet::Private::SuggestTyped
- Inherits:
-
Object
- Object
- Sorbet::Private::SuggestTyped
- Includes:
- StepInterface
- Defined in:
- lib/suggest-typed.rb
Class Method Summary collapse
Class Method Details
.main ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/suggest-typed.rb', line 11 def self.main count = 0 while count < 100 count += 1 if suggest_typed return true end end puts "Adding `typed:` sigils did not converge after 100 tries." false end |
.output_file ⇒ Object
34 35 36 |
# File 'lib/suggest-typed.rb', line 34 def self.output_file nil end |
.suggest_typed ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/suggest-typed.rb', line 23 def self.suggest_typed IO.popen( [File.realpath("#{__dir__}/../bin/srb"), 'tc', '--suggest-typed', '--error-white-list=7022', '--typed=strict', '--silence-dev-message', '-a'], err: [:child, :out], ) do |io| out = io.read return true if out == "No errors! Great job.\n" end false end |