diff --git a/Ameba.html b/Ameba.html
index 735b2f63..6f489993 100644
--- a/Ameba.html
+++ b/Ameba.html
@@ -945,70 +945,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
@@ -1103,7 +1103,7 @@ Can be configured via config
parameter.
TODO Remove in a next release.
TODO Remove in a next release. BC for crystal <= 1.9. -refs https://github.com/crystal-ameba/ameba/pull/407
-Indicates whether the node is a transformed assignment by the compiler. -i.e.
-collection.each do |(a, b)|
- puts b
-end
-is transformed to:
-collection.each do |__arg0|
- a = __arg0[0]
- b = __arg0[1]
- puts(b)
-end
- true
, meaning all child nodes will be traversed.
@node
.
false
, meaning all child nodes will not be traversed.
return
:
return
:
return
:
false
otherwise.
false
otherwise.
false
otherwise.
false
otherwise.
@node
.
@node
.
@node
.
@node
.
@node
.
@node
.
@node
.
config = Ameba::Config.load
-config.update_rules %w(Rule1 Rule2), enabled: true
+config.update_rules %w[Rule1 Rule2], enabled: true
also it allows to update groups of rules:
-config.update_rules %w(Group1 Group2), enabled: true
+config.update_rules %w[Group1 Group2], enabled: true
Ameba::
-
+
ameba/formatter/base_formatter.cr
@@ -1080,7 +1080,7 @@ callbacks in Ameba::
- [View source]
+ [View source]
@@ -1110,7 +1110,7 @@ callbacks in Ameba::
- [View source]
+ [View source]
@@ -1132,7 +1132,7 @@ A list of inspected sources is passed as an argument.
- [View source]
+ [View source]
@@ -1153,7 +1153,7 @@ A list of inspected sources is passed as an argument.
- [View source]
+ [View source]
@@ -1175,7 +1175,7 @@ A corresponding source is passed as an argument.
- [View source]
+ [View source]
@@ -1197,7 +1197,7 @@ A corresponding source is passed as an argument.
- [View source]
+ [View source]
@@ -1219,7 +1219,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 3ca59921..d74a853d 100644
--- a/Ameba/Formatter/DisabledFormatter.html
+++ b/Ameba/Formatter/DisabledFormatter.html
@@ -925,7 +925,7 @@
-
+
ameba/formatter/disabled_formatter.cr
@@ -1075,7 +1075,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 f3f0aab3..51ed82fd 100644
--- a/Ameba/Formatter/DotFormatter.html
+++ b/Ameba/Formatter/DotFormatter.html
@@ -954,7 +954,7 @@ It is similar to Crystal's dot formatter for specs.
-
+
ameba/formatter/dot_formatter.cr
@@ -1147,7 +1147,7 @@ It is similar to Crystal's dot formatter for specs.
- [View source]
+ [View source]
@@ -1168,7 +1168,7 @@ It is similar to Crystal's dot formatter for specs.
- [View source]
+ [View source]
@@ -1189,7 +1189,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 d201f11a..f47418f8 100644
--- a/Ameba/Formatter/ExplainFormatter.html
+++ b/Ameba/Formatter/ExplainFormatter.html
@@ -940,7 +940,7 @@ a specific location.
-
+
ameba/formatter/explain_formatter.cr
@@ -1098,7 +1098,7 @@ Second argument is location which indicates the location to explain.
- [View source]
+ [View source]
@@ -1133,7 +1133,7 @@ Second argument is location which indicates the location to explain.
- [View source]
+ [View source]
@@ -1149,7 +1149,7 @@ Second argument is location which indicates the location to explain.
- [View source]
+ [View source]
@@ -1165,7 +1165,7 @@ Second argument is location which indicates the location to explain.
- [View source]
+ [View source]
diff --git a/Ameba/Formatter/FlycheckFormatter.html b/Ameba/Formatter/FlycheckFormatter.html
index ef354a02..0a29d0da 100644
--- a/Ameba/Formatter/FlycheckFormatter.html
+++ b/Ameba/Formatter/FlycheckFormatter.html
@@ -914,7 +914,7 @@
-
+
ameba/formatter/flycheck_formatter.cr
@@ -1064,7 +1064,7 @@ A corresponding source is passed as an argument.
- [View source]
+ [View source]
diff --git a/Ameba/Formatter/JSONFormatter.html b/Ameba/Formatter/JSONFormatter.html
index ac152418..b005bb49 100644
--- a/Ameba/Formatter/JSONFormatter.html
+++ b/Ameba/Formatter/JSONFormatter.html
@@ -981,7 +981,7 @@
-
+
ameba/formatter/json_formatter.cr
@@ -1148,7 +1148,7 @@
- [View source]
+ [View source]
@@ -1188,7 +1188,7 @@ A list of inspected sources is passed as an argument.
- [View source]
+ [View source]
@@ -1214,7 +1214,7 @@ A corresponding source is passed as an argument.
- [View source]
+ [View source]
@@ -1240,7 +1240,7 @@ A list of sources to inspect is passed as an argument.
- [View source]
+ [View source]
diff --git a/Ameba/Formatter/TODOFormatter.html b/Ameba/Formatter/TODOFormatter.html
index 1b1a1849..6438805b 100644
--- a/Ameba/Formatter/TODOFormatter.html
+++ b/Ameba/Formatter/TODOFormatter.html
@@ -927,7 +927,7 @@ or excludes failed sources from these rules.
-
+
ameba/formatter/todo_formatter.cr
@@ -1143,7 +1143,7 @@ or excludes failed sources from these rules.
- [View source]
+ [View source]
@@ -1182,7 +1182,7 @@ or excludes failed sources from these rules.
- [View source]
+ [View source]
diff --git a/Ameba/Formatter/Util.html b/Ameba/Formatter/Util.html
index 488a8ccd..b85fe41d 100644
--- a/Ameba/Formatter/Util.html
+++ b/Ameba/Formatter/Util.html
@@ -942,7 +942,7 @@
-
+
ameba/formatter/util.cr
@@ -1027,7 +1027,7 @@
- [View source]
+ [View source]
@@ -1043,7 +1043,7 @@
- [View source]
+ [View source]
@@ -1059,7 +1059,7 @@
- [View source]
+ [View source]
@@ -1075,7 +1075,7 @@
- [View source]
+ [View source]
@@ -1091,7 +1091,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/GlobUtils.html b/Ameba/GlobUtils.html
index 9c71f51d..5c61caad 100644
--- a/Ameba/GlobUtils.html
+++ b/Ameba/GlobUtils.html
@@ -937,7 +937,7 @@
-
+
ameba/glob_utils.cr
@@ -1017,7 +1017,7 @@
- [View source]
+ [View source]
@@ -1040,7 +1040,7 @@ Globs can have wildcards or be rejected:
- [View source]
+ [View source]
diff --git a/Ameba/InlineComments.html b/Ameba/InlineComments.html
index 10ce419f..85f78ca5 100644
--- a/Ameba/InlineComments.html
+++ b/Ameba/InlineComments.html
@@ -937,7 +937,7 @@
-
+
ameba/inline_comments.cr
@@ -1042,7 +1042,7 @@
- [View source]
+ [View source]
@@ -1082,7 +1082,7 @@
- [View source]
+ [View source]
@@ -1111,7 +1111,7 @@ parse_inline_directive(line) # => nil
- [View source]
+ [View source]
diff --git a/Ameba/InlineComments/Action.html b/Ameba/InlineComments/Action.html
index 7646a158..2264ddec 100644
--- a/Ameba/InlineComments/Action.html
+++ b/Ameba/InlineComments/Action.html
@@ -923,7 +923,7 @@
-
+
ameba/inline_comments.cr
@@ -1057,7 +1057,7 @@
- [View source]
+ [View source]
@@ -1073,7 +1073,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Issue.html b/Ameba/Issue.html
index 9e9e7f81..97e9f4b2 100644
--- a/Ameba/Issue.html
+++ b/Ameba/Issue.html
@@ -925,7 +925,7 @@
-
+
ameba/issue.cr
@@ -1105,7 +1105,7 @@
- [View source]
+ [View source]
@@ -1140,7 +1140,7 @@
- [View source]
+ [View source]
@@ -1156,7 +1156,7 @@
- [View source]
+ [View source]
@@ -1172,7 +1172,7 @@
- [View source]
+ [View source]
@@ -1188,7 +1188,7 @@
- [View source]
+ [View source]
@@ -1204,7 +1204,7 @@
- [View source]
+ [View source]
@@ -1220,7 +1220,7 @@
- [View source]
+ [View source]
@@ -1236,7 +1236,7 @@
- [View source]
+ [View source]
@@ -1257,7 +1257,7 @@
- [View source]
+ [View source]
@@ -1278,7 +1278,7 @@
- [View source]
+ [View source]
@@ -1299,7 +1299,7 @@
- [View source]
+ [View source]
@@ -1320,7 +1320,7 @@
- [View source]
+ [View source]
@@ -1341,7 +1341,7 @@
- [View source]
+ [View source]
@@ -1357,7 +1357,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Issue/Status.html b/Ameba/Issue/Status.html
index 126256c8..79a344d0 100644
--- a/Ameba/Issue/Status.html
+++ b/Ameba/Issue/Status.html
@@ -912,7 +912,7 @@
-
+
ameba/issue.cr
@@ -1046,7 +1046,7 @@
- [View source]
+ [View source]
@@ -1062,7 +1062,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Presenter.html b/Ameba/Presenter.html
index 5ec42411..49f299a8 100644
--- a/Ameba/Presenter.html
+++ b/Ameba/Presenter.html
@@ -912,21 +912,21 @@
-
+
ameba/presenter/base_presenter.cr
-
+
ameba/presenter/rule_collection_presenter.cr
-
+
ameba/presenter/rule_presenter.cr
diff --git a/Ameba/Presenter/BasePresenter.html b/Ameba/Presenter/BasePresenter.html
index bc84b8f6..6f9582e6 100644
--- a/Ameba/Presenter/BasePresenter.html
+++ b/Ameba/Presenter/BasePresenter.html
@@ -930,7 +930,7 @@
-
+
ameba/presenter/base_presenter.cr
@@ -1030,7 +1030,7 @@
- [View source]
+ [View source]
@@ -1065,7 +1065,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Presenter/RuleCollectionPresenter.html b/Ameba/Presenter/RuleCollectionPresenter.html
index b411416a..b5338a86 100644
--- a/Ameba/Presenter/RuleCollectionPresenter.html
+++ b/Ameba/Presenter/RuleCollectionPresenter.html
@@ -914,7 +914,7 @@
-
+
ameba/presenter/rule_collection_presenter.cr
@@ -1027,7 +1027,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Presenter/RulePresenter.html b/Ameba/Presenter/RulePresenter.html
index 2c3d31e0..74ccf132 100644
--- a/Ameba/Presenter/RulePresenter.html
+++ b/Ameba/Presenter/RulePresenter.html
@@ -914,7 +914,7 @@
-
+
ameba/presenter/rule_presenter.cr
@@ -1027,7 +1027,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Reportable.html b/Ameba/Reportable.html
index 10538e20..791dd574 100644
--- a/Ameba/Reportable.html
+++ b/Ameba/Reportable.html
@@ -951,7 +951,7 @@
-
+
ameba/reportable.cr
@@ -1194,7 +1194,7 @@
- [View source]
+ [View source]
@@ -1215,7 +1215,7 @@
- [View source]
+ [View source]
@@ -1236,7 +1236,7 @@
- [View source]
+ [View source]
@@ -1257,7 +1257,7 @@
- [View source]
+ [View source]
@@ -1278,7 +1278,7 @@
- [View source]
+ [View source]
@@ -1299,7 +1299,7 @@
- [View source]
+ [View source]
@@ -1320,7 +1320,7 @@
- [View source]
+ [View source]
@@ -1341,7 +1341,7 @@
- [View source]
+ [View source]
@@ -1362,7 +1362,7 @@
- [View source]
+ [View source]
@@ -1383,7 +1383,7 @@
- [View source]
+ [View source]
@@ -1404,7 +1404,7 @@
- [View source]
+ [View source]
@@ -1425,7 +1425,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule.html b/Ameba/Rule.html
index 7dc807bb..77029a6f 100644
--- a/Ameba/Rule.html
+++ b/Ameba/Rule.html
@@ -912,7 +912,7 @@
-
+
ameba/rule/base.cr
@@ -1007,7 +1007,7 @@ behave differently than usual rules.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Base.html b/Ameba/Rule/Base.html
index 812d154c..4ddce538 100644
--- a/Ameba/Rule/Base.html
+++ b/Ameba/Rule/Base.html
@@ -1102,7 +1102,7 @@ that are tested by this rule, it should add an issue.
-
+
ameba/rule/base.cr
@@ -1341,7 +1341,7 @@ that are tested by this rule, it should add an issue.
- [View source]
+ [View source]
@@ -1365,7 +1365,7 @@ source.valid?
- [View source]
+ [View source]
@@ -1389,7 +1389,7 @@ the one of the given source.
- [View source]
+ [View source]
@@ -1415,7 +1415,7 @@ the one of the given source.
- [View source]
+ [View source]
@@ -1445,7 +1445,7 @@ though usually the macro def_hash
can be used to generate this meth
- [View source]
+ [View source]
@@ -1472,7 +1472,7 @@ though usually the macro def_hash
can be used to generate this meth
- [View source]
+ [View source]
@@ -1495,7 +1495,7 @@ usual rules.
- [View source]
+ [View source]
@@ -1511,7 +1511,7 @@ usual rules.
- [View source]
+ [View source]
@@ -1535,7 +1535,7 @@ that are tested by this rule, it should add an issue.
- [View source]
+ [View source]
@@ -1568,7 +1568,7 @@ that are tested by this rule, it should add an issue.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Documentation.html b/Ameba/Rule/Documentation.html
index 4646d122..ae926ec3 100644
--- a/Ameba/Rule/Documentation.html
+++ b/Ameba/Rule/Documentation.html
@@ -912,14 +912,14 @@
-
+
ameba/rule/documentation/documentation.cr
-
+
ameba/rule/documentation/documentation_admonition.cr
diff --git a/Ameba/Rule/Documentation/Documentation.html b/Ameba/Rule/Documentation/Documentation.html
index c8708658..43111901 100644
--- a/Ameba/Rule/Documentation/Documentation.html
+++ b/Ameba/Rule/Documentation/Documentation.html
@@ -951,7 +951,7 @@ modules, classes, enums, methods and macros.
-
+
ameba/rule/documentation/documentation.cr
@@ -1346,7 +1346,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1695,7 +1695,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1711,7 +1711,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1727,7 +1727,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1743,7 +1743,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1759,7 +1759,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
@@ -1775,7 +1775,7 @@ modules, classes, enums, methods and macros.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Documentation/DocumentationAdmonition.html b/Ameba/Rule/Documentation/DocumentationAdmonition.html
index c2968035..ca2dff5c 100644
--- a/Ameba/Rule/Documentation/DocumentationAdmonition.html
+++ b/Ameba/Rule/Documentation/DocumentationAdmonition.html
@@ -961,7 +961,7 @@ and are therefore reported by Ameba.
-
+
ameba/rule/documentation/documentation_admonition.cr
@@ -1306,7 +1306,7 @@ and are therefore reported by Ameba.
- [View source]
+ [View source]
@@ -1515,7 +1515,7 @@ and are therefore reported by Ameba.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Layout.html b/Ameba/Rule/Layout.html
index 445cbb54..daf625e8 100644
--- a/Ameba/Rule/Layout.html
+++ b/Ameba/Rule/Layout.html
@@ -912,21 +912,21 @@
-
+
ameba/rule/layout/line_length.cr
-
+
ameba/rule/layout/trailing_blank_lines.cr
-
+
ameba/rule/layout/trailing_whitespace.cr
diff --git a/Ameba/Rule/Layout/LineLength.html b/Ameba/Rule/Layout/LineLength.html
index 7e7e993f..66074c8a 100644
--- a/Ameba/Rule/Layout/LineLength.html
+++ b/Ameba/Rule/Layout/LineLength.html
@@ -945,7 +945,7 @@
-
+
ameba/rule/layout/line_length.cr
@@ -1254,7 +1254,7 @@
- [View source]
+ [View source]
@@ -1463,7 +1463,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Layout/TrailingBlankLines.html b/Ameba/Rule/Layout/TrailingBlankLines.html
index 1ea1de97..30dd0033 100644
--- a/Ameba/Rule/Layout/TrailingBlankLines.html
+++ b/Ameba/Rule/Layout/TrailingBlankLines.html
@@ -944,7 +944,7 @@
-
+
ameba/rule/layout/trailing_blank_lines.cr
@@ -1247,7 +1247,7 @@
- [View source]
+ [View source]
@@ -1428,7 +1428,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Layout/TrailingWhitespace.html b/Ameba/Rule/Layout/TrailingWhitespace.html
index b8576098..f58a0676 100644
--- a/Ameba/Rule/Layout/TrailingWhitespace.html
+++ b/Ameba/Rule/Layout/TrailingWhitespace.html
@@ -944,7 +944,7 @@
-
+
ameba/rule/layout/trailing_whitespace.cr
@@ -1242,7 +1242,7 @@
- [View source]
+ [View source]
@@ -1423,7 +1423,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Lint.html b/Ameba/Rule/Lint.html
index 894ab330..b2819102 100644
--- a/Ameba/Rule/Lint.html
+++ b/Ameba/Rule/Lint.html
@@ -912,259 +912,259 @@
-
+
ameba/rule/lint/ambiguous_assignment.cr
-
+
ameba/rule/lint/bad_directive.cr
-
+
ameba/rule/lint/comparison_to_boolean.cr
-
+
ameba/rule/lint/debug_calls.cr
-
+
ameba/rule/lint/debugger_statement.cr
-
+
ameba/rule/lint/duplicated_require.cr
-
+
ameba/rule/lint/empty_ensure.cr
-
+
ameba/rule/lint/empty_expression.cr
-
+
ameba/rule/lint/empty_loop.cr
-
+
ameba/rule/lint/formatting.cr
-
+
ameba/rule/lint/hash_duplicated_key.cr
-
+
ameba/rule/lint/literal_assignments_in_expressions.cr
-
+
ameba/rule/lint/literal_in_condition.cr
-
+
ameba/rule/lint/literal_in_interpolation.cr
-
+
ameba/rule/lint/literals_comparison.cr
-
+
ameba/rule/lint/missing_block_argument.cr
-
+
ameba/rule/lint/not_nil.cr
-
+
ameba/rule/lint/not_nil_after_no_bang.cr
-
+
ameba/rule/lint/percent_array.cr
-
+
ameba/rule/lint/rand_zero.cr
-
+
ameba/rule/lint/redundant_string_coercion.cr
-
+
ameba/rule/lint/redundant_with_index.cr
-
+
ameba/rule/lint/redundant_with_object.cr
-
+
ameba/rule/lint/shadowed_argument.cr
-
+
ameba/rule/lint/shadowed_exception.cr
-
+
ameba/rule/lint/shadowing_outer_local_var.cr
-
+
ameba/rule/lint/shared_var_in_fiber.cr
-
+
ameba/rule/lint/spec_filename.cr
-
+
ameba/rule/lint/spec_focus.cr
-
+
ameba/rule/lint/syntax.cr
-
+
ameba/rule/lint/typos.cr
-
+
ameba/rule/lint/unneeded_disable_directive.cr
-
+
ameba/rule/lint/unreachable_code.cr
-
+
ameba/rule/lint/unused_argument.cr
-
+
ameba/rule/lint/unused_block_argument.cr
-
+
ameba/rule/lint/useless_assign.cr
-
+
ameba/rule/lint/useless_condition_in_when.cr
diff --git a/Ameba/Rule/Lint/AmbiguousAssignment.html b/Ameba/Rule/Lint/AmbiguousAssignment.html
index 7a33d93c..15f41eb3 100644
--- a/Ameba/Rule/Lint/AmbiguousAssignment.html
+++ b/Ameba/Rule/Lint/AmbiguousAssignment.html
@@ -954,7 +954,7 @@ x != y # or x = !y
-
+
ameba/rule/lint/ambiguous_assignment.cr
@@ -1359,7 +1359,7 @@ x != y # or x = !y
Ameba::AST::Util
not_nil!
.
-
+
ameba/rule/lint/not_nil_after_no_bang.cr
@@ -1363,7 +1363,7 @@ followed by a call to not_nil!
.
not_nil!
.
not_nil!
.
A rule that disallows some unwanted symbols in percent array literals.
For example, this is usually written by mistake:
-%i(:one, :two)
-%w("one", "two")
+%i[:one, :two]
+%w["one", "two"]
And the expected example is:
-%i(one two)
-%w(one two)
+%i[one two]
+%w[one two]
YAML configuration example:
Lint/PercentArrays:
Enabled: true
@@ -952,7 +952,7 @@
-
+
ameba/rule/lint/percent_array.cr
@@ -1263,11 +1263,11 @@
A rule that disallows some unwanted symbols in percent array literals.
For example, this is usually written by mistake:
-%i(:one, :two)
-%w("one", "two")
+%i[:one, :two]
+%w["one", "two"]
And the expected example is:
-%i(one two)
-%w(one two)
+%i[one two]
+%w[one two]
YAML configuration example:
Lint/PercentArrays:
Enabled: true
@@ -1278,7 +1278,7 @@
- [View source]
+ [View source]
@@ -1515,7 +1515,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Lint/RandZero.html b/Ameba/Rule/Lint/RandZero.html
index fdfe9b25..8b458e8d 100644
--- a/Ameba/Rule/Lint/RandZero.html
+++ b/Ameba/Rule/Lint/RandZero.html
@@ -951,7 +951,7 @@ rand(2)
-
+
ameba/rule/lint/rand_zero.cr
@@ -1256,7 +1256,7 @@ rand(2)
Ameba::AST::Util
Ameba::AST::Util
other
.
-
+
ameba/rule/naming/binary_operator_parameter_name.cr
@@ -1276,7 +1276,7 @@ their sole parameter named other
.
other
.
is_404?
).
-
+
ameba/rule/naming/predicate_name.cr
@@ -1258,7 +1258,7 @@ the ones that are not valid Crystal code (e.g. is_404?
).
is_404?
).
Object#(class_)property
or Object#(class_)getter
-
+
ameba/rule/naming/query_bool_methods.cr
@@ -1365,7 +1365,7 @@ using Object#(class_)property
or Object#(class_)getter
Object#(class_)property
or Object#(class_)getter
All these methods are allocating a new object
+All these methods allocate a new object
each_<member>
instead of &
-
+
ameba/rule/performance/excessive_allocations.cr
@@ -1456,7 +1456,7 @@ that can be avoided by using each_<member>
instead of &
- [View source]
+ [View source]
@@ -1665,7 +1665,7 @@ that can be avoided by using each_<member>
instead of &
- [View source]
+ [View source]
@@ -1681,7 +1681,7 @@ that can be avoided by using each_<member>
instead of &
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Performance/FirstLastAfterFilter.html b/Ameba/Rule/Performance/FirstLastAfterFilter.html
index 3fdd6769..7c29343f 100644
--- a/Ameba/Rule/Performance/FirstLastAfterFilter.html
+++ b/Ameba/Rule/Performance/FirstLastAfterFilter.html
@@ -954,7 +954,7 @@
-
+
ameba/rule/performance/first_last_after_filter.cr
@@ -1454,7 +1454,7 @@
- [View source]
+ [View source]
@@ -1663,7 +1663,7 @@
- [View source]
+ [View source]
@@ -1679,7 +1679,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Performance/FlattenAfterMap.html b/Ameba/Rule/Performance/FlattenAfterMap.html
index bfd6a8f7..b0e7eb02 100644
--- a/Ameba/Rule/Performance/FlattenAfterMap.html
+++ b/Ameba/Rule/Performance/FlattenAfterMap.html
@@ -950,7 +950,7 @@
-
+
ameba/rule/performance/flatten_after_map.cr
@@ -1422,7 +1422,7 @@
- [View source]
+ [View source]
@@ -1603,7 +1603,7 @@
- [View source]
+ [View source]
@@ -1619,7 +1619,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Performance/MapInsteadOfBlock.html b/Ameba/Rule/Performance/MapInsteadOfBlock.html
index 929244e7..ab9f7711 100644
--- a/Ameba/Rule/Performance/MapInsteadOfBlock.html
+++ b/Ameba/Rule/Performance/MapInsteadOfBlock.html
@@ -951,7 +951,7 @@ that follow map
.
-
+
ameba/rule/performance/map_instead_of_block.cr
@@ -977,11 +977,6 @@ that follow map
.
- -
- MAP_NAME =
"map"
-
-
-
-
MSG =
"Use `%s {...}` instead of `map {...}.%s`"
@@ -1435,7 +1430,7 @@ that follow map
.
- [View source]
+ [View source]
@@ -1616,7 +1611,7 @@ that follow map
.
- [View source]
+ [View source]
@@ -1632,7 +1627,7 @@ that follow map
.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Performance/MinMaxAfterMap.html b/Ameba/Rule/Performance/MinMaxAfterMap.html
index c28307b5..10a14c8a 100644
--- a/Ameba/Rule/Performance/MinMaxAfterMap.html
+++ b/Ameba/Rule/Performance/MinMaxAfterMap.html
@@ -954,7 +954,7 @@
-
+
ameba/rule/performance/minmax_after_map.cr
@@ -1439,7 +1439,7 @@
- [View source]
+ [View source]
@@ -1620,7 +1620,7 @@
- [View source]
+ [View source]
@@ -1636,7 +1636,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Performance/SizeAfterFilter.html b/Ameba/Rule/Performance/SizeAfterFilter.html
index d095ab1a..ab4d9cd5 100644
--- a/Ameba/Rule/Performance/SizeAfterFilter.html
+++ b/Ameba/Rule/Performance/SizeAfterFilter.html
@@ -961,7 +961,7 @@
-
+
ameba/rule/performance/size_after_filter.cr
@@ -1465,7 +1465,7 @@
- [View source]
+ [View source]
@@ -1674,7 +1674,7 @@
- [View source]
+ [View source]
@@ -1690,7 +1690,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Style.html b/Ameba/Rule/Style.html
index 14b5b7de..3ed90cfb 100644
--- a/Ameba/Rule/Style.html
+++ b/Ameba/Rule/Style.html
@@ -912,84 +912,84 @@
-
+
ameba/rule/style/guard_clause.cr
-
+
ameba/rule/style/is_a_filter.cr
-
+
ameba/rule/style/is_a_nil.cr
-
+
ameba/rule/style/large_numbers.cr
-
+
ameba/rule/style/negated_conditions_in_unless.cr
-
+
ameba/rule/style/parentheses_around_condition.cr
-
+
ameba/rule/style/redundant_begin.cr
-
+
ameba/rule/style/redundant_next.cr
-
+
ameba/rule/style/redundant_return.cr
-
+
ameba/rule/style/unless_else.cr
-
+
ameba/rule/style/verbose_block.cr
-
+
ameba/rule/style/while_true.cr
diff --git a/Ameba/Rule/Style/GuardClause.html b/Ameba/Rule/Style/GuardClause.html
index b32b280e..df246c8b 100644
--- a/Ameba/Rule/Style/GuardClause.html
+++ b/Ameba/Rule/Style/GuardClause.html
@@ -987,7 +987,7 @@ ok
-
+
ameba/rule/style/guard_clause.cr
@@ -1435,7 +1435,7 @@ ok
- [View source]
+ [View source]
@@ -1588,7 +1588,7 @@ ok
- [View source]
+ [View source]
@@ -1632,7 +1632,7 @@ ok
if
, unless
, case
,
-
+
ameba/rule/style/parentheses_around_condition.cr
@@ -1289,7 +1289,7 @@ around the condition of if
, unless
, case
,
if
, unless
, case
,
nil
-
+
ameba/rule/style/redundant_next.cr
@@ -1499,7 +1499,7 @@ without arguments. Sometimes such statements are used to yild the nil
- [View source]
+ [View source]
@@ -1736,7 +1736,7 @@ without arguments. Sometimes such statements are used to yild the nil
- [View source]
+ [View source]
@@ -1752,7 +1752,7 @@ without arguments. Sometimes such statements are used to yild the nil
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Style/RedundantReturn.html b/Ameba/Rule/Style/RedundantReturn.html
index e1725de0..071862ad 100644
--- a/Ameba/Rule/Style/RedundantReturn.html
+++ b/Ameba/Rule/Style/RedundantReturn.html
@@ -1011,7 +1011,7 @@ without arguments. Sometimes such returns are used to return the nil
-
+
ameba/rule/style/redundant_return.cr
@@ -1493,7 +1493,7 @@ without arguments. Sometimes such returns are used to return the nil
- [View source]
+ [View source]
@@ -1730,7 +1730,7 @@ without arguments. Sometimes such returns are used to return the nil
- [View source]
+ [View source]
@@ -1746,7 +1746,7 @@ without arguments. Sometimes such returns are used to return the nil
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Style/UnlessElse.html b/Ameba/Rule/Style/UnlessElse.html
index fd3ed7a3..2caf8f8c 100644
--- a/Ameba/Rule/Style/UnlessElse.html
+++ b/Ameba/Rule/Style/UnlessElse.html
@@ -967,7 +967,7 @@ an if
, so the previous invalid example would become this:
-
+
ameba/rule/style/unless_else.cr
@@ -1288,7 +1288,7 @@ an if
, so the previous invalid example would become this:
- [View source]
+ [View source]
@@ -1469,7 +1469,7 @@ an if
, so the previous invalid example would become this:
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Style/VerboseBlock.html b/Ameba/Rule/Style/VerboseBlock.html
index 5ac13277..379504df 100644
--- a/Ameba/Rule/Style/VerboseBlock.html
+++ b/Ameba/Rule/Style/VerboseBlock.html
@@ -958,7 +958,7 @@ argument as a receiver, that can be collapsed into a short form.
-
+
ameba/rule/style/verbose_block.cr
@@ -1437,7 +1437,7 @@ argument as a receiver, that can be collapsed into a short form.
- [View source]
+ [View source]
@@ -1814,7 +1814,7 @@ argument as a receiver, that can be collapsed into a short form.
- [View source]
+ [View source]
diff --git a/Ameba/Rule/Style/WhileTrue.html b/Ameba/Rule/Style/WhileTrue.html
index 7d44f2c7..2da4fc64 100644
--- a/Ameba/Rule/Style/WhileTrue.html
+++ b/Ameba/Rule/Style/WhileTrue.html
@@ -954,7 +954,7 @@
-
+
ameba/rule/style/while_true.cr
@@ -1262,7 +1262,7 @@
- [View source]
+ [View source]
@@ -1443,7 +1443,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Runner.html b/Ameba/Runner.html
index 7adaae54..7653ddc4 100644
--- a/Ameba/Runner.html
+++ b/Ameba/Runner.html
@@ -931,7 +931,7 @@ runner.run.success? # => true or false
-
+
ameba/runner.cr
@@ -1064,7 +1064,7 @@ config.formatter = formatter
- [View source]
+ [View source]
@@ -1104,7 +1104,7 @@ runner.explain({file: file, line: l, column: c})
- [View source]
+ [View source]
@@ -1131,7 +1131,7 @@ runner.run # => returns runner again
- [View source]
+ [View source]
@@ -1152,7 +1152,7 @@ runner.run # => returns runner again
false
if no issues were corrected.
false
if no issues were corrected.
:hello, :world
will be replaced by :hi
.
-
+
ameba/source/rewriter.cr
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
:hello, :world
will be replaced by :hi
.
View source]
+ [View source]
@@ -1130,7 +1130,7 @@ text via View source]
+ [View source]
@@ -1164,7 +1164,7 @@ code line number that each annotation corresponds to.
- [View source]
+ [View source]
@@ -1201,7 +1201,7 @@ code line number that each annotation corresponds to.
- [View source]
+ [View source]
@@ -1223,7 +1223,7 @@ The prefix is empty if the annotation is at the end of a code line.
- [View source]
+ [View source]
@@ -1239,7 +1239,7 @@ The prefix is empty if the annotation is at the end of a code line.
- [View source]
+ [View source]
@@ -1276,7 +1276,7 @@ source1.to_s == source2.to_s # => true
- [View source]
+ [View source]
diff --git a/Ameba/Spec/BeValid.html b/Ameba/Spec/BeValid.html
index 4ab07e47..0c2f5063 100644
--- a/Ameba/Spec/BeValid.html
+++ b/Ameba/Spec/BeValid.html
@@ -912,7 +912,7 @@
-
+
ameba/spec/be_valid.cr
@@ -977,7 +977,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Spec/BeValidExpectation.html b/Ameba/Spec/BeValidExpectation.html
index 27ae4161..2288ab18 100644
--- a/Ameba/Spec/BeValidExpectation.html
+++ b/Ameba/Spec/BeValidExpectation.html
@@ -914,7 +914,7 @@
-
+
ameba/spec/be_valid.cr
@@ -1037,7 +1037,7 @@
- [View source]
+ [View source]
@@ -1067,7 +1067,7 @@
- [View source]
+ [View source]
@@ -1083,7 +1083,7 @@
- [View source]
+ [View source]
@@ -1099,7 +1099,7 @@
- [View source]
+ [View source]
@@ -1115,7 +1115,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Spec/ExpectIssue.html b/Ameba/Spec/ExpectIssue.html
index 6bdd7918..3d538d3f 100644
--- a/Ameba/Spec/ExpectIssue.html
+++ b/Ameba/Spec/ExpectIssue.html
@@ -1014,7 +1014,7 @@ issue messages with [...]
:
-
+
ameba/spec/expect_issue.cr
@@ -1113,7 +1113,7 @@ issue messages with [...]
:
- [View source]
+ [View source]
@@ -1129,7 +1129,7 @@ issue messages with [...]
:
- [View source]
+ [View source]
@@ -1145,7 +1145,7 @@ issue messages with [...]
:
- [View source]
+ [View source]
@@ -1161,7 +1161,7 @@ issue messages with [...]
:
- [View source]
+ [View source]
diff --git a/Ameba/Spec/Util.html b/Ameba/Spec/Util.html
index d7fe8123..6138c606 100644
--- a/Ameba/Spec/Util.html
+++ b/Ameba/Spec/Util.html
@@ -928,7 +928,7 @@
-
+
ameba/spec/util.cr
@@ -993,7 +993,7 @@
- [View source]
+ [View source]
diff --git a/Ameba/Tokenizer.html b/Ameba/Tokenizer.html
index 5fbe09b3..42f7ca30 100644
--- a/Ameba/Tokenizer.html
+++ b/Ameba/Tokenizer.html
@@ -930,7 +930,7 @@ tokenizer.run do |token
-
+
ameba/tokenizer.cr
@@ -1046,7 +1046,7 @@ tokenizer.run do |token
- [View source]
+ [View source]
@@ -1069,7 +1069,7 @@ tokenizer.run do |token
- [View source]
+ [View source]
@@ -1107,7 +1107,7 @@ tokenizer.run do |token
- [View source]
+ [View source]
diff --git a/index.html b/index.html
index 685da957..9e51710d 100644
--- a/index.html
+++ b/index.html
@@ -1008,8 +1008,7 @@ $ CRYSTAL_WORKERS=8 ameba #=> 10.14 seconds
Add this to your application's shard.yml
:
development_dependencies:
ameba:
- github: crystal-ameba/ameba
- version: ~> 1.4.0
+ github: crystal-ameba/ameba
Build bin/ameba
binary within your project directory while running shards install
.