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
baWill get autocorrected to:
require "i_did_mean"
def bar
"foo"
end
barThis code:
require "i_did_mean"
first_name = nil
flrst_nameWill get autocorrected to:
require "i_did_mean"
first_name = nil
first_nameThis 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.