mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Deploying to gh-pages from @ 80532da357
🚀
This commit is contained in:
parent
5691d407a5
commit
017e9a8722
121 changed files with 1270 additions and 1270 deletions
|
@ -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">"=-"</span> => <span class="s">"-="</span>, <span class="s">"=+"</span> => <span class="s">"+="</span>, <span class="s">"=!"</span> => <span class="s">"!="</span>}</code>
|
||||
<strong>MISTAKES</strong> = <code>{<span class="s">"=-"</span> <span class="o">=></span> <span class="s">"-="</span>, <span class="s">"=+"</span> <span class="o">=></span> <span class="s">"+="</span>, <span class="s">"=!"</span> <span class="o">=></span> <span class="s">"!="</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">"./stuff"</span>
|
||||
<span class="k">require</span> <span class="s">"./thing"</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">"./stuff"</span>
|
||||
<span class="k">require</span> <span class="s">"./thing"</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"><</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"><</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>
|
||||
|
|
|
@ -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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> <span class="o">=></span> <span class="n">1</span>, <span class="s">"bar"</span> <span class="o">=></span> <span class="n">2</span>, <span class="s">"foo"</span> <span class="o">=></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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> <span class="o">=></span> <span class="n">1</span>, <span class="s">"bar"</span> <span class="o">=></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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> <span class="o">=></span> <span class="n">1</span>, <span class="s">"bar"</span> <span class="o">=></span> <span class="n">2</span>, <span class="s">"foo"</span> <span class="o">=></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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> <span class="o">=></span> <span class="n">1</span>, <span class="s">"bar"</span> <span class="o">=></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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<span class="s">"There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats"</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">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<span class="s">"There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats"</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</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">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"><</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"><</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"><</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"><</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>
|
||||
|
|
|
@ -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">"my context"</span> <span class="k">do</span>
|
|||
it <span class="s">"works"</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">"works"</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">"my context"</span> <span class="k">do</span>
|
|||
it <span class="s">"works"</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">"works"</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">"works"</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>
|
||||
|
|
|
@ -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> => e
|
||||
<span class="k">rescue</span> <span class="t">Exception</span> <span class="o">=></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> => e
|
||||
<span class="k">rescue</span> <span class="t">Exception</span> <span class="o">=></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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">></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">></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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"><<</span> <span class="s">" UTC"</span>
|
||||
<span class="k">when</span> local?
|
||||
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">" %:z"</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
|
||||
<span class="t">Format</span>.new(<span class="s">" %:z"</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"><<</span> <span class="s">" UTC"</span>
|
||||
<span class="k">when</span> local?
|
||||
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">" %:z"</span>).format(<span class="k">self</span>, io)
|
||||
<span class="t">Format</span>.new(<span class="s">" %:z"</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"><<</span> <span class="s">" UTC"</span>
|
||||
<span class="k">when</span> local?
|
||||
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">" %:z"</span>).format(<span class="k">self</span>, io) <span class="k">if</span> local?
|
||||
<span class="t">Format</span>.new(<span class="s">" %:z"</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"><<</span> <span class="s">" UTC"</span>
|
||||
<span class="k">when</span> local?
|
||||
<span class="t">Format</span>.<span class="k">new</span>(<span class="s">" %:z"</span>).format(<span class="k">self</span>, io)
|
||||
<span class="t">Format</span>.new(<span class="s">" %:z"</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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue