Did you mean? I did mean!
Autocorrects spelling mistakes reported by DidYouMean. Only attempts to autocorrect when there is a single suggestion from DidYouMean.
Example
This code:
require "i_did_mean"
def bar
"foo"
end
ba
Will get autocorrected to:
require "i_did_mean"
def bar
"foo"
end
bar
This code:
require "i_did_mean"
first_name = nil
flrst_name
Will get autocorrected to:
require "i_did_mean"
first_name = nil
first_name
This code:
require "i_did_mean"
hash = { "foo" => 1, bar: 2 }
hash.fetch(:bax)
Will get autocorrected to:
require "i_did_mean"
hash = { "foo" => 1, bar: 2 }
hash.fetch(:bar)
For more examples, check out the test directory.
License
Copyright (c) 2019 Hrvoje Simic. See LICENSE for further details.