diff --git a/Ameba.html b/Ameba.html index d5822a44..5805ca2b 100644 --- a/Ameba.html +++ b/Ameba.html @@ -779,70 +779,70 @@ config.files = file_paths - + ameba.cr
- + ameba/glob_utils.cr
- + ameba/inline_comments.cr
- + ameba/issue.cr
- + ameba/reportable.cr
- + ameba/runner.cr
- + ameba/severity.cr
- + ameba/source.cr
- + ameba/spec/support.cr
- + ameba/tokenizer.cr @@ -937,7 +937,7 @@ Can be configured via config parameter.


- [View source] + [View source]
diff --git a/Ameba/AST.html b/Ameba/AST.html index 9dfbe776..05e86a24 100644 --- a/Ameba/AST.html +++ b/Ameba/AST.html @@ -757,112 +757,112 @@ - + ameba/ast/branch.cr
- + ameba/ast/branchable.cr
- + ameba/ast/flow_expression.cr
- + ameba/ast/scope.cr
- + ameba/ast/variabling/argument.cr
- + ameba/ast/variabling/assignment.cr
- + ameba/ast/variabling/ivariable.cr
- + ameba/ast/variabling/reference.cr
- + ameba/ast/variabling/variable.cr
- + ameba/ast/visitors/base_visitor.cr
- + ameba/ast/visitors/counting_visitor.cr
- + ameba/ast/visitors/flow_expression_visitor.cr
- + ameba/ast/visitors/node_visitor.cr
- + ameba/ast/visitors/redundant_control_expression_visitor.cr
- + ameba/ast/visitors/scope_visitor.cr
- + ameba/ast/visitors/top_level_nodes_visitor.cr diff --git a/Ameba/AST/Argument.html b/Ameba/AST/Argument.html index d0b3b3be..e7bc4f70 100644 --- a/Ameba/AST/Argument.html +++ b/Ameba/AST/Argument.html @@ -767,7 +767,7 @@ Holds the reference to the variable, thus to scope.

- + ameba/ast/variabling/argument.cr @@ -926,7 +926,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -956,7 +956,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -972,7 +972,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -993,7 +993,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1009,7 +1009,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1025,7 +1025,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1046,7 +1046,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1067,7 +1067,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1083,7 +1083,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1099,7 +1099,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
@@ -1120,7 +1120,7 @@ Holds the reference to the variable, thus to scope.


- [View source] + [View source]
diff --git a/Ameba/AST/Assignment.html b/Ameba/AST/Assignment.html index 982607ce..7e6231f4 100644 --- a/Ameba/AST/Assignment.html +++ b/Ameba/AST/Assignment.html @@ -760,7 +760,7 @@ Holds the assign node and the variable.

- + ameba/ast/variabling/assignment.cr @@ -962,7 +962,7 @@ Holds the assign node and the variable.


- [View source] + [View source]
@@ -997,7 +997,7 @@ Holds the assign node and the variable.


- [View source] + [View source]
@@ -1013,7 +1013,7 @@ Holds the assign node and the variable.


- [View source] + [View source]
@@ -1029,7 +1029,7 @@ Holds the assign node and the variable.


- [View source] + [View source]
@@ -1052,7 +1052,7 @@ For example, this assignment is in a branch:


- [View source] + [View source]
@@ -1068,7 +1068,7 @@ For example, this assignment is in a branch:


- [View source] + [View source]
@@ -1084,7 +1084,7 @@ For example, this assignment is in a branch:


- [View source] + [View source]
@@ -1105,7 +1105,7 @@ For example, this assignment is in a branch:


- [View source] + [View source]
@@ -1128,7 +1128,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1144,7 +1144,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1160,7 +1160,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1176,7 +1176,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1197,7 +1197,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1218,7 +1218,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1234,7 +1234,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1250,7 +1250,7 @@ For example, this is an op assign:


- [View source] + [View source]
@@ -1281,7 +1281,7 @@ i.e.


- [View source] + [View source]
@@ -1302,7 +1302,7 @@ i.e.


- [View source] + [View source]
diff --git a/Ameba/AST/BaseVisitor.html b/Ameba/AST/BaseVisitor.html index 113e631e..9a1f39d0 100644 --- a/Ameba/AST/BaseVisitor.html +++ b/Ameba/AST/BaseVisitor.html @@ -777,7 +777,7 @@ - + ameba/ast/visitors/base_visitor.cr @@ -895,7 +895,7 @@
- [View source] + [View source]
@@ -931,7 +931,7 @@ Returns true meaning all child nodes will be traversed.


- [View source] + [View source]
diff --git a/Ameba/AST/Branch.html b/Ameba/AST/Branch.html index 4360a5bf..358407d0 100644 --- a/Ameba/AST/Branch.html +++ b/Ameba/AST/Branch.html @@ -767,7 +767,7 @@ For example, the branchable if statement contains 3 branches:

- + ameba/ast/branch.cr @@ -959,7 +959,7 @@ For example, the branchable if statement contains 3 branches:


- [View source] + [View source]
@@ -993,7 +993,7 @@ For example, the branchable if statement contains 3 branches:


- [View source] + [View source]
@@ -1015,7 +1015,7 @@ For example, the branchable if statement contains 3 branches:


- [View source] + [View source]
@@ -1066,7 +1066,7 @@ For example, the branchable if statement contains 3 branches:


- [View source] + [View source]
@@ -1082,7 +1082,7 @@ For example, the branchable if statement contains 3 branches:


- [View source] + [View source]
@@ -1133,7 +1133,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1149,7 +1149,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1165,7 +1165,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1186,7 +1186,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1207,7 +1207,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1223,7 +1223,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
@@ -1239,7 +1239,7 @@ For example, this branch is in a loop:


- [View source] + [View source]
diff --git a/Ameba/AST/Branchable.html b/Ameba/AST/Branchable.html index f12dc006..ed2d0031 100644 --- a/Ameba/AST/Branchable.html +++ b/Ameba/AST/Branchable.html @@ -780,7 +780,7 @@ are branchables.

- + ameba/ast/branchable.cr @@ -1016,7 +1016,7 @@ are branchables.


- [View source] + [View source]
@@ -1046,7 +1046,7 @@ are branchables.


- [View source] + [View source]
@@ -1062,7 +1062,7 @@ are branchables.


- [View source] + [View source]
@@ -1078,7 +1078,7 @@ are branchables.


- [View source] + [View source]
@@ -1094,7 +1094,7 @@ are branchables.


- [View source] + [View source]
@@ -1110,7 +1110,7 @@ are branchables.


- [View source] + [View source]
@@ -1131,7 +1131,7 @@ are branchables.


- [View source] + [View source]
@@ -1152,7 +1152,7 @@ are branchables.


- [View source] + [View source]
@@ -1173,7 +1173,7 @@ are branchables.


- [View source] + [View source]
@@ -1189,7 +1189,7 @@ are branchables.


- [View source] + [View source]
@@ -1205,7 +1205,7 @@ are branchables.


- [View source] + [View source]
diff --git a/Ameba/AST/CountingVisitor.html b/Ameba/AST/CountingVisitor.html index 6026ce7a..108a1dbd 100644 --- a/Ameba/AST/CountingVisitor.html +++ b/Ameba/AST/CountingVisitor.html @@ -759,7 +759,7 @@ - + ameba/ast/visitors/counting_visitor.cr @@ -905,7 +905,7 @@
- [View source] + [View source]
@@ -940,7 +940,7 @@
- [View source] + [View source]
@@ -956,7 +956,7 @@
- [View source] + [View source]
@@ -972,7 +972,7 @@
- [View source] + [View source]
diff --git a/Ameba/AST/FlowExpression.html b/Ameba/AST/FlowExpression.html index 78af259d..cb987bf5 100644 --- a/Ameba/AST/FlowExpression.html +++ b/Ameba/AST/FlowExpression.html @@ -782,7 +782,7 @@ a parent node, which allows easily search through the related statement - + ameba/ast/flow_expression.cr @@ -1013,7 +1013,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1043,7 +1043,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1059,7 +1059,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1080,7 +1080,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1096,7 +1096,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1112,7 +1112,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1133,7 +1133,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1149,7 +1149,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1165,7 +1165,7 @@ a parent node, which allows easily search through the related statement
- [View source] + [View source]
@@ -1193,7 +1193,7 @@ For example:


- [View source] + [View source]
diff --git a/Ameba/AST/FlowExpressionVisitor.html b/Ameba/AST/FlowExpressionVisitor.html index 87c39556..4c9bf947 100644 --- a/Ameba/AST/FlowExpressionVisitor.html +++ b/Ameba/AST/FlowExpressionVisitor.html @@ -773,7 +773,7 @@ - + ameba/ast/visitors/flow_expression_visitor.cr @@ -978,7 +978,7 @@
- [View source] + [View source]
diff --git a/Ameba/AST/InstanceVariable.html b/Ameba/AST/InstanceVariable.html index aff63713..bd2e2fe3 100644 --- a/Ameba/AST/InstanceVariable.html +++ b/Ameba/AST/InstanceVariable.html @@ -748,7 +748,7 @@ - + ameba/ast/variabling/ivariable.cr @@ -886,7 +886,7 @@
- [View source] + [View source]
@@ -916,7 +916,7 @@
- [View source] + [View source]
@@ -932,7 +932,7 @@
- [View source] + [View source]
@@ -948,7 +948,7 @@
- [View source] + [View source]
@@ -964,7 +964,7 @@
- [View source] + [View source]
@@ -980,7 +980,7 @@
- [View source] + [View source]
@@ -996,7 +996,7 @@
- [View source] + [View source]
@@ -1012,7 +1012,7 @@
- [View source] + [View source]
@@ -1028,7 +1028,7 @@
- [View source] + [View source]
@@ -1044,7 +1044,7 @@
- [View source] + [View source]
diff --git a/Ameba/AST/NodeVisitor.html b/Ameba/AST/NodeVisitor.html index 51517f80..86e91440 100644 --- a/Ameba/AST/NodeVisitor.html +++ b/Ameba/AST/NodeVisitor.html @@ -761,7 +761,7 @@ to be inspected by rules.

- + ameba/ast/visitors/node_visitor.cr @@ -1065,7 +1065,7 @@ to be inspected by rules.


- [View source] + [View source]
@@ -1094,14 +1094,15 @@ to be inspected by rules.

-

A visit callback for Crystal::Alias node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Alias node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1116,14 +1117,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::IsA node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::IsA node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1138,14 +1140,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Assign node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Assign node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1160,14 +1163,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Call node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Call node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1182,14 +1186,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Block node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Block node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1204,14 +1209,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Case node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Case node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1226,14 +1232,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::ClassDef node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::ClassDef node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1248,14 +1255,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::ClassVar node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::ClassVar node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1270,14 +1278,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Def node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Def node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1292,14 +1301,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::EnumDef node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::EnumDef node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1314,14 +1324,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::ExceptionHandler node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::ExceptionHandler node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1336,14 +1347,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Expressions node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Expressions node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1358,14 +1370,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::HashLiteral node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::HashLiteral node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1380,14 +1393,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::If node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::If node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1402,14 +1416,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::InstanceVar node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::InstanceVar node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1424,14 +1439,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::LibDef node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::LibDef node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1446,14 +1462,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::ModuleDef node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::ModuleDef node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1468,14 +1485,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::NilLiteral node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::NilLiteral node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1490,14 +1508,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::StringInterpolation node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::StringInterpolation node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1512,14 +1531,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Unless node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Unless node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1534,14 +1554,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Var node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Var node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1556,14 +1577,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::When node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::When node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1578,14 +1600,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::While node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::While node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1600,14 +1623,15 @@ Returns true meaning that child nodes will be traversed as well.

-

A visit callback for Crystal::Until node. -Returns true meaning that child nodes will be traversed as well.

+

A visit callback for Crystal::Until node.

+

Returns true if the child nodes should be traversed as well, +false otherwise.


- [View source] + [View source]
@@ -1623,7 +1647,7 @@ Returns true meaning that child nodes will be traversed as well.


- [View source] + [View source]
diff --git a/Ameba/AST/RedundantControlExpressionVisitor.html b/Ameba/AST/RedundantControlExpressionVisitor.html index f5091b58..cab8da6d 100644 --- a/Ameba/AST/RedundantControlExpressionVisitor.html +++ b/Ameba/AST/RedundantControlExpressionVisitor.html @@ -761,7 +761,7 @@ is reached.

- + ameba/ast/visitors/redundant_control_expression_visitor.cr @@ -875,7 +875,7 @@ is reached.


- [View source] + [View source]
@@ -910,7 +910,7 @@ is reached.


- [View source] + [View source]
@@ -931,7 +931,7 @@ is reached.


- [View source] + [View source]
@@ -952,7 +952,7 @@ is reached.


- [View source] + [View source]
diff --git a/Ameba/AST/Reference.html b/Ameba/AST/Reference.html index ff41891a..37db1f38 100644 --- a/Ameba/AST/Reference.html +++ b/Ameba/AST/Reference.html @@ -761,7 +761,7 @@ the variable from its reference.

- + ameba/ast/variabling/reference.cr @@ -974,7 +974,7 @@ the variable from its reference.


- [View source] + [View source]
@@ -990,7 +990,7 @@ the variable from its reference.


- [View source] + [View source]
diff --git a/Ameba/AST/Scope.html b/Ameba/AST/Scope.html index 317df027..a5fbb3ff 100644 --- a/Ameba/AST/Scope.html +++ b/Ameba/AST/Scope.html @@ -760,7 +760,7 @@ This is where the local variables belong to.

- + ameba/ast/scope.cr @@ -835,7 +835,7 @@ This is where the local variables belong to.

  • #arg?(var) -

    Returns true if var is an argument in current scope, false if not.

    +

    Returns true if var is an argument in current scope, false otherwise.

  • @@ -856,21 +856,21 @@ This is where the local variables belong to.

  • #assigns_ivar?(name) -

    Returns true instance variable assinged in this scope.

    +

    Returns true if instance variable is assinged in this scope.

  • #block? -

    Returns true if current scope represents a block (or proc), false if not.

    +

    Returns true if current scope represents a block (or proc), false otherwise.

  • #def? -

    Returns true if current scope is a def, false if not.

    +

    Returns true if current scope is a def, false otherwise.

  • @@ -887,14 +887,14 @@ This is where the local variables belong to.

  • #eql?(node) -

    Returns true if the #node represents exactly the same Crystal node as @node.

    +

    Returns true if the node represents exactly the same Crystal node as @node.

  • #find_variable(name : String) -

    Returns variable by its name or nil if it does not exist.

    +

    Returns variable by its name or nil if it does not exist.

  • @@ -908,7 +908,7 @@ This is where the local variables belong to.

  • #in_macro? -

    Returns true if current scope sits inside a macro.

    +

    Returns true if current scope sits inside a macro.

  • @@ -960,14 +960,14 @@ This is where the local variables belong to.

  • #references?(variable : Variable, check_inner_scopes = true) -

    Returns true if current scope (or any of inner scopes) references variable, false if not.

    +

    Returns true if current scope (or any of inner scopes) references variable, false otherwise.

  • #spawn_block? -

    Returns true if current scope represents a spawn block, e.

    +

    Returns true if current scope represents a spawn block, e.

  • @@ -984,14 +984,14 @@ This is where the local variables belong to.

  • #top_level? -

    Returns true if this scope is a top level scope, false if not.

    +

    Returns true if this scope is a top level scope, false otherwise.

  • #type_definition? -

    Returns true if and only if current scope represents some type definition, for example a class.

    +

    Returns true if and only if current scope represents some type definition, for example a class.

  • @@ -1059,7 +1059,7 @@ This is where the local variables belong to.


    - [View source] + [View source]
    @@ -1119,7 +1119,7 @@ scope.add_argument(arg_node)
    - [View source] + [View source]
    @@ -1142,7 +1142,7 @@ scope.add_ivariable(ivar_node)
    - [View source] + [View source]
    @@ -1165,7 +1165,7 @@ scope.add_variable(var_node)
    - [View source] + [View source]
    @@ -1180,13 +1180,13 @@ scope.add_variable(var_node)
    -

    Returns true if var is an argument in current scope, false if not.

    +

    Returns true if var is an argument in current scope, false otherwise.


    - [View source] + [View source]
    @@ -1207,7 +1207,7 @@ scope.add_variable(var_node)
    - [View source] + [View source]
    @@ -1230,7 +1230,7 @@ scope.assign_variable(var_name, assign_node)
    - [View source] + [View source]
    @@ -1245,13 +1245,13 @@ scope.assign_variable(var_name, assign_node)
    -

    Returns true instance variable assinged in this scope.

    +

    Returns true if instance variable is assinged in this scope.


    - [View source] + [View source]
    @@ -1266,14 +1266,14 @@ scope.assign_variable(var_name, assign_node)
    -

    Returns true if current scope represents a block (or proc), -false if not.

    +

    Returns true if current scope represents a block (or proc), +false otherwise.


    - [View source] + [View source]
    @@ -1288,13 +1288,13 @@ false if not.

    -

    Returns true if current scope is a def, false if not.

    +

    Returns true if current scope is a def, false otherwise.


    - [View source] + [View source]
    @@ -1310,7 +1310,7 @@ false if not.


    - [View source] + [View source]
    @@ -1326,7 +1326,7 @@ false if not.


    - [View source] + [View source]
    @@ -1341,14 +1341,14 @@ false if not.

    -

    Returns true if the #node represents exactly +

    Returns true if the node represents exactly the same Crystal node as @node.


    - [View source] + [View source]
    @@ -1363,7 +1363,7 @@ the same Crystal node as @node.

    -

    Returns variable by its name or nil if it does not exist.

    +

    Returns variable by its name or nil if it does not exist.

    scope = Scope.new(class_node, nil)
     scope.find_variable("foo")
    @@ -1371,7 +1371,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1409,13 +1409,13 @@ scope.find_variable("foo")
    -

    Returns true if current scope sits inside a macro.

    +

    Returns true if current scope sits inside a macro.


    - [View source] + [View source]
    @@ -1436,7 +1436,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1457,7 +1457,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1473,7 +1473,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1489,7 +1489,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1510,7 +1510,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1531,7 +1531,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1552,7 +1552,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1568,13 +1568,13 @@ scope.find_variable("foo")

    Returns true if current scope (or any of inner scopes) references variable, -false if not.

    +false otherwise.


    - [View source] + [View source]
    @@ -1589,7 +1589,7 @@ false if not.

    -

    Returns true if current scope represents a spawn block, e. g.

    +

    Returns true if current scope represents a spawn block, e. g.

    spawn do
       # ...
     end
    @@ -1598,7 +1598,7 @@ false if not.


    - [View source] + [View source]
    @@ -1614,7 +1614,7 @@ false if not.


    - [View source] + [View source]
    @@ -1630,7 +1630,7 @@ false if not.


    - [View source] + [View source]
    @@ -1645,13 +1645,13 @@ false if not.

    -

    Returns true if this scope is a top level scope, false if not.

    +

    Returns true if this scope is a top level scope, false otherwise.


    - [View source] + [View source]
    @@ -1666,14 +1666,14 @@ false if not.

    -

    Returns true if and only if current scope represents some +

    Returns true if and only if current scope represents some type definition, for example a class.


    - [View source] + [View source]
    @@ -1694,7 +1694,7 @@ type definition, for example a class.


    - [View source] + [View source]
    diff --git a/Ameba/AST/ScopeVisitor.html b/Ameba/AST/ScopeVisitor.html index 5874dac6..d80e3504 100644 --- a/Ameba/AST/ScopeVisitor.html +++ b/Ameba/AST/ScopeVisitor.html @@ -759,7 +759,7 @@ - + ameba/ast/visitors/scope_visitor.cr @@ -780,6 +780,15 @@
    +
    + NODES = [ClassDef, ModuleDef, EnumDef, LibDef, FunDef, TypeDef, TypeOf, CStructOrUnionDef, ProcLiteral, Block, Macro, MacroFor] +
    + +
    +

    Non-exhaustive list of nodes to be visited by Ameba's rules.

    +
    + +
    RECORD_NODE_NAME = "record"
    @@ -805,7 +814,7 @@