Merge pull request #239 from crystal-ameba/Sija/fix-typos

Fix typos throughout the codebase
This commit is contained in:
Vitalii Elenhaupt 2021-07-03 21:53:12 +03:00 committed by GitHub
commit 9a91e42bcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -95,7 +95,7 @@ module Ameba
end end
) )
it "does not report emtpy expression in macro" do it "does not report empty expression in macro" do
s = Source.new %q( s = Source.new %q(
module MyModule module MyModule
macro conditional_error_for_inline_callbacks macro conditional_error_for_inline_callbacks

View file

@ -201,7 +201,7 @@ module Ameba::Rule::Lint
subject.catch(source).should be_valid subject.catch(source).should be_valid
end end
it "does not report shadowed vars in macro withing the same scope" do it "does not report shadowed vars in macro within the same scope" do
source = Source.new %( source = Source.new %(
{% methods = klass.methods.select { |m| m.annotation(MyAnn) } %} {% methods = klass.methods.select { |m| m.annotation(MyAnn) } %}
@ -214,7 +214,7 @@ module Ameba::Rule::Lint
subject.catch(source).should be_valid subject.catch(source).should be_valid
end end
it "does not report shadowed vars withing nested macro" do it "does not report shadowed vars within nested macro" do
source = Source.new %( source = Source.new %(
module Foo module Foo
macro included macro included

View file

@ -154,7 +154,7 @@ module Ameba::AST
node.location == @node.location node.location == @node.location
end end
# Returns true if the variable is delcared before the `node`. # Returns true if the variable is declared before the `node`.
def declared_before?(node) def declared_before?(node)
var_location, node_location = location, node.location var_location, node_location = location, node.location

View file

@ -4,7 +4,7 @@ module Ameba::Rule::Lint
# In specs `focus: true` is mainly used to focus on a spec # In specs `focus: true` is mainly used to focus on a spec
# item locally during development. However, if such change # item locally during development. However, if such change
# is committed, it silently runs only focused spec on all # is committed, it silently runs only focused spec on all
# other enviroment, which is undesired. # other environment, which is undesired.
# #
# This is considered bad: # This is considered bad:
# #