diff --git a/Ameba.html b/Ameba.html index d78c2bf0..6d19a353 100644 --- a/Ameba.html +++ b/Ameba.html @@ -131,6 +131,11 @@ +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -623,63 +683,63 @@ 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/tokenizer.cr @@ -776,7 +836,7 @@ Can be configured via config parameter.


    - [View source] + [View source]
    diff --git a/Ameba/AST.html b/Ameba/AST.html index bf9ab3aa..497003b4 100644 --- a/Ameba/AST.html +++ b/Ameba/AST.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -597,110 +657,117 @@ - + 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 41cb298f..c3fe936a 100644 --- a/Ameba/AST/Argument.html +++ b/Ameba/AST/Argument.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -609,7 +669,7 @@ Holds the reference to the variable, thus to scope.

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


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


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


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


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


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


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


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


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


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


    - [View source] + [View source]
    @@ -963,7 +1023,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 e30562d8..5a4a5b61 100644 --- a/Ameba/AST/Assignment.html +++ b/Ameba/AST/Assignment.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -600,7 +660,7 @@ Holds the assign node and the variable.

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    - [View source] + [View source]
    diff --git a/Ameba/AST/BaseVisitor.html b/Ameba/AST/BaseVisitor.html index de3ec8f4..834b8b64 100644 --- a/Ameba/AST/BaseVisitor.html +++ b/Ameba/AST/BaseVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -617,7 +677,7 @@ - + ameba/ast/visitors/base_visitor.cr @@ -736,7 +796,7 @@
    - [View source] + [View source]
    @@ -772,7 +832,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 26ee206f..7988b295 100644 --- a/Ameba/AST/Branch.html +++ b/Ameba/AST/Branch.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -608,7 +668,7 @@ For example, the branchable if statement contains 3 branches:

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


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


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


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


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


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


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


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


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


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


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


    - [View source] + [View source]
    @@ -1084,7 +1144,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 879e8423..cacececd 100644 --- a/Ameba/AST/Branchable.html +++ b/Ameba/AST/Branchable.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -621,7 +681,7 @@ are branchables.

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


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


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


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


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


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


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


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


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


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


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


    - [View source] + [View source]
    diff --git a/Ameba/AST/CountingVisitor.html b/Ameba/AST/CountingVisitor.html index 3a4c0e9f..31ef84eb 100644 --- a/Ameba/AST/CountingVisitor.html +++ b/Ameba/AST/CountingVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -599,7 +659,7 @@ - + ameba/ast/visitors/counting_visitor.cr @@ -745,7 +805,7 @@
    - [View source] + [View source]
    @@ -780,7 +840,7 @@
    - [View source] + [View source]
    @@ -796,7 +856,7 @@
    - [View source] + [View source]
    @@ -812,7 +872,7 @@
    - [View source] + [View source]
    diff --git a/Ameba/AST/FlowExpression.html b/Ameba/AST/FlowExpression.html index 9ee5d566..743ded03 100644 --- a/Ameba/AST/FlowExpression.html +++ b/Ameba/AST/FlowExpression.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -624,7 +684,7 @@ a parent node, which allows easily search through the related statement - + ameba/ast/flow_expression.cr @@ -831,7 +891,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -861,7 +921,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -877,7 +937,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -898,7 +958,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -914,7 +974,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -930,7 +990,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -951,7 +1011,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -967,7 +1027,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -983,7 +1043,7 @@ a parent node, which allows easily search through the related statement
    - [View source] + [View source]
    @@ -1012,7 +1072,7 @@ For example:


    - [View source] + [View source]
    diff --git a/Ameba/AST/FlowExpressionVisitor.html b/Ameba/AST/FlowExpressionVisitor.html index 139acc3b..76aee946 100644 --- a/Ameba/AST/FlowExpressionVisitor.html +++ b/Ameba/AST/FlowExpressionVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -613,7 +673,7 @@ - + ameba/ast/visitors/flow_expression_visitor.cr @@ -793,7 +853,7 @@
    - [View source] + [View source]
    diff --git a/Ameba/AST/InstanceVariable.html b/Ameba/AST/InstanceVariable.html index 1adb0e08..d7aea103 100644 --- a/Ameba/AST/InstanceVariable.html +++ b/Ameba/AST/InstanceVariable.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -588,7 +648,7 @@ - + ameba/ast/variabling/ivariable.cr @@ -726,7 +786,7 @@
    - [View source] + [View source]
    @@ -756,7 +816,7 @@
    - [View source] + [View source]
    @@ -772,7 +832,7 @@
    - [View source] + [View source]
    @@ -788,7 +848,7 @@
    - [View source] + [View source]
    @@ -804,7 +864,7 @@
    - [View source] + [View source]
    @@ -820,7 +880,7 @@
    - [View source] + [View source]
    @@ -836,7 +896,7 @@
    - [View source] + [View source]
    @@ -852,7 +912,7 @@
    - [View source] + [View source]
    @@ -868,7 +928,7 @@
    - [View source] + [View source]
    @@ -884,7 +944,7 @@
    - [View source] + [View source]
    diff --git a/Ameba/AST/NodeVisitor.html b/Ameba/AST/NodeVisitor.html index 7fb8d186..dd14904d 100644 --- a/Ameba/AST/NodeVisitor.html +++ b/Ameba/AST/NodeVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -602,7 +662,7 @@ to be inspected by rules.

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    - [View source] + [View source]
    @@ -1464,7 +1524,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 1220e316..3f135b57 100644 --- a/Ameba/AST/RedundantControlExpressionVisitor.html +++ b/Ameba/AST/RedundantControlExpressionVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -601,7 +661,7 @@ is reached.

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


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


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


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


    - [View source] + [View source]
    diff --git a/Ameba/AST/Reference.html b/Ameba/AST/Reference.html index 2feca337..fba687f4 100644 --- a/Ameba/AST/Reference.html +++ b/Ameba/AST/Reference.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -601,7 +661,7 @@ the variable from its reference.

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


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


    - [View source] + [View source]
    diff --git a/Ameba/AST/Scope.html b/Ameba/AST/Scope.html index b1ff4b65..ae0862c1 100644 --- a/Ameba/AST/Scope.html +++ b/Ameba/AST/Scope.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -600,7 +660,7 @@ This is where the local variables belong to.

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


    - [View source] + [View source]
    @@ -961,7 +1021,7 @@ scope.add_argument(arg_node)
    - [View source] + [View source]
    @@ -985,7 +1045,7 @@ scope.add_ivariable(ivar_node)
    - [View source] + [View source]
    @@ -1009,7 +1069,7 @@ scope.add_variable(var_node)
    - [View source] + [View source]
    @@ -1030,7 +1090,7 @@ scope.add_variable(var_node)
    - [View source] + [View source]
    @@ -1051,7 +1111,7 @@ scope.add_variable(var_node)
    - [View source] + [View source]
    @@ -1075,7 +1135,7 @@ scope.assign_variable(var_name, assign_node)
    - [View source] + [View source]
    @@ -1096,7 +1156,7 @@ scope.assign_variable(var_name, assign_node)
    - [View source] + [View source]
    @@ -1118,7 +1178,7 @@ false if not.


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


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


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


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


    - [View source] + [View source]
    @@ -1217,7 +1277,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1261,7 +1321,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1282,7 +1342,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1303,7 +1363,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1319,7 +1379,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1335,7 +1395,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1356,7 +1416,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1377,7 +1437,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1398,7 +1458,7 @@ scope.find_variable("foo")
    - [View source] + [View source]
    @@ -1420,7 +1480,7 @@ false if not.


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


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


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


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


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


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


    - [View source] + [View source]
    diff --git a/Ameba/AST/ScopeVisitor.html b/Ameba/AST/ScopeVisitor.html index 9063ef5c..4571b119 100644 --- a/Ameba/AST/ScopeVisitor.html +++ b/Ameba/AST/ScopeVisitor.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -599,7 +659,7 @@ - + ameba/ast/visitors/scope_visitor.cr @@ -742,7 +802,7 @@
    - [View source] + [View source]
    diff --git a/Ameba/AST/TopLevelNodesVisitor.html b/Ameba/AST/TopLevelNodesVisitor.html new file mode 100644 index 00000000..fe1027e5 --- /dev/null +++ b/Ameba/AST/TopLevelNodesVisitor.html @@ -0,0 +1,877 @@ + + + + + + + + + + + + + + + + Ameba::AST::TopLevelNodesVisitor - ameba master + + + + + + + + +
    +

    + + class Ameba::AST::TopLevelNodesVisitor + +

    + + + + + + + +

    + + + + Overview +

    + +

    AST Visitor that visits certain nodes at a top level, which +can characterize the source (i.e. require statements, modules etc.)

    + + + + + + + + + + + + + + +

    + + + + Defined in: +

    + + + + ameba/ast/visitors/top_level_nodes_visitor.cr + + +
    + + + + + + +

    + + + + Constructors +

    + + + + + + +

    + + + + Instance Method Summary +

    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + Constructor Detail +

    + +
    +
    + + def self.new(scope : Crystal::ASTNode) + + # +
    + +
    + +

    Creates a new instance of visitor

    +
    + +
    +
    + + [View source] + +
    +
    + + + + + + +

    + + + + Instance Method Detail +

    + +
    +
    + + def require_nodes : Array(Crystal::Require) + + # +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def visit(node : Crystal::Expressions) + + # +
    + +
    + +

    If a top level node is Crystal::Expressions traverse the children.

    +
    + +
    +
    + + [View source] + +
    +
    + +
    +
    + + def visit(node : Crystal::ASTNode) + + # +
    + +
    + +

    A general visit method for rest of the nodes. +Returns false meaning all child nodes will not be traversed.

    +
    + +
    +
    + + [View source] + +
    +
    + + + + + +
    + + + diff --git a/Ameba/AST/Util.html b/Ameba/AST/Util.html index ce9b8ed2..57c98bc4 100644 --- a/Ameba/AST/Util.html +++ b/Ameba/AST/Util.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -629,7 +689,7 @@ - + ameba/ast/util.cr @@ -750,7 +810,7 @@
    - [View source] + [View source]
    @@ -771,7 +831,7 @@
    - [View source] + [View source]
    @@ -794,7 +854,7 @@ or special call node that interrupts execution (i.e. raise, exit, abort).


    - [View source] + [View source]
    @@ -835,7 +895,7 @@ a flow command return:


    - [View source] + [View source]
    @@ -856,7 +916,7 @@ a flow command return:


    - [View source] + [View source]
    @@ -877,7 +937,7 @@ a flow command return:


    - [View source] + [View source]
    @@ -900,7 +960,7 @@ to determine and cut a piece of source of the node.


    - [View source] + [View source]
    @@ -921,7 +981,7 @@ to determine and cut a piece of source of the node.


    - [View source] + [View source]
    diff --git a/Ameba/AST/Variable.html b/Ameba/AST/Variable.html index 78321a43..565a9f5c 100644 --- a/Ameba/AST/Variable.html +++ b/Ameba/AST/Variable.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -614,7 +674,7 @@ Holds the var node and variable assigments.

    - + ameba/ast/variabling/variable.cr @@ -868,7 +928,7 @@ Holds the var node and variable assigments.


    - [View source] + [View source]
    @@ -909,7 +969,7 @@ variable.assignment.size # => 2
    - [View source] + [View source]
    @@ -930,7 +990,7 @@ variable.assignment.size # => 2
    - [View source] + [View source]
    @@ -951,7 +1011,7 @@ variable.assignment.size # => 2
    - [View source] + [View source]
    @@ -982,7 +1042,7 @@ by block:


    - [View source] + [View source]
    @@ -1003,7 +1063,7 @@ by block:


    - [View source] + [View source]
    @@ -1019,7 +1079,7 @@ by block:


    - [View source] + [View source]
    @@ -1035,7 +1095,7 @@ by block:


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


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


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


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


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


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


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


    - [View source] + [View source]
    @@ -1187,7 +1247,7 @@ variable.reference(var_node, some_scope)
    - [View source] + [View source]
    @@ -1212,7 +1272,7 @@ variable.reference_assignments!
    - [View source] + [View source]
    @@ -1237,7 +1297,7 @@ variable.referenced? # => true
    - [View source] + [View source]
    @@ -1258,7 +1318,7 @@ variable.referenced? # => true
    - [View source] + [View source]
    @@ -1279,7 +1339,7 @@ variable.referenced? # => true
    - [View source] + [View source]
    @@ -1300,7 +1360,7 @@ variable.referenced? # => true
    - [View source] + [View source]
    @@ -1322,7 +1382,7 @@ false otherwise.


    - [View source] + [View source]
    @@ -1338,7 +1398,7 @@ false otherwise.


    - [View source] + [View source]
    @@ -1354,7 +1414,7 @@ false otherwise.


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


    - [View source] + [View source]
    diff --git a/Ameba/Config.html b/Ameba/Config.html index 02e2cbe6..4c63b6d3 100644 --- a/Ameba/Config.html +++ b/Ameba/Config.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -620,7 +680,7 @@ config.formatter = my_formatter - + ameba/config.cr @@ -713,17 +773,12 @@ config.formatter = my_formatter
  • - #formatter + #formatter : Formatter::BaseFormatter?

    Returns a formatter to be used while inspecting files.

  • -
  • - #formatter=(formatter : Formatter::BaseFormatter?) - -
  • -
  • #formatter=(name : String | Symbol) @@ -731,6 +786,13 @@ config.formatter = my_formatter
  • +
  • + #formatter=(formatter : Formatter::BaseFormatter) + +

    Returns a formatter to be used while inspecting files.

    + +
  • +
  • #globs : Array(String) @@ -775,7 +837,7 @@ config.formatter = my_formatter
  • - #update_rules(names, **args) + #update_rules(names, enabled = true, excluded = nil)

    Updates rules properties.

    @@ -858,7 +920,7 @@ config.formatter = my_formatter
    - [View source] + [View source]
    @@ -881,7 +943,7 @@ config.formatter = my_formatter
    - [View source] + [View source]
    @@ -918,7 +980,7 @@ config.excluded = ["spec"
    - [View source] + [View source]
    @@ -943,17 +1005,17 @@ config.excluded = ["spec"
    - [View source] + [View source]
    -
    +
    - def formatter + def formatter : Formatter::BaseFormatter? - # + #
    @@ -969,23 +1031,7 @@ config.formatter
    - [View source] - -
    -
    - -
    -
    - - def formatter=(formatter : Formatter::BaseFormatter?) - - # -
    - -
    -
    - - [View source] + [View source]
    @@ -1009,7 +1055,33 @@ config.formatter = :progress
    - [View source] + [View source] + +
    +
    + +
    +
    + + def formatter=(formatter : Formatter::BaseFormatter) + + # +
    + +
    + +

    Returns a formatter to be used while inspecting files. +If formatter is not set, it will return default formatter.

    + +
    config = Ameba::Config.load
    +config.formatter = custom_formatter
    +config.formatter
    +
    + +
    +
    + + [View source]
    @@ -1036,7 +1108,7 @@ config.globs
    - [View source] + [View source]
    @@ -1063,7 +1135,7 @@ config.globs
    - [View source] + [View source]
    @@ -1079,7 +1151,7 @@ config.globs
    - [View source] + [View source]
    @@ -1095,7 +1167,7 @@ config.globs
    - [View source] + [View source]
    @@ -1111,7 +1183,7 @@ config.globs
    - [View source] + [View source]
    @@ -1138,7 +1210,7 @@ config.sources # => list of sources pointing to files found b
    - [View source] + [View source]
    @@ -1162,17 +1234,17 @@ config.update_rule "MyRuleName", enabled:
    - [View source] + [View source]
    -
    +
    - def update_rules(names, **args) + def update_rules(names, enabled = true, excluded = nil) - # + #
    @@ -1190,7 +1262,7 @@ config.update_rules %w(Rule1 Rule2), enabled:
    diff --git a/Ameba/Formatter.html b/Ameba/Formatter.html index 344ffb90..aefeb172 100644 --- a/Ameba/Formatter.html +++ b/Ameba/Formatter.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -597,56 +657,56 @@ - + ameba/formatter/base_formatter.cr
    - + ameba/formatter/disabled_formatter.cr
    - + ameba/formatter/dot_formatter.cr
    - + ameba/formatter/explain_formatter.cr
    - + ameba/formatter/flycheck_formatter.cr
    - + ameba/formatter/json_formatter.cr
    - + ameba/formatter/todo_formatter.cr
    - + ameba/formatter/util.cr diff --git a/Ameba/Formatter/BaseFormatter.html b/Ameba/Formatter/BaseFormatter.html index 8d73e4e9..1f2f5511 100644 --- a/Ameba/Formatter/BaseFormatter.html +++ b/Ameba/Formatter/BaseFormatter.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -621,7 +681,7 @@ callbacks in Ameba:: - + ameba/formatter/base_formatter.cr @@ -754,7 +814,7 @@ callbacks in Ameba::
    - [View source] + [View source]
    @@ -784,7 +844,7 @@ callbacks in Ameba::
    - [View source] + [View source]
    @@ -806,7 +866,7 @@ A list of inspected sources is passed as an argument.


    - [View source] + [View source]
    @@ -827,7 +887,7 @@ A list of inspected sources is passed as an argument.


    - [View source] + [View source]
    @@ -849,7 +909,7 @@ A corresponding source is passed as an argument.


    - [View source] + [View source]
    @@ -871,7 +931,7 @@ A corresponding source is passed as an argument.


    - [View source] + [View source]
    @@ -893,7 +953,7 @@ A list of sources to inspect is passed as an argument.


    - [View source] + [View source]
    diff --git a/Ameba/Formatter/DisabledFormatter.html b/Ameba/Formatter/DisabledFormatter.html index 0eba185f..f54d6985 100644 --- a/Ameba/Formatter/DisabledFormatter.html +++ b/Ameba/Formatter/DisabledFormatter.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -599,7 +659,7 @@ - + ameba/formatter/disabled_formatter.cr @@ -749,7 +809,7 @@ A list of inspected sources is passed as an argument.


    - [View source] + [View source]
    diff --git a/Ameba/Formatter/DotFormatter.html b/Ameba/Formatter/DotFormatter.html index b43e24c2..526c52ba 100644 --- a/Ameba/Formatter/DotFormatter.html +++ b/Ameba/Formatter/DotFormatter.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -628,7 +688,7 @@ It is similar to Crystal's dot formatter for specs.

    - + ameba/formatter/dot_formatter.cr @@ -687,9 +747,24 @@ It is similar to Crystal's dot formatter for specs.

    Instance methods inherited from module Ameba::Formatter::Util

    - - affected_code(source, location, max_length = 100, placeholder = " ...", prompt = "> ") - affected_code + + affected_code(source, location, end_location = nil, context_lines = 0, max_length = 120, ellipsis = " ...", prompt = "> ") + affected_code, + + + + context(lines, lineno, context_lines = 3, remove_empty = true) + context, + + + + deansify(message : String?) : String? + deansify, + + + + trim(str, max_length = 120, ellipsis = " ...") + trim @@ -806,7 +881,7 @@ It is similar to Crystal's dot formatter for specs.


    - [View source] + [View source]
    @@ -827,7 +902,7 @@ It is similar to Crystal's dot formatter for specs.


    - [View source] + [View source]
    @@ -848,7 +923,7 @@ It is similar to Crystal's dot formatter for specs.


    - [View source] + [View source]
    diff --git a/Ameba/Formatter/ExplainFormatter.html b/Ameba/Formatter/ExplainFormatter.html index f1026f33..b6331302 100644 --- a/Ameba/Formatter/ExplainFormatter.html +++ b/Ameba/Formatter/ExplainFormatter.html @@ -131,6 +131,11 @@
  • +
  • + TopLevelNodesVisitor + +
  • +
  • Util @@ -221,9 +226,19 @@
  • -
  • +
  • Issue + + +
  • @@ -286,6 +301,11 @@
  • +
  • + DuplicatedRequire + +
  • +
  • EmptyEnsure @@ -361,6 +381,11 @@
  • +
  • + SpecFocus + +
  • +
  • Syntax @@ -421,11 +446,36 @@
  • +
  • + AnyInsteadOfEmpty + +
  • + +
  • + ChainedCallWithNoBang + +
  • + +
  • + CompactAfterMap + +
  • +
  • FirstLastAfterFilter
  • +
  • + FlattenAfterMap + +
  • + +
  • + MapInsteadOfBlock + +
  • +
  • SizeAfterFilter @@ -446,6 +496,11 @@
  • +
  • + IsAFilter + +
  • +
  • IsANil @@ -501,6 +556,11 @@
  • +
  • + VerboseBlock + +
  • +
  • WhileTrue @@ -614,7 +674,7 @@ a specific location.

    - + ameba/formatter/explain_formatter.cr @@ -640,11 +700,6 @@ a specific location.

    -
    - LINE_BREAK = "\n" -
    - -
    PREFIX = " "
    @@ -665,7 +720,7 @@ a specific location.