Deploying to gh-pages from @ 80532da357 🚀

This commit is contained in:
veelenga 2022-10-14 18:10:09 +00:00
parent 5691d407a5
commit 017e9a8722
121 changed files with 1270 additions and 1270 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -898,7 +898,7 @@ that are tested by this rule, it should add an issue.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L29" target="_blank">
ameba/rule/base.cr
</a>
@ -1098,7 +1098,7 @@ that are tested by this rule, it should add an issue.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L161" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L161" target="_blank">View source</a>]
</div>
</div>
@ -1135,7 +1135,7 @@ that are tested by this rule, it should add an issue.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L107" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L107" target="_blank">View source</a>]
</div>
</div>
@ -1152,14 +1152,14 @@ that are tested by this rule, it should add an issue.</p>
<p>A convenient addition to <code><a href="../../Ameba/Rule/Base.html#test%28source%3ASource%2Cnode%3ACrystal%3A%3AASTNode%2C%2Aopts%29-instance-method">#test</a></code> method that does the same
but returns a passed in <code>source</code> as an addition.</p>
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">MyRule</span>.<span class="k">new</span>.catch(source)
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">MyRule</span>.new.catch(source)
source.valid?</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L52" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L52" target="_blank">View source</a>]
</div>
</div>
@ -1183,7 +1183,7 @@ the one of the given source.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L90" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L90" target="_blank">View source</a>]
</div>
</div>
@ -1203,13 +1203,13 @@ the one of the given source.</p>
<span class="c"># ...</span>
<span class="k">end</span>
<span class="t">MyGroup</span><span class="t">::</span><span class="t">MyRule</span>.<span class="k">new</span>.group <span class="c"># =&gt; &quot;MyGroup&quot;</span></code></pre>
<span class="t">MyGroup</span><span class="t">::</span><span class="t">MyRule</span>.new.group <span class="c"># =&gt; &quot;MyGroup&quot;</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L79" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L79" target="_blank">View source</a>]
</div>
</div>
@ -1239,7 +1239,7 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L111" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L111" target="_blank">View source</a>]
</div>
</div>
@ -1260,13 +1260,13 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
<span class="k">end</span>
<span class="k">end</span>
<span class="t">MyRule</span>.<span class="k">new</span>.name <span class="c"># =&gt; &quot;MyRule&quot;</span></code></pre>
<span class="t">MyRule</span>.new.name <span class="c"># =&gt; &quot;MyRule&quot;</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L66" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L66" target="_blank">View source</a>]
</div>
</div>
@ -1289,7 +1289,7 @@ usual rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L103" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L103" target="_blank">View source</a>]
</div>
</div>
@ -1305,7 +1305,7 @@ usual rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L41" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L41" target="_blank">View source</a>]
</div>
</div>
@ -1329,7 +1329,7 @@ Must be overriten for other type of rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L37" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L37" target="_blank">View source</a>]
</div>
</div>
@ -1357,7 +1357,7 @@ Must be overriten for other type of rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/base.cr#L115" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/base.cr#L115" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,21 +746,21 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/line_length.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/line_length.cr#L1" target="_blank">
ameba/rule/layout/line_length.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_blank_lines.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_blank_lines.cr#L1" target="_blank">
ameba/rule/layout/trailing_blank_lines.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_whitespace.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_whitespace.cr#L1" target="_blank">
ameba/rule/layout/trailing_whitespace.cr
</a>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,9 +736,9 @@
<p>A rule that disallows lines longer than <code><a href="../../../Ameba/Rule/Layout/LineLength.html#max_length%3AInt32-instance-method">#max_length</a></code> number of symbols.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/LineLength:
Enabled: true
MaxLength: 100</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">LineLength</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MaxLength</span>: <span class="n">100</span></code></pre>
@ -779,7 +779,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/line_length.cr#L11" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/line_length.cr#L11" target="_blank">
ameba/rule/layout/line_length.cr
</a>
@ -1061,15 +1061,15 @@
<p>A rule that disallows lines longer than <code><a href="../../../Ameba/Rule/Layout/LineLength.html#max_length%3AInt32-instance-method">#max_length</a></code> number of symbols.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/LineLength:
Enabled: true
MaxLength: 100</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">LineLength</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MaxLength</span>: <span class="n">100</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/line_length.cr#L11" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/line_length.cr#L11" target="_blank">View source</a>]
</div>
</div>
@ -1239,7 +1239,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/line_length.cr#L20" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/line_length.cr#L20" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,8 +736,8 @@
<p>A rule that disallows trailing blank lines at the end of the source file.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/TrailingBlankLines:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">TrailingBlankLines</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -778,7 +778,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_blank_lines.cr#L10" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_blank_lines.cr#L10" target="_blank">
ameba/rule/layout/trailing_blank_lines.cr
</a>
@ -1055,14 +1055,14 @@
<p>A rule that disallows trailing blank lines at the end of the source file.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/TrailingBlankLines:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">TrailingBlankLines</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_blank_lines.cr#L10" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_blank_lines.cr#L10" target="_blank">View source</a>]
</div>
</div>
@ -1204,7 +1204,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_blank_lines.cr#L18" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_blank_lines.cr#L18" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,8 +736,8 @@
<p>A rule that disallows trailing whitespaces.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/TrailingWhitespace:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">TrailingWhitespace</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -778,7 +778,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_whitespace.cr#L10" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_whitespace.cr#L10" target="_blank">
ameba/rule/layout/trailing_whitespace.cr
</a>
@ -1050,14 +1050,14 @@
<p>A rule that disallows trailing whitespaces.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Layout/TrailingWhitespace:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Layout</span><span class="o">/</span><span class="t">TrailingWhitespace</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_whitespace.cr#L10" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_whitespace.cr#L10" target="_blank">View source</a>]
</div>
</div>
@ -1199,7 +1199,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/layout/trailing_whitespace.cr#L17" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/layout/trailing_whitespace.cr#L17" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,196 +746,196 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/ambiguous_assignment.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/ambiguous_assignment.cr#L1" target="_blank">
ameba/rule/lint/ambiguous_assignment.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/bad_directive.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/bad_directive.cr#L1" target="_blank">
ameba/rule/lint/bad_directive.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/comparison_to_boolean.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/comparison_to_boolean.cr#L1" target="_blank">
ameba/rule/lint/comparison_to_boolean.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debug_calls.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debug_calls.cr#L1" target="_blank">
ameba/rule/lint/debug_calls.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debugger_statement.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debugger_statement.cr#L1" target="_blank">
ameba/rule/lint/debugger_statement.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/duplicated_require.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/duplicated_require.cr#L1" target="_blank">
ameba/rule/lint/duplicated_require.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_ensure.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_ensure.cr#L1" target="_blank">
ameba/rule/lint/empty_ensure.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_expression.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_expression.cr#L1" target="_blank">
ameba/rule/lint/empty_expression.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L1" target="_blank">
ameba/rule/lint/empty_loop.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/hash_duplicated_key.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/hash_duplicated_key.cr#L1" target="_blank">
ameba/rule/lint/hash_duplicated_key.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L1" target="_blank">
ameba/rule/lint/literal_in_condition.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_interpolation.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_interpolation.cr#L1" target="_blank">
ameba/rule/lint/literal_in_interpolation.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/percent_array.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/percent_array.cr#L1" target="_blank">
ameba/rule/lint/percent_array.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/rand_zero.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/rand_zero.cr#L1" target="_blank">
ameba/rule/lint/rand_zero.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_string_coercion.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_string_coercion.cr#L1" target="_blank">
ameba/rule/lint/redundant_string_coercion.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_index.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_index.cr#L1" target="_blank">
ameba/rule/lint/redundant_with_index.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_object.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_object.cr#L1" target="_blank">
ameba/rule/lint/redundant_with_object.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_argument.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_argument.cr#L1" target="_blank">
ameba/rule/lint/shadowed_argument.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_exception.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_exception.cr#L1" target="_blank">
ameba/rule/lint/shadowed_exception.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L1" target="_blank">
ameba/rule/lint/shadowing_outer_local_var.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shared_var_in_fiber.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shared_var_in_fiber.cr#L1" target="_blank">
ameba/rule/lint/shared_var_in_fiber.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/spec_focus.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/spec_focus.cr#L1" target="_blank">
ameba/rule/lint/spec_focus.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/syntax.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/syntax.cr#L1" target="_blank">
ameba/rule/lint/syntax.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unneeded_disable_directive.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unneeded_disable_directive.cr#L1" target="_blank">
ameba/rule/lint/unneeded_disable_directive.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unreachable_code.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unreachable_code.cr#L1" target="_blank">
ameba/rule/lint/unreachable_code.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L1" target="_blank">
ameba/rule/lint/unused_argument.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_assign.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_assign.cr#L1" target="_blank">
ameba/rule/lint/useless_assign.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_condition_in_when.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_condition_in_when.cr#L1" target="_blank">
ameba/rule/lint/useless_condition_in_when.cr
</a>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -741,12 +741,12 @@ x <span class="o">=</span><span class="o">+</span> y
x <span class="o">=</span><span class="o">!</span> y
<span class="c"># good</span>
x -= y <span class="c"># or x = -y</span>
x += y <span class="c"># or x = +y</span>
x <span class="o">-=</span> y <span class="c"># or x = -y</span>
x <span class="o">+=</span> y <span class="c"># or x = +y</span>
x <span class="o">!=</span> y <span class="c"># or x = !y</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/AmbiguousAssignment:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">AmbiguousAssignment</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -789,7 +789,7 @@ x <span class="o">!=</span> y <span class="c"># or x = !y</span></code></pre>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/ambiguous_assignment.cr#L20" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/ambiguous_assignment.cr#L20" target="_blank">
ameba/rule/lint/ambiguous_assignment.cr
</a>
@ -811,7 +811,7 @@ x <span class="o">!=</span> y <span class="c"># or x = !y</span></code></pre>
<dl>
<dt class="entry-const" id="MISTAKES">
<strong>MISTAKES</strong> = <code>{<span class="s">&quot;=-&quot;</span> =&gt; <span class="s">&quot;-=&quot;</span>, <span class="s">&quot;=+&quot;</span> =&gt; <span class="s">&quot;+=&quot;</span>, <span class="s">&quot;=!&quot;</span> =&gt; <span class="s">&quot;!=&quot;</span>}</code>
<strong>MISTAKES</strong> = <code>{<span class="s">&quot;=-&quot;</span> <span class="o">=&gt;</span> <span class="s">&quot;-=&quot;</span>, <span class="s">&quot;=+&quot;</span> <span class="o">=&gt;</span> <span class="s">&quot;+=&quot;</span>, <span class="s">&quot;=!&quot;</span> <span class="o">=&gt;</span> <span class="s">&quot;!=&quot;</span>}</code>
</dt>
@ -1150,18 +1150,18 @@ x <span class="o">=</span><span class="o">+</span> y
x <span class="o">=</span><span class="o">!</span> y
<span class="c"># good</span>
x -= y <span class="c"># or x = -y</span>
x += y <span class="c"># or x = +y</span>
x <span class="o">-=</span> y <span class="c"># or x = -y</span>
x <span class="o">+=</span> y <span class="c"># or x = +y</span>
x <span class="o">!=</span> y <span class="c"># or x = !y</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/AmbiguousAssignment:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">AmbiguousAssignment</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/ambiguous_assignment.cr#L20" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/ambiguous_assignment.cr#L20" target="_blank">View source</a>]
</div>
</div>
@ -1303,7 +1303,7 @@ x <span class="o">!=</span> y <span class="c"># or x = !y</span></code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/ambiguous_assignment.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/ambiguous_assignment.cr#L35" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -742,8 +742,8 @@ to disable a rule that even doesn't exist:</p>
<span class="n">:bar</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/BadDirective:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">BadDirective</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -784,7 +784,7 @@ to disable a rule that even doesn't exist:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/bad_directive.cr#L20" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/bad_directive.cr#L20" target="_blank">
ameba/rule/lint/bad_directive.cr
</a>
@ -1072,14 +1072,14 @@ to disable a rule that even doesn't exist:</p>
<span class="n">:bar</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/BadDirective:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">BadDirective</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/bad_directive.cr#L20" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/bad_directive.cr#L20" target="_blank">View source</a>]
</div>
</div>
@ -1221,7 +1221,7 @@ to disable a rule that even doesn't exist:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/bad_directive.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/bad_directive.cr#L29" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -743,8 +743,8 @@ bar <span class="o">!=</span> <span class="n">false</span>
could get the same result by using either the variable directly,
or negating the variable.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ComparisonToBoolean:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ComparisonToBoolean</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -787,7 +787,7 @@ or negating the variable.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/comparison_to_boolean.cr#L22" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/comparison_to_boolean.cr#L22" target="_blank">
ameba/rule/lint/comparison_to_boolean.cr
</a>
@ -1150,14 +1150,14 @@ bar <span class="o">!=</span> <span class="n">false</span>
could get the same result by using either the variable directly,
or negating the variable.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ComparisonToBoolean:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ComparisonToBoolean</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/comparison_to_boolean.cr#L22" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/comparison_to_boolean.cr#L22" target="_blank">View source</a>]
</div>
</div>
@ -1299,7 +1299,7 @@ or negating the variable.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/comparison_to_boolean.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/comparison_to_boolean.cr#L33" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -738,13 +738,13 @@
<p>This is because we don't want debug calls accidentally being
committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DebugCalls:
Enabled: true
MethodNames:
- p
- p!
- pp
- pp!</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DebugCalls</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MethodNames</span>:
<span class="o">-</span> p
<span class="o">-</span> p!
<span class="o">-</span> pp
<span class="o">-</span> pp!</code></pre>
@ -785,7 +785,7 @@ committed into our codebase.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debug_calls.cr#L18" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debug_calls.cr#L18" target="_blank">
ameba/rule/lint/debug_calls.cr
</a>
@ -1069,19 +1069,19 @@ committed into our codebase.</p>
<p>This is because we don't want debug calls accidentally being
committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DebugCalls:
Enabled: true
MethodNames:
- p
- p!
- pp
- pp!</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DebugCalls</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MethodNames</span>:
<span class="o">-</span> p
<span class="o">-</span> p!
<span class="o">-</span> pp
<span class="o">-</span> pp!</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debug_calls.cr#L18" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debug_calls.cr#L18" target="_blank">View source</a>]
</div>
</div>
@ -1251,7 +1251,7 @@ committed into our codebase.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debug_calls.cr#L26" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debug_calls.cr#L26" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -738,8 +738,8 @@
<p>This is because we don't want debugger breakpoints accidentally being
committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DebuggerStatement:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DebuggerStatement</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -780,7 +780,7 @@ committed into our codebase.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debugger_statement.cr#L13" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debugger_statement.cr#L13" target="_blank">
ameba/rule/lint/debugger_statement.cr
</a>
@ -1054,14 +1054,14 @@ committed into our codebase.</p>
<p>This is because we don't want debugger breakpoints accidentally being
committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DebuggerStatement:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DebuggerStatement</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debugger_statement.cr#L13" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debugger_statement.cr#L13" target="_blank">View source</a>]
</div>
</div>
@ -1203,7 +1203,7 @@ committed into our codebase.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/debugger_statement.cr#L20" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/debugger_statement.cr#L20" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -739,8 +739,8 @@
<span class="k">require</span> <span class="s">&quot;./stuff&quot;</span>
<span class="k">require</span> <span class="s">&quot;./thing&quot;</span> <span class="c"># duplicated require</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DuplicatedRequire:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DuplicatedRequire</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -781,7 +781,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/duplicated_require.cr#L16" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/duplicated_require.cr#L16" target="_blank">
ameba/rule/lint/duplicated_require.cr
</a>
@ -1056,14 +1056,14 @@
<span class="k">require</span> <span class="s">&quot;./stuff&quot;</span>
<span class="k">require</span> <span class="s">&quot;./thing&quot;</span> <span class="c"># duplicated require</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/DuplicatedRequire:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">DuplicatedRequire</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/duplicated_require.cr#L16" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/duplicated_require.cr#L16" target="_blank">View source</a>]
</div>
</div>
@ -1205,7 +1205,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/duplicated_require.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/duplicated_require.cr#L23" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -758,8 +758,8 @@
do_something_else
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyEnsure
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyEnsure</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -800,7 +800,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_ensure.cr#L41" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_ensure.cr#L41" target="_blank">
ameba/rule/lint/empty_ensure.cr
</a>
@ -1094,14 +1094,14 @@
do_something_else
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyEnsure
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyEnsure</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_ensure.cr#L41" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_ensure.cr#L41" target="_blank">View source</a>]
</div>
</div>
@ -1243,7 +1243,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_ensure.cr#L48" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_ensure.cr#L48" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -748,8 +748,8 @@
bar
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyExpression:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyExpression</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -792,7 +792,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_expression.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_expression.cr#L30" target="_blank">
ameba/rule/lint/empty_expression.cr
</a>
@ -1165,14 +1165,14 @@
bar
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyExpression:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyExpression</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_expression.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_expression.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1314,7 +1314,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_expression.cr#L41" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_expression.cr#L41" target="_blank">View source</a>]
</div>
</div>
@ -1330,7 +1330,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_expression.cr#L48" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_expression.cr#L48" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -748,7 +748,7 @@ loop <span class="k">do</span>
<p>And this is valid:</p>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
<span class="k">while</span> a <span class="o">&lt;</span> <span class="n">10</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span>
<span class="k">until</span> socket_opened?
@ -758,8 +758,8 @@ loop <span class="k">do</span>
do_something_here
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyLoop:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyLoop</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -802,7 +802,7 @@ loop <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">
ameba/rule/lint/empty_loop.cr
</a>
@ -1175,7 +1175,7 @@ loop <span class="k">do</span>
<p>And this is valid:</p>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
<span class="k">while</span> a <span class="o">&lt;</span> <span class="n">10</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span>
<span class="k">until</span> socket_opened?
@ -1185,14 +1185,14 @@ loop <span class="k">do</span>
do_something_here
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/EmptyLoop:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">EmptyLoop</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">View source</a>]
</div>
</div>
@ -1334,7 +1334,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L49" target="_blank">View source</a>]
</div>
</div>
@ -1350,7 +1350,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L55" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L55" target="_blank">View source</a>]
</div>
</div>
@ -1366,7 +1366,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/empty_loop.cr#L59" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/empty_loop.cr#L59" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,12 +736,12 @@
<p>A rule that disallows duplicated keys in hash literals.</p>
<p>This is considered invalid:</p>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> =&gt; <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> =&gt; <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> =&gt; <span class="n">3</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> <span class="o">=&gt;</span> <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">3</span>}</code></pre>
<p>And it has to written as this instead:</p>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> =&gt; <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> =&gt; <span class="n">2</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> <span class="o">=&gt;</span> <span class="n">2</span>}</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/HashDuplicatedKey:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">HashDuplicatedKey</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -782,7 +782,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/hash_duplicated_key.cr#L22" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/hash_duplicated_key.cr#L22" target="_blank">
ameba/rule/lint/hash_duplicated_key.cr
</a>
@ -1054,18 +1054,18 @@
<p>A rule that disallows duplicated keys in hash literals.</p>
<p>This is considered invalid:</p>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> =&gt; <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> =&gt; <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> =&gt; <span class="n">3</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> <span class="o">=&gt;</span> <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">3</span>}</code></pre>
<p>And it has to written as this instead:</p>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> =&gt; <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> =&gt; <span class="n">2</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> <span class="o">=&gt;</span> <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> <span class="o">=&gt;</span> <span class="n">2</span>}</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/HashDuplicatedKey:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">HashDuplicatedKey</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/hash_duplicated_key.cr#L22" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/hash_duplicated_key.cr#L22" target="_blank">View source</a>]
</div>
</div>
@ -1207,7 +1207,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/hash_duplicated_key.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/hash_duplicated_key.cr#L29" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -744,8 +744,8 @@ replaced with either the body of the construct, or deleted entirely.</p>
<span class="n">:ok</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/LiteralInCondition:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">LiteralInCondition</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -788,7 +788,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L22" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L22" target="_blank">
ameba/rule/lint/literal_in_condition.cr
</a>
@ -1162,14 +1162,14 @@ replaced with either the body of the construct, or deleted entirely.</p>
<span class="n">:ok</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/LiteralInCondition:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">LiteralInCondition</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L22" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L22" target="_blank">View source</a>]
</div>
</div>
@ -1199,7 +1199,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L32" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L32" target="_blank">View source</a>]
</div>
</div>
@ -1327,7 +1327,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L36" target="_blank">View source</a>]
</div>
</div>
@ -1343,7 +1343,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L40" target="_blank">View source</a>]
</div>
</div>
@ -1359,7 +1359,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_condition.cr#L44" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_condition.cr#L44" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -740,8 +740,8 @@ that contain a literal value instead of a variable or function.</p>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<span class="s">&quot;There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/LiteralInInterpolation
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">LiteralInInterpolation</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -784,7 +784,7 @@ that contain a literal value instead of a variable or function.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_interpolation.cr#L18" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_interpolation.cr#L18" target="_blank">
ameba/rule/lint/literal_in_interpolation.cr
</a>
@ -1139,14 +1139,14 @@ that contain a literal value instead of a variable or function.</p>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<span class="s">&quot;There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/LiteralInInterpolation
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">LiteralInInterpolation</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_interpolation.cr#L18" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_interpolation.cr#L18" target="_blank">View source</a>]
</div>
</div>
@ -1288,7 +1288,7 @@ that contain a literal value instead of a variable or function.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/literal_in_interpolation.cr#L27" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/literal_in_interpolation.cr#L27" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -786,7 +786,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/percent_array.cr#L26" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/percent_array.cr#L26" target="_blank">
ameba/rule/lint/percent_array.cr
</a>
@ -1093,7 +1093,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/percent_array.cr#L26" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/percent_array.cr#L26" target="_blank">View source</a>]
</div>
</div>
@ -1291,7 +1291,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/percent_array.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/percent_array.cr#L36" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -743,8 +743,8 @@ Such calls always return <code>0</code>.</p>
<span class="c"># or</span>
rand(<span class="n">2</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RandZero:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RandZero</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -785,7 +785,7 @@ rand(<span class="n">2</span>)</code></pre>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/rand_zero.cr#L25" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/rand_zero.cr#L25" target="_blank">
ameba/rule/lint/rand_zero.cr
</a>
@ -1064,14 +1064,14 @@ Such calls always return <code>0</code>.</p>
<span class="c"># or</span>
rand(<span class="n">2</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RandZero:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RandZero</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/rand_zero.cr#L25" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/rand_zero.cr#L25" target="_blank">View source</a>]
</div>
</div>
@ -1213,7 +1213,7 @@ rand(<span class="n">2</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/rand_zero.cr#L32" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/rand_zero.cr#L32" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -741,8 +741,8 @@ which is redundant.</p>
<p>And this is valid:</p>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantStringCoersion
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantStringCoersion</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -785,7 +785,7 @@ which is redundant.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_string_coercion.cr#L23" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_string_coercion.cr#L23" target="_blank">
ameba/rule/lint/redundant_string_coercion.cr
</a>
@ -1141,14 +1141,14 @@ which is redundant.</p>
<p>And this is valid:</p>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantStringCoersion
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantStringCoersion</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_string_coercion.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_string_coercion.cr#L23" target="_blank">View source</a>]
</div>
</div>
@ -1290,7 +1290,7 @@ which is redundant.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_string_coercion.cr#L32" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_string_coercion.cr#L32" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -748,8 +748,8 @@ collection.each_with_index <span class="k">do</span> <span class="o">|</span>e,
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantWithIndex:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantWithIndex</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -790,7 +790,7 @@ collection.each_with_index <span class="k">do</span> <span class="o">|</span>e,
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_index.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_index.cr#L29" target="_blank">
ameba/rule/lint/redundant_with_index.cr
</a>
@ -1055,14 +1055,14 @@ collection.each_with_index <span class="k">do</span> <span class="o">|</span>e,
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantWithIndex:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantWithIndex</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_index.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_index.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1204,7 +1204,7 @@ collection.each_with_index <span class="k">do</span> <span class="o">|</span>e,
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_index.cr#L34" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_index.cr#L34" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -748,8 +748,8 @@ collection.each_with_object(<span class="n">0</span>) <span class="k">do</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantWithObject:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantWithObject</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -790,7 +790,7 @@ collection.each_with_object(<span class="n">0</span>) <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_object.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_object.cr#L30" target="_blank">
ameba/rule/lint/redundant_with_object.cr
</a>
@ -1074,14 +1074,14 @@ collection.each_with_object(<span class="n">0</span>) <span class="k">do</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/RedundantWithObject:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">RedundantWithObject</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_object.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_object.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1223,7 +1223,7 @@ collection.each_with_object(<span class="n">0</span>) <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/redundant_with_object.cr#L37" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/redundant_with_object.cr#L37" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -756,8 +756,8 @@
foo
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowedArgument:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowedArgument</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -798,7 +798,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_argument.cr#L38" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_argument.cr#L38" target="_blank">
ameba/rule/lint/shadowed_argument.cr
</a>
@ -1095,14 +1095,14 @@
foo
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowedArgument:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowedArgument</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_argument.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_argument.cr#L38" target="_blank">View source</a>]
</div>
</div>
@ -1244,7 +1244,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_argument.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_argument.cr#L49" target="_blank">View source</a>]
</div>
</div>
@ -1260,7 +1260,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_argument.cr#L45" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_argument.cr#L45" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -754,8 +754,8 @@ exception is rescued.</p>
handle_exception
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowedException:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowedException</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -796,7 +796,7 @@ exception is rescued.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_exception.cr#L36" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_exception.cr#L36" target="_blank">
ameba/rule/lint/shadowed_exception.cr
</a>
@ -1086,14 +1086,14 @@ exception is rescued.</p>
handle_exception
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowedException:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowedException</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_exception.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_exception.cr#L36" target="_blank">View source</a>]
</div>
</div>
@ -1235,7 +1235,7 @@ exception is rescued.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowed_exception.cr#L43" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowed_exception.cr#L43" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -751,8 +751,8 @@ for block or proc arguments.</p>
<span class="k">end</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowingOuterLocalVar:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowingOuterLocalVar</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -793,7 +793,7 @@ for block or proc arguments.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L33" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L33" target="_blank">
ameba/rule/lint/shadowing_outer_local_var.cr
</a>
@ -1090,14 +1090,14 @@ for block or proc arguments.</p>
<span class="k">end</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/ShadowingOuterLocalVar:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">ShadowingOuterLocalVar</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L33" target="_blank">View source</a>]
</div>
</div>
@ -1239,7 +1239,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L48" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L48" target="_blank">View source</a>]
</div>
</div>
@ -1255,7 +1255,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L52" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L52" target="_blank">View source</a>]
</div>
</div>
@ -1271,7 +1271,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shadowing_outer_local_var.cr#L41" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shadowing_outer_local_var.cr#L41" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -739,7 +739,7 @@ which are mutated during iterations.</p>
<p>In most cases it leads to unexpected behaviour and is undesired.</p>
<p>For example, having this example:</p>
<pre><code class="language-crystal">n <span class="o">=</span> <span class="n">0</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).<span class="k">new</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).new
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
n <span class="o">=</span> n <span class="o">+</span> <span class="n">1</span>
@ -751,7 +751,7 @@ channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">
and when <code>channel.receive</code> is executed its value is <code>3</code>.</p>
<p>To solve this, the code above needs to be rewritten to the following:</p>
<pre><code class="language-crystal">n <span class="o">=</span> <span class="n">0</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).<span class="k">new</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).new
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
n <span class="o">=</span> n <span class="o">+</span> <span class="n">1</span>
@ -766,8 +766,8 @@ the second one.</p>
<p>There are also other technics to solve the problem above which are
<a href="https://crystal-lang.org/reference/guides/concurrency.html">officially documented</a></p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/SharedVarInFiber:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">SharedVarInFiber</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -808,7 +808,7 @@ the second one.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shared_var_in_fiber.cr#L52" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shared_var_in_fiber.cr#L52" target="_blank">
ameba/rule/lint/shared_var_in_fiber.cr
</a>
@ -1088,7 +1088,7 @@ which are mutated during iterations.</p>
<p>In most cases it leads to unexpected behaviour and is undesired.</p>
<p>For example, having this example:</p>
<pre><code class="language-crystal">n <span class="o">=</span> <span class="n">0</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).<span class="k">new</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).new
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
n <span class="o">=</span> n <span class="o">+</span> <span class="n">1</span>
@ -1100,7 +1100,7 @@ channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">
and when <code>channel.receive</code> is executed its value is <code>3</code>.</p>
<p>To solve this, the code above needs to be rewritten to the following:</p>
<pre><code class="language-crystal">n <span class="o">=</span> <span class="n">0</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).<span class="k">new</span>
channel <span class="o">=</span> <span class="t">Channel</span>(<span class="t">Int32</span>).new
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
n <span class="o">=</span> n <span class="o">+</span> <span class="n">1</span>
@ -1115,14 +1115,14 @@ the second one.</p>
<p>There are also other technics to solve the problem above which are
<a href="https://crystal-lang.org/reference/guides/concurrency.html">officially documented</a></p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/SharedVarInFiber:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">SharedVarInFiber</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shared_var_in_fiber.cr#L52" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shared_var_in_fiber.cr#L52" target="_blank">View source</a>]
</div>
</div>
@ -1264,7 +1264,7 @@ the second one.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shared_var_in_fiber.cr#L63" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shared_var_in_fiber.cr#L63" target="_blank">View source</a>]
</div>
</div>
@ -1280,7 +1280,7 @@ the second one.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/shared_var_in_fiber.cr#L59" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/shared_var_in_fiber.cr#L59" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -764,8 +764,8 @@ context <span class="s">&quot;my context&quot;</span> <span class="k">do</span>
it <span class="s">&quot;works&quot;</span> <span class="k">do</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/SpecFocus:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">SpecFocus</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -806,7 +806,7 @@ it <span class="s">&quot;works&quot;</span> <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/spec_focus.cr#L47" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/spec_focus.cr#L47" target="_blank">
ameba/rule/lint/spec_focus.cr
</a>
@ -1116,14 +1116,14 @@ context <span class="s">&quot;my context&quot;</span> <span class="k">do</span>
it <span class="s">&quot;works&quot;</span> <span class="k">do</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/SpecFocus:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">SpecFocus</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/spec_focus.cr#L47" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/spec_focus.cr#L47" target="_blank">View source</a>]
</div>
</div>
@ -1265,7 +1265,7 @@ it <span class="s">&quot;works&quot;</span> <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/spec_focus.cr#L61" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/spec_focus.cr#L61" target="_blank">View source</a>]
</div>
</div>
@ -1281,7 +1281,7 @@ it <span class="s">&quot;works&quot;</span> <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/spec_focus.cr#L55" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/spec_focus.cr#L55" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -738,7 +738,7 @@
<p>For example, this syntax is invalid:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
do_something
<span class="k">rescue</span> <span class="t">Exception</span> =&gt; e
<span class="k">rescue</span> <span class="t">Exception</span> <span class="o">=&gt;</span> e
<span class="k">end</span></code></pre>
<p>And should be properly written:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
@ -785,7 +785,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/syntax.cr#L21" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/syntax.cr#L21" target="_blank">
ameba/rule/lint/syntax.cr
</a>
@ -1040,7 +1040,7 @@
<p>For example, this syntax is invalid:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
do_something
<span class="k">rescue</span> <span class="t">Exception</span> =&gt; e
<span class="k">rescue</span> <span class="t">Exception</span> <span class="o">=&gt;</span> e
<span class="k">end</span></code></pre>
<p>And should be properly written:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
@ -1052,7 +1052,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/syntax.cr#L21" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/syntax.cr#L21" target="_blank">View source</a>]
</div>
</div>
@ -1194,7 +1194,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/syntax.cr#L27" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/syntax.cr#L27" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,8 +746,8 @@ have any effect, the snippet should be written as the following:</p>
do_something
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnneededDisableDirective
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnneededDisableDirective</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -788,7 +788,7 @@ have any effect, the snippet should be written as the following:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unneeded_disable_directive.cr#L27" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unneeded_disable_directive.cr#L27" target="_blank">
ameba/rule/lint/unneeded_disable_directive.cr
</a>
@ -1070,14 +1070,14 @@ have any effect, the snippet should be written as the following:</p>
do_something
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnneededDisableDirective
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnneededDisableDirective</span>
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unneeded_disable_directive.cr#L27" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unneeded_disable_directive.cr#L27" target="_blank">View source</a>]
</div>
</div>
@ -1219,7 +1219,7 @@ have any effect, the snippet should be written as the following:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unneeded_disable_directive.cr#L34" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unneeded_disable_directive.cr#L34" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -743,7 +743,7 @@
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
@ -753,11 +753,11 @@ loop <span class="k">do</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span> a <span class="o">&gt;</span> <span class="n">3</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnreachableCode:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnreachableCode</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -800,7 +800,7 @@ loop <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unreachable_code.cr#L44" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unreachable_code.cr#L44" target="_blank">
ameba/rule/lint/unreachable_code.cr
</a>
@ -1163,7 +1163,7 @@ loop <span class="k">do</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
@ -1173,17 +1173,17 @@ loop <span class="k">do</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span> a <span class="o">&gt;</span> <span class="n">3</span>
a += <span class="n">1</span>
a <span class="o">+=</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnreachableCode:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnreachableCode</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unreachable_code.cr#L44" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unreachable_code.cr#L44" target="_blank">View source</a>]
</div>
</div>
@ -1325,7 +1325,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unreachable_code.cr#L57" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unreachable_code.cr#L57" target="_blank">View source</a>]
</div>
</div>
@ -1341,7 +1341,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unreachable_code.cr#L53" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unreachable_code.cr#L53" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -744,11 +744,11 @@ For example, this is considered invalid:</p>
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnusedArgument:
Enabled: true
IgnoreDefs: true
IgnoreBlocks: false
IgnoreProcs: false</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnusedArgument</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">IgnoreDefs</span>: <span class="n">true</span>
<span class="t">IgnoreBlocks</span>: <span class="n">false</span>
<span class="t">IgnoreProcs</span>: <span class="n">false</span></code></pre>
@ -789,7 +789,7 @@ For example, this is considered invalid:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L27" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L27" target="_blank">
ameba/rule/lint/unused_argument.cr
</a>
@ -1114,17 +1114,17 @@ For example, this is considered invalid:</p>
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UnusedArgument:
Enabled: true
IgnoreDefs: true
IgnoreBlocks: false
IgnoreProcs: false</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UnusedArgument</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">IgnoreDefs</span>: <span class="n">true</span>
<span class="t">IgnoreBlocks</span>: <span class="n">false</span>
<span class="t">IgnoreProcs</span>: <span class="n">false</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L27" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L27" target="_blank">View source</a>]
</div>
</div>
@ -1350,7 +1350,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L43" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L43" target="_blank">View source</a>]
</div>
</div>
@ -1366,7 +1366,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L47" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L47" target="_blank">View source</a>]
</div>
</div>
@ -1382,7 +1382,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L51" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L51" target="_blank">View source</a>]
</div>
</div>
@ -1398,7 +1398,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/unused_argument.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/unused_argument.cr#L39" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,8 +746,8 @@
do_something(var)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UselessAssign:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UselessAssign</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -788,7 +788,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_assign.cr#L28" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_assign.cr#L28" target="_blank">
ameba/rule/lint/useless_assign.cr
</a>
@ -1075,14 +1075,14 @@
do_something(var)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UselessAssign:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UselessAssign</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_assign.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_assign.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1224,7 +1224,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_assign.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_assign.cr#L39" target="_blank">View source</a>]
</div>
</div>
@ -1240,7 +1240,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_assign.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_assign.cr#L35" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -741,18 +741,18 @@ where it is guaranteed to always return the same result.</p>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
<span class="t">Format</span>.new(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io)
<span class="t">Format</span>.new(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UselessConditionInWhen:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UselessConditionInWhen</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -793,7 +793,7 @@ where it is guaranteed to always return the same result.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_condition_in_when.cr#L33" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_condition_in_when.cr#L33" target="_blank">
ameba/rule/lint/useless_condition_in_when.cr
</a>
@ -1070,24 +1070,24 @@ where it is guaranteed to always return the same result.</p>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
<span class="t">Format</span>.new(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io)
<span class="t">Format</span>.new(<span class="s">&quot; %:z&quot;</span>).format(<span class="k">self</span>, io)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Lint/UselessConditionInWhen:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Lint</span><span class="o">/</span><span class="t">UselessConditionInWhen</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_condition_in_when.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_condition_in_when.cr#L33" target="_blank">View source</a>]
</div>
</div>
@ -1229,7 +1229,7 @@ where it is guaranteed to always return the same result.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/lint/useless_condition_in_when.cr#L50" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/lint/useless_condition_in_when.cr#L50" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,7 +746,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/metrics/cyclomatic_complexity.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/metrics/cyclomatic_complexity.cr#L1" target="_blank">
ameba/rule/metrics/cyclomatic_complexity.cr
</a>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,9 +736,9 @@
<p>A rule that disallows methods with a cyclomatic complexity higher than <code>MaxComplexity</code></p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Metrics/CyclomaticComplexity:
Enabled: true
MaxComplexity: 10</code></pre>
<pre><code class="language-crystal"><span class="t">Metrics</span><span class="o">/</span><span class="t">CyclomaticComplexity</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MaxComplexity</span>: <span class="n">10</span></code></pre>
@ -781,7 +781,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/metrics/cyclomatic_complexity.cr#L11" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/metrics/cyclomatic_complexity.cr#L11" target="_blank">
ameba/rule/metrics/cyclomatic_complexity.cr
</a>
@ -1142,15 +1142,15 @@
<p>A rule that disallows methods with a cyclomatic complexity higher than <code>MaxComplexity</code></p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Metrics/CyclomaticComplexity:
Enabled: true
MaxComplexity: 10</code></pre>
<pre><code class="language-crystal"><span class="t">Metrics</span><span class="o">/</span><span class="t">CyclomaticComplexity</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">MaxComplexity</span>: <span class="n">10</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/metrics/cyclomatic_complexity.cr#L11" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/metrics/cyclomatic_complexity.cr#L11" target="_blank">View source</a>]
</div>
</div>
@ -1320,7 +1320,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/metrics/cyclomatic_complexity.cr#L21" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/metrics/cyclomatic_complexity.cr#L21" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,63 +746,63 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_after_filter.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_after_filter.cr#L3" target="_blank">
ameba/rule/performance/any_after_filter.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_instead_of_empty.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_instead_of_empty.cr#L3" target="_blank">
ameba/rule/performance/any_instead_of_empty.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/base.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/base.cr#L3" target="_blank">
ameba/rule/performance/base.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/chained_call_with_no_bang.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/chained_call_with_no_bang.cr#L3" target="_blank">
ameba/rule/performance/chained_call_with_no_bang.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/compact_after_map.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/compact_after_map.cr#L3" target="_blank">
ameba/rule/performance/compact_after_map.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/first_last_after_filter.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/first_last_after_filter.cr#L3" target="_blank">
ameba/rule/performance/first_last_after_filter.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/flatten_after_map.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/flatten_after_map.cr#L3" target="_blank">
ameba/rule/performance/flatten_after_map.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/map_instead_of_block.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/map_instead_of_block.cr#L3" target="_blank">
ameba/rule/performance/map_instead_of_block.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/size_after_filter.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/size_after_filter.cr#L3" target="_blank">
ameba/rule/performance/size_after_filter.cr
</a>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -742,11 +742,11 @@
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">2</span> }
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&lt;</span> <span class="n">2</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
@ -787,7 +787,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_after_filter.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_after_filter.cr#L29" target="_blank">
ameba/rule/performance/any_after_filter.cr
</a>
@ -1116,11 +1116,11 @@
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">2</span> }
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&lt;</span> <span class="n">2</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
</div>
<br/>
@ -1147,17 +1147,17 @@
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">2</span> }
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&lt;</span> <span class="n">2</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_after_filter.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_after_filter.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1327,7 +1327,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_after_filter.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_after_filter.cr#L38" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -745,8 +745,8 @@ one value present.</p>
<p>And it should be written as this:</p>
<pre><code class="language-crystal"><span class="o">!</span>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].empty?</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyInsteadOfEmpty:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyInsteadOfEmpty</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -789,7 +789,7 @@ one value present.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_instead_of_empty.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_instead_of_empty.cr#L30" target="_blank">
ameba/rule/performance/any_instead_of_empty.cr
</a>
@ -1190,8 +1190,8 @@ one value present.</p>
<p>And it should be written as this:</p>
<pre><code class="language-crystal"><span class="o">!</span>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].empty?</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyInsteadOfEmpty:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyInsteadOfEmpty</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
@ -1221,14 +1221,14 @@ one value present.</p>
<p>And it should be written as this:</p>
<pre><code class="language-crystal"><span class="o">!</span>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].empty?</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/AnyInsteadOfEmpty:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">AnyInsteadOfEmpty</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_instead_of_empty.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_instead_of_empty.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1370,7 +1370,7 @@ one value present.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/any_instead_of_empty.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/any_instead_of_empty.cr#L40" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -803,7 +803,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/base.cr#L5" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/base.cr#L5" target="_blank">
ameba/rule/performance/base.cr
</a>
@ -1022,7 +1022,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/base.cr#L5" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/base.cr#L5" target="_blank">View source</a>]
</div>
</div>
@ -1057,14 +1057,14 @@
<p>A convenient addition to <code>#test</code> method that does the same
but returns a passed in <code>source</code> as an addition.</p>
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">MyRule</span>.<span class="k">new</span>.catch(source)
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">MyRule</span>.new.catch(source)
source.valid?</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/base.cr#L6" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/base.cr#L6" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -749,14 +749,14 @@ chars <span class="o">=</span> names
.uniq!
.sort!</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
Enabled: true
CallNames:
- uniq
- sort
- sort_by
- shuffle
- reverse</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">ChainedCallWithNoBang</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">CallNames</span>:
<span class="o">-</span> uniq
<span class="o">-</span> sort
<span class="o">-</span> sort_by
<span class="o">-</span> shuffle
<span class="o">-</span> reverse</code></pre>
@ -799,7 +799,7 @@ chars <span class="o">=</span> names
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">
ameba/rule/performance/chained_call_with_no_bang.cr
</a>
@ -1223,14 +1223,14 @@ chars <span class="o">=</span> names
.uniq!
.sort!</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
Enabled: true
CallNames:
- uniq
- sort
- sort_by
- shuffle
- reverse</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">ChainedCallWithNoBang</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">CallNames</span>:
<span class="o">-</span> uniq
<span class="o">-</span> sort
<span class="o">-</span> sort_by
<span class="o">-</span> shuffle
<span class="o">-</span> reverse</code></pre>
</div>
<br/>
@ -1264,20 +1264,20 @@ chars <span class="o">=</span> names
.uniq!
.sort!</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
Enabled: true
CallNames:
- uniq
- sort
- sort_by
- shuffle
- reverse</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">ChainedCallWithNoBang</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">CallNames</span>:
<span class="o">-</span> uniq
<span class="o">-</span> sort
<span class="o">-</span> sort_by
<span class="o">-</span> shuffle
<span class="o">-</span> reverse</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">View source</a>]
</div>
</div>
@ -1447,7 +1447,7 @@ chars <span class="o">=</span> names
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/chained_call_with_no_bang.cr#L70" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/chained_call_with_no_bang.cr#L70" target="_blank">View source</a>]
</div>
</div>
@ -1463,7 +1463,7 @@ chars <span class="o">=</span> names
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/chained_call_with_no_bang.cr#L61" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/chained_call_with_no_bang.cr#L61" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,12 +736,12 @@
<p>This rule is used to identify usage of <code>compact</code> calls that follow <code>map</code>.</p>
<p>For example, this is considered inefficient:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>)).compact</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>)).compact</code></pre>
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/CompactAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">CompactAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -782,7 +782,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/compact_after_map.cr#L24" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/compact_after_map.cr#L24" target="_blank">
ameba/rule/performance/compact_after_map.cr
</a>
@ -1105,12 +1105,12 @@
<p>This rule is used to identify usage of <code>compact</code> calls that follow <code>map</code>.</p>
<p>For example, this is considered inefficient:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>)).compact</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>)).compact</code></pre>
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/CompactAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">CompactAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
@ -1131,18 +1131,18 @@
<p>This rule is used to identify usage of <code>compact</code> calls that follow <code>map</code>.</p>
<p>For example, this is considered inefficient:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>)).compact</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>)).compact</code></pre>
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))</code></pre>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.compact_map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/CompactAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">CompactAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/compact_after_map.cr#L24" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/compact_after_map.cr#L24" target="_blank">View source</a>]
</div>
</div>
@ -1284,7 +1284,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/compact_after_map.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/compact_after_map.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1300,7 +1300,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/compact_after_map.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/compact_after_map.cr#L33" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -742,10 +742,10 @@
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].reverse_each.find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FirstLastAfterFilter
Enabled: true
FilterNames:
- select</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FirstLastAfterFilter</span>
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span></code></pre>
@ -786,7 +786,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/first_last_after_filter.cr#L28" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/first_last_after_filter.cr#L28" target="_blank">
ameba/rule/performance/first_last_after_filter.cr
</a>
@ -1125,10 +1125,10 @@
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].reverse_each.find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FirstLastAfterFilter
Enabled: true
FilterNames:
- select</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FirstLastAfterFilter</span>
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span></code></pre>
</div>
<br/>
@ -1155,16 +1155,16 @@
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].reverse_each.find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">&gt;</span> <span class="n">0</span> }</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FirstLastAfterFilter
Enabled: true
FilterNames:
- select</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FirstLastAfterFilter</span>
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/first_last_after_filter.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/first_last_after_filter.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1334,7 +1334,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/first_last_after_filter.cr#L47" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/first_last_after_filter.cr#L47" target="_blank">View source</a>]
</div>
</div>
@ -1350,7 +1350,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/first_last_after_filter.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/first_last_after_filter.cr#L38" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -740,8 +740,8 @@
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.flat_map(<span class="o">&amp;</span>.chars)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FlattenAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FlattenAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -782,7 +782,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/flatten_after_map.cr#L24" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/flatten_after_map.cr#L24" target="_blank">
ameba/rule/performance/flatten_after_map.cr
</a>
@ -1109,8 +1109,8 @@
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.flat_map(<span class="o">&amp;</span>.chars)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FlattenAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FlattenAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
@ -1135,14 +1135,14 @@
<p>And can be written as this:</p>
<pre><code class="language-crystal"><span class="s">%w[Alice Bob]</span>.flat_map(<span class="o">&amp;</span>.chars)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/FlattenAfterMap:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">FlattenAfterMap</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/flatten_after_map.cr#L24" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/flatten_after_map.cr#L24" target="_blank">View source</a>]
</div>
</div>
@ -1284,7 +1284,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/flatten_after_map.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/flatten_after_map.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1300,7 +1300,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/flatten_after_map.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/flatten_after_map.cr#L33" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -741,8 +741,8 @@ that follow <code>map</code>.</p>
<p>And can be written as this:</p>
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).sum(<span class="o">&amp;</span>.<span class="o">*</span>(<span class="n">2</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/MapInsteadOfBlock:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">MapInsteadOfBlock</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -783,7 +783,7 @@ that follow <code>map</code>.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/map_instead_of_block.cr#L25" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/map_instead_of_block.cr#L25" target="_blank">
ameba/rule/performance/map_instead_of_block.cr
</a>
@ -1111,8 +1111,8 @@ that follow <code>map</code>.</p>
<p>And can be written as this:</p>
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).sum(<span class="o">&amp;</span>.<span class="o">*</span>(<span class="n">2</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/MapInsteadOfBlock:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">MapInsteadOfBlock</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
@ -1138,14 +1138,14 @@ that follow <code>map</code>.</p>
<p>And can be written as this:</p>
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).sum(<span class="o">&amp;</span>.<span class="o">*</span>(<span class="n">2</span>))</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/MapInsteadOfBlock:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">MapInsteadOfBlock</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/map_instead_of_block.cr#L25" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/map_instead_of_block.cr#L25" target="_blank">View source</a>]
</div>
</div>
@ -1287,7 +1287,7 @@ that follow <code>map</code>.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/map_instead_of_block.cr#L43" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/map_instead_of_block.cr#L43" target="_blank">View source</a>]
</div>
</div>
@ -1303,7 +1303,7 @@ that follow <code>map</code>.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/map_instead_of_block.cr#L34" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/map_instead_of_block.cr#L34" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -748,11 +748,11 @@
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.zero?)
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.<span class="o">!=</span> <span class="n">0</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/SizeAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">SizeAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
@ -793,7 +793,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/size_after_filter.cr#L35" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/size_after_filter.cr#L35" target="_blank">
ameba/rule/performance/size_after_filter.cr
</a>
@ -1133,11 +1133,11 @@
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.zero?)
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.<span class="o">!=</span> <span class="n">0</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/SizeAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">SizeAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
</div>
<br/>
@ -1170,17 +1170,17 @@
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.zero?)
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&amp;</span>.<span class="o">!=</span> <span class="n">0</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Performance/SizeAfterFilter:
Enabled: true
FilterNames:
- select
- reject</code></pre>
<pre><code class="language-crystal"><span class="t">Performance</span><span class="o">/</span><span class="t">SizeAfterFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/size_after_filter.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/size_after_filter.cr#L35" target="_blank">View source</a>]
</div>
</div>
@ -1350,7 +1350,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/size_after_filter.cr#L53" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/size_after_filter.cr#L53" target="_blank">View source</a>]
</div>
</div>
@ -1366,7 +1366,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/performance/size_after_filter.cr#L44" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/performance/size_after_filter.cr#L44" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,112 +746,112 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L1" target="_blank">
ameba/rule/style/constant_names.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L1" target="_blank">
ameba/rule/style/guard_clause.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L1" target="_blank">
ameba/rule/style/is_a_filter.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L1" target="_blank">
ameba/rule/style/is_a_nil.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L1" target="_blank">
ameba/rule/style/large_numbers.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L1" target="_blank">
ameba/rule/style/method_names.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L1" target="_blank">
ameba/rule/style/negated_conditions_in_unless.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/predicate_name.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L1" target="_blank">
ameba/rule/style/predicate_name.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L1" target="_blank">
ameba/rule/style/redundant_begin.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L1" target="_blank">
ameba/rule/style/redundant_next.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L1" target="_blank">
ameba/rule/style/redundant_return.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L1" target="_blank">
ameba/rule/style/type_names.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L1" target="_blank">
ameba/rule/style/unless_else.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L1" target="_blank">
ameba/rule/style/variable_names.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L1" target="_blank">
ameba/rule/style/verbose_block.cr
</a>
<br/>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L1" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L1" target="_blank">
ameba/rule/style/while_true.cr
</a>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -742,8 +742,8 @@
<pre><code class="language-crystal">myBadConstant <span class="o">=</span> <span class="n">1</span>
<span class="t">Wrong_NAME</span> <span class="o">=</span> <span class="n">2</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/ConstantNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">ConstantNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -784,7 +784,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L24" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L24" target="_blank">
ameba/rule/style/constant_names.cr
</a>
@ -1062,14 +1062,14 @@
<pre><code class="language-crystal">myBadConstant <span class="o">=</span> <span class="n">1</span>
<span class="t">Wrong_NAME</span> <span class="o">=</span> <span class="n">2</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/ConstantNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">ConstantNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L24" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L24" target="_blank">View source</a>]
</div>
</div>
@ -1211,7 +1211,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L31" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L31" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -768,17 +768,17 @@ ok
<span class="c"># bad</span>
<span class="k">if</span> something
foo || raise(<span class="s">&quot;exception&quot;</span>)
foo <span class="o">||</span> raise(<span class="s">&quot;exception&quot;</span>)
<span class="k">else</span>
ok
<span class="k">end</span>
<span class="c"># good</span>
foo || raise(<span class="s">&quot;exception&quot;</span>) <span class="k">if</span> something
foo <span class="o">||</span> raise(<span class="s">&quot;exception&quot;</span>) <span class="k">if</span> something
ok</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/GuardClause:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">GuardClause</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -821,7 +821,7 @@ ok</code></pre>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">
ameba/rule/style/guard_clause.cr
</a>
@ -1219,23 +1219,23 @@ ok
<span class="c"># bad</span>
<span class="k">if</span> something
foo || raise(<span class="s">&quot;exception&quot;</span>)
foo <span class="o">||</span> raise(<span class="s">&quot;exception&quot;</span>)
<span class="k">else</span>
ok
<span class="k">end</span>
<span class="c"># good</span>
foo || raise(<span class="s">&quot;exception&quot;</span>) <span class="k">if</span> something
foo <span class="o">||</span> raise(<span class="s">&quot;exception&quot;</span>) <span class="k">if</span> something
ok</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/GuardClause:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">GuardClause</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">View source</a>]
</div>
</div>
@ -1349,7 +1349,7 @@ ok</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L175" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L175" target="_blank">View source</a>]
</div>
</div>
@ -1393,7 +1393,7 @@ ok</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L69" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L69" target="_blank">View source</a>]
</div>
</div>
@ -1409,7 +1409,7 @@ ok</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L83" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L83" target="_blank">View source</a>]
</div>
</div>
@ -1425,7 +1425,7 @@ ok</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L65" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L65" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -736,7 +736,7 @@
<p>This rule is used to identify usage of <code>is_a?/nil?</code> calls within filters.</p>
<p>For example, this is considered invalid:</p>
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
matches.any?(<span class="o">&amp;</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># =&gt; true</span>
matches.one?(<span class="o">&amp;</span>.<span class="k">nil?</span>) <span class="c"># =&gt; true</span>
@ -744,7 +744,7 @@ matches.one?(<span class="o">&amp;</span>.<span class="k">nil?</span>)
<span class="k">typeof</span>(matches.reject(<span class="o">&amp;</span>.<span class="k">nil?</span>)) <span class="c"># =&gt; Array(Regex::MatchData | Nil)</span>
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="o">&amp;</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>))) <span class="c"># =&gt; Array(Regex::MatchData | Nil)</span></code></pre>
<p>And it should be written as this:</p>
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
matches.any?(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>) <span class="c"># =&gt; true</span>
matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; true</span>
@ -752,15 +752,15 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
<span class="k">typeof</span>(matches.reject(<span class="t">Nil</span>)) <span class="c"># =&gt; Array(Regex::MatchData)</span>
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># =&gt; Array(Regex::MatchData)</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/IsAFilter:
Enabled: true
FilterNames:
- select
- reject
- any?
- all?
- none?
- one?</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsAFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject
<span class="o">-</span> any?
<span class="o">-</span> all?
<span class="o">-</span> none?
<span class="o">-</span> one?</code></pre>
@ -801,7 +801,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">
ameba/rule/style/is_a_filter.cr
</a>
@ -1098,7 +1098,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
<p>This rule is used to identify usage of <code>is_a?/nil?</code> calls within filters.</p>
<p>For example, this is considered invalid:</p>
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
matches.any?(<span class="o">&amp;</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># =&gt; true</span>
matches.one?(<span class="o">&amp;</span>.<span class="k">nil?</span>) <span class="c"># =&gt; true</span>
@ -1106,7 +1106,7 @@ matches.one?(<span class="o">&amp;</span>.<span class="k">nil?</span>)
<span class="k">typeof</span>(matches.reject(<span class="o">&amp;</span>.<span class="k">nil?</span>)) <span class="c"># =&gt; Array(Regex::MatchData | Nil)</span>
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="o">&amp;</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>))) <span class="c"># =&gt; Array(Regex::MatchData | Nil)</span></code></pre>
<p>And it should be written as this:</p>
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="s">/^A./</span>))
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&amp;</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
matches.any?(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>) <span class="c"># =&gt; true</span>
matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; true</span>
@ -1114,21 +1114,21 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
<span class="k">typeof</span>(matches.reject(<span class="t">Nil</span>)) <span class="c"># =&gt; Array(Regex::MatchData)</span>
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># =&gt; Array(Regex::MatchData)</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/IsAFilter:
Enabled: true
FilterNames:
- select
- reject
- any?
- all?
- none?
- one?</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsAFilter</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">FilterNames</span>:
<span class="o">-</span> <span class="k">select</span>
<span class="o">-</span> reject
<span class="o">-</span> any?
<span class="o">-</span> all?
<span class="o">-</span> none?
<span class="o">-</span> one?</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">View source</a>]
</div>
</div>
@ -1298,7 +1298,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L60" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L60" target="_blank">View source</a>]
</div>
</div>
@ -1314,7 +1314,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># =&gt; tr
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L51" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L51" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -740,8 +740,8 @@
<p>And needs to be written as:</p>
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/IsANil:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsANil</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -782,7 +782,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">
ameba/rule/style/is_a_nil.cr
</a>
@ -1063,14 +1063,14 @@
<p>And needs to be written as:</p>
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/IsANil:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsANil</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">View source</a>]
</div>
</div>
@ -1212,7 +1212,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L30" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,9 +746,9 @@ large numbers more easily.</p>
<span class="n">141_592_654</span>
<span class="n">5.123_456</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/LargeNumbers:
Enabled: true
IntMinDigits: 6 # i.e. integers higher than 99999</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">LargeNumbers</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">IntMinDigits</span>: <span class="n">6</span> <span class="c"># i.e. integers higher than 99999</span></code></pre>
@ -789,7 +789,7 @@ large numbers more easily.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">
ameba/rule/style/large_numbers.cr
</a>
@ -1081,15 +1081,15 @@ large numbers more easily.</p>
<span class="n">141_592_654</span>
<span class="n">5.123_456</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/LargeNumbers:
Enabled: true
IntMinDigits: 6 # i.e. integers higher than 99999</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">LargeNumbers</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">IntMinDigits</span>: <span class="n">6</span> <span class="c"># i.e. integers higher than 99999</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1259,7 +1259,7 @@ large numbers more easily.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L38" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -758,8 +758,8 @@
<span class="k">end</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/MethodNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">MethodNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -802,7 +802,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L40" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L40" target="_blank">
ameba/rule/style/method_names.cr
</a>
@ -1175,14 +1175,14 @@
<span class="k">end</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/MethodNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">MethodNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L40" target="_blank">View source</a>]
</div>
</div>
@ -1324,7 +1324,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L49" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,8 +746,8 @@
<p>It is pretty difficult to wrap your head around a block of code
that is executed if a negated condition is NOT met.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">NegatedConditionsInUnless</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -788,7 +788,7 @@ that is executed if a negated condition is NOT met.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">
ameba/rule/style/negated_conditions_in_unless.cr
</a>
@ -1070,14 +1070,14 @@ that is executed if a negated condition is NOT met.</p>
<p>It is pretty difficult to wrap your head around a block of code
that is executed if a negated condition is NOT met.</p>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">NegatedConditionsInUnless</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1219,7 +1219,7 @@ that is executed if a negated condition is NOT met.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L36" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -749,8 +749,8 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
<span class="k">def</span> <span class="m">has_picture?</span>(x)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/PredicateName:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">PredicateName</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -791,7 +791,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">
ameba/rule/style/predicate_name.cr
</a>
@ -1076,14 +1076,14 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
<span class="k">def</span> <span class="m">has_picture?</span>(x)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/PredicateName:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">PredicateName</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">View source</a>]
</div>
</div>
@ -1225,7 +1225,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/predicate_name.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L39" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -769,8 +769,8 @@
b <span class="o">=</span> <span class="n">2</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/RedundantBegin:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantBegin</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -813,7 +813,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">
ameba/rule/style/redundant_begin.cr
</a>
@ -1197,14 +1197,14 @@
b <span class="o">=</span> <span class="n">2</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/RedundantBegin:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantBegin</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">View source</a>]
</div>
</div>
@ -1346,7 +1346,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -802,10 +802,10 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
<use href="#octicon-link"/>
</svg>
</a>YAML config example</h3>
<pre><code class="language-crystal">Style/RedundantNext:
Enabled: true
AllowMultiNext: true
AllowEmptyNext: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantNext</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">AllowMultiNext</span>: <span class="n">true</span>
<span class="t">AllowEmptyNext</span>: <span class="n">true</span></code></pre>
@ -848,7 +848,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
ameba/rule/style/redundant_next.cr
</a>
@ -1290,16 +1290,16 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
<use href="#octicon-link"/>
</svg>
</a>YAML config example</h3>
<pre><code class="language-crystal">Style/RedundantNext:
Enabled: true
AllowMultiNext: true
AllowEmptyNext: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantNext</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">AllowMultiNext</span>: <span class="n">true</span>
<span class="t">AllowEmptyNext</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
</div>
</div>
@ -1497,7 +1497,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L115" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L115" target="_blank">View source</a>]
</div>
</div>
@ -1513,7 +1513,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L111" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L111" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -799,10 +799,10 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
<use href="#octicon-link"/>
</svg>
</a>YAML config example</h3>
<pre><code class="language-crystal">Style/RedundantReturn:
Enabled: true
AllowMutliReturn: true
AllowEmptyReturn: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantReturn</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">AllowMutliReturn</span>: <span class="n">true</span>
<span class="t">AllowEmptyReturn</span>: <span class="n">true</span></code></pre>
@ -845,7 +845,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
ameba/rule/style/redundant_return.cr
</a>
@ -1284,16 +1284,16 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
<use href="#octicon-link"/>
</svg>
</a>YAML config example</h3>
<pre><code class="language-crystal">Style/RedundantReturn:
Enabled: true
AllowMutliReturn: true
AllowEmptyReturn: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantReturn</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">AllowMutliReturn</span>: <span class="n">true</span>
<span class="t">AllowEmptyReturn</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
</div>
</div>
@ -1491,7 +1491,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L112" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L112" target="_blank">View source</a>]
</div>
</div>
@ -1507,7 +1507,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L108" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L108" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -772,8 +772,8 @@
<span class="k">enum</span> <span class="t">Time_enum</span><span class="t">::</span><span class="t">Day_of_week</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/TypeNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">TypeNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -814,7 +814,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L54" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L54" target="_blank">
ameba/rule/style/type_names.cr
</a>
@ -1142,14 +1142,14 @@
<span class="k">enum</span> <span class="t">Time_enum</span><span class="t">::</span><span class="t">Day_of_week</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/TypeNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">TypeNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L54" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L54" target="_blank">View source</a>]
</div>
</div>
@ -1291,7 +1291,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L69" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L69" target="_blank">View source</a>]
</div>
</div>
@ -1307,7 +1307,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L73" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L73" target="_blank">View source</a>]
</div>
</div>
@ -1323,7 +1323,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L77" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L77" target="_blank">View source</a>]
</div>
</div>
@ -1339,7 +1339,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L81" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L81" target="_blank">View source</a>]
</div>
</div>
@ -1355,7 +1355,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L85" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L85" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -759,8 +759,8 @@ an <code>if</code>, so the previous invalid example would become this:</p>
<span class="n">:one</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/UnlessElse:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">UnlessElse</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -801,7 +801,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L45" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L45" target="_blank">
ameba/rule/style/unless_else.cr
</a>
@ -1096,14 +1096,14 @@ an <code>if</code>, so the previous invalid example would become this:</p>
<span class="n">:one</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/UnlessElse:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">UnlessElse</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L45" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L45" target="_blank">View source</a>]
</div>
</div>
@ -1245,7 +1245,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L52" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L52" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -743,8 +743,8 @@ _another_good_name <span class="o">=</span> <span class="n">3</span></code></pre
<pre><code class="language-crystal">myBadNamedVar <span class="o">=</span> <span class="n">1</span>
wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/VariableNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VariableNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -785,7 +785,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L25" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L25" target="_blank">
ameba/rule/style/variable_names.cr
</a>
@ -1081,14 +1081,14 @@ _another_good_name <span class="o">=</span> <span class="n">3</span></code></pre
<pre><code class="language-crystal">myBadNamedVar <span class="o">=</span> <span class="n">1</span>
wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/VariableNames:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VariableNames</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L25" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L25" target="_blank">View source</a>]
</div>
</div>
@ -1230,7 +1230,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1246,7 +1246,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L46" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L46" target="_blank">View source</a>]
</div>
</div>
@ -1262,7 +1262,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L50" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L50" target="_blank">View source</a>]
</div>
</div>
@ -1290,7 +1290,7 @@ Must be overriten for other type of rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L38" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -741,15 +741,15 @@ argument as a receiver, that can be collapsed into a short form.</p>
<p>And it should be written as this:</p>
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).any?(<span class="o">&amp;</span>.odd?)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/VerboseBlock:
Enabled: true
ExcludeMultipleLineBlocks: true
ExcludeCallsWithBlocks: true
ExcludePrefixOperators: true
ExcludeOperators: true
ExcludeSetters: false
MaxLineLength: ~
MaxLength: 50 # use ~ to disable</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VerboseBlock</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">ExcludeMultipleLineBlocks</span>: <span class="n">true</span>
<span class="t">ExcludeCallsWithBlocks</span>: <span class="n">true</span>
<span class="t">ExcludePrefixOperators</span>: <span class="n">true</span>
<span class="t">ExcludeOperators</span>: <span class="n">true</span>
<span class="t">ExcludeSetters</span>: <span class="n">false</span>
<span class="t">MaxLineLength</span>: <span class="o">~</span>
<span class="t">MaxLength</span>: <span class="n">50</span> <span class="c"># use ~ to disable</span></code></pre>
@ -792,7 +792,7 @@ argument as a receiver, that can be collapsed into a short form.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">
ameba/rule/style/verbose_block.cr
</a>
@ -1223,21 +1223,21 @@ argument as a receiver, that can be collapsed into a short form.</p>
<p>And it should be written as this:</p>
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).any?(<span class="o">&amp;</span>.odd?)</code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/VerboseBlock:
Enabled: true
ExcludeMultipleLineBlocks: true
ExcludeCallsWithBlocks: true
ExcludePrefixOperators: true
ExcludeOperators: true
ExcludeSetters: false
MaxLineLength: ~
MaxLength: 50 # use ~ to disable</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VerboseBlock</span>:
<span class="t">Enabled</span>: <span class="n">true</span>
<span class="t">ExcludeMultipleLineBlocks</span>: <span class="n">true</span>
<span class="t">ExcludeCallsWithBlocks</span>: <span class="n">true</span>
<span class="t">ExcludePrefixOperators</span>: <span class="n">true</span>
<span class="t">ExcludeOperators</span>: <span class="n">true</span>
<span class="t">ExcludeSetters</span>: <span class="n">false</span>
<span class="t">MaxLineLength</span>: <span class="o">~</span>
<span class="t">MaxLength</span>: <span class="n">50</span> <span class="c"># use ~ to disable</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1575,7 +1575,7 @@ argument as a receiver, that can be collapsed into a short form.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L217" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L217" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 1.4.1">
<meta name="generator" content="Crystal Docs 1.5.0">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
@ -746,8 +746,8 @@
<span class="k">break</span> <span class="k">if</span> some_condition
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/WhileTrue:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">WhileTrue</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
@ -788,7 +788,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L28" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L28" target="_blank">
ameba/rule/style/while_true.cr
</a>
@ -1070,14 +1070,14 @@
<span class="k">break</span> <span class="k">if</span> some_condition
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code class="language-crystal">Style/WhileTrue:
Enabled: true</code></pre>
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">WhileTrue</span>:
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1219,7 +1219,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L35" target="_blank">View source</a>]
</div>
</div>