Deploying to gh-pages from @ 51b0a07e81 🚀

This commit is contained in:
veelenga 2021-01-31 14:41:59 +00:00
parent 2f03204df2
commit 8d0a0f7c6a
93 changed files with 1813 additions and 1813 deletions

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::BadDirective - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,15 +579,15 @@
<p>For example, the user can mistakenly add a directive
to disable a rule that even doesn't exist:</p>
<pre><code><span class="c"># ameba:disable BadRuleName</span>
<pre><code class="language-crystal"><span class="c"># ameba:disable BadRuleName</span>
<span class="k">def</span> <span class="m">foo</span>
<span class="n">:bar</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/BadDirective:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/BadDirective:
Enabled: true</code></pre>
@ -628,7 +628,7 @@ to disable a rule that even doesn't exist:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/bad_directive.cr#L21" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/bad_directive.cr#L21" target="_blank">
ameba/rule/lint/bad_directive.cr
</a>
@ -932,21 +932,21 @@ to disable a rule that even doesn't exist:</p>
<p>For example, the user can mistakenly add a directive
to disable a rule that even doesn't exist:</p>
<pre><code><span class="c"># ameba:disable BadRuleName</span>
<pre><code class="language-crystal"><span class="c"># ameba:disable BadRuleName</span>
<span class="k">def</span> <span class="m">foo</span>
<span class="n">:bar</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/BadDirective:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/BadDirective:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/bad_directive.cr#L21" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/bad_directive.cr#L21" target="_blank">View source</a>]
</div>
</div>
@ -1088,7 +1088,7 @@ to disable a rule that even doesn't exist:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/bad_directive.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/bad_directive.cr#L30" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::ComparisonToBoolean - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,7 +578,7 @@
<p>For example, these are considered invalid:</p>
<pre><code>foo <span class="o">==</span> <span class="n">true</span>
<pre><code class="language-crystal">foo <span class="o">==</span> <span class="n">true</span>
bar <span class="o">!=</span> <span class="n">false</span>
<span class="n">false</span> <span class="o">===</span> baz</code></pre>
@ -588,8 +588,8 @@ or negating the variable.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ComparisonToBoolean:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ComparisonToBoolean:
Enabled: true</code></pre>
@ -630,7 +630,7 @@ or negating the variable.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/comparison_to_boolean.cr#L23" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/comparison_to_boolean.cr#L23" target="_blank">
ameba/rule/lint/comparison_to_boolean.cr
</a>
@ -923,7 +923,7 @@ or negating the variable.</p>
<p>For example, these are considered invalid:</p>
<pre><code>foo <span class="o">==</span> <span class="n">true</span>
<pre><code class="language-crystal">foo <span class="o">==</span> <span class="n">true</span>
bar <span class="o">!=</span> <span class="n">false</span>
<span class="n">false</span> <span class="o">===</span> baz</code></pre>
@ -933,14 +933,14 @@ or negating the variable.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ComparisonToBoolean:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ComparisonToBoolean:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/comparison_to_boolean.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/comparison_to_boolean.cr#L23" target="_blank">View source</a>]
</div>
</div>
@ -1082,7 +1082,7 @@ or negating the variable.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/comparison_to_boolean.cr#L31" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/comparison_to_boolean.cr#L31" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::DebuggerStatement - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -581,8 +581,8 @@ committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/DebuggerStatement:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/DebuggerStatement:
Enabled: true</code></pre>
@ -623,7 +623,7 @@ committed into our codebase.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/debugger_statement.cr#L14" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/debugger_statement.cr#L14" target="_blank">
ameba/rule/lint/debugger_statement.cr
</a>
@ -919,14 +919,14 @@ committed into our codebase.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/DebuggerStatement:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/DebuggerStatement:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/debugger_statement.cr#L14" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/debugger_statement.cr#L14" target="_blank">View source</a>]
</div>
</div>
@ -1068,7 +1068,7 @@ committed into our codebase.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/debugger_statement.cr#L21" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/debugger_statement.cr#L21" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::EmptyEnsure - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,7 +578,7 @@
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
do_some_stuff
<span class="k">ensure</span>
<span class="k">end</span>
@ -590,7 +590,7 @@
<p>And it should be written as this:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
do_some_stuff
<span class="k">ensure</span>
do_something_else
@ -604,8 +604,8 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyEnsure
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyEnsure
Enabled: true</code></pre>
@ -646,7 +646,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_ensure.cr#L42" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_ensure.cr#L42" target="_blank">
ameba/rule/lint/empty_ensure.cr
</a>
@ -939,7 +939,7 @@
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
do_some_stuff
<span class="k">ensure</span>
<span class="k">end</span>
@ -951,7 +951,7 @@
<p>And it should be written as this:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
do_some_stuff
<span class="k">ensure</span>
do_something_else
@ -965,14 +965,14 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyEnsure
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyEnsure
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_ensure.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_ensure.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1114,7 +1114,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_ensure.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_ensure.cr#L49" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::EmptyExpression - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,7 +578,7 @@
<p>This is considered invalid:</p>
<pre><code>foo <span class="o">=</span> ()
<pre><code class="language-crystal">foo <span class="o">=</span> ()
<span class="k">if</span> ()
bar
@ -586,7 +586,7 @@
<p>And this is valid:</p>
<pre><code>foo <span class="o">=</span> (some_expression)
<pre><code class="language-crystal">foo <span class="o">=</span> (some_expression)
<span class="k">if</span> (some_expression)
bar
@ -594,8 +594,8 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyExpression:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyExpression:
Enabled: true</code></pre>
@ -638,7 +638,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_expression.cr#L31" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_expression.cr#L31" target="_blank">
ameba/rule/lint/empty_expression.cr
</a>
@ -995,7 +995,7 @@
<p>This is considered invalid:</p>
<pre><code>foo <span class="o">=</span> ()
<pre><code class="language-crystal">foo <span class="o">=</span> ()
<span class="k">if</span> ()
bar
@ -1003,7 +1003,7 @@
<p>And this is valid:</p>
<pre><code>foo <span class="o">=</span> (some_expression)
<pre><code class="language-crystal">foo <span class="o">=</span> (some_expression)
<span class="k">if</span> (some_expression)
bar
@ -1011,14 +1011,14 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyExpression:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyExpression:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_expression.cr#L31" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_expression.cr#L31" target="_blank">View source</a>]
</div>
</div>
@ -1160,7 +1160,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_expression.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_expression.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1176,7 +1176,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_expression.cr#L50" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_expression.cr#L50" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::EmptyLoop - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,7 +578,7 @@
<p>This is considered invalid:</p>
<pre><code><span class="k">while</span> <span class="n">false</span>
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">false</span>
<span class="k">end</span>
<span class="k">until</span> <span class="n">10</span>
@ -590,7 +590,7 @@ loop <span class="k">do</span>
<p>And this is valid:</p>
<pre><code>a <span class="o">=</span> <span class="n">1</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
<span class="k">while</span> a <span class="o">&lt;</span> <span class="n">10</span>
a += <span class="n">1</span>
<span class="k">end</span>
@ -604,8 +604,8 @@ loop <span class="k">do</span>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyLoop:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyLoop:
Enabled: true</code></pre>
@ -648,7 +648,7 @@ loop <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">
ameba/rule/lint/empty_loop.cr
</a>
@ -1005,7 +1005,7 @@ loop <span class="k">do</span>
<p>This is considered invalid:</p>
<pre><code><span class="k">while</span> <span class="n">false</span>
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">false</span>
<span class="k">end</span>
<span class="k">until</span> <span class="n">10</span>
@ -1017,7 +1017,7 @@ loop <span class="k">do</span>
<p>And this is valid:</p>
<pre><code>a <span class="o">=</span> <span class="n">1</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
<span class="k">while</span> a <span class="o">&lt;</span> <span class="n">10</span>
a += <span class="n">1</span>
<span class="k">end</span>
@ -1031,14 +1031,14 @@ loop <span class="k">do</span>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/EmptyLoop:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/EmptyLoop:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L40" target="_blank">View source</a>]
</div>
</div>
@ -1180,7 +1180,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L49" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L49" target="_blank">View source</a>]
</div>
</div>
@ -1196,7 +1196,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L55" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L55" target="_blank">View source</a>]
</div>
</div>
@ -1212,7 +1212,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L59" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L59" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::HashDuplicatedKey - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,16 +578,16 @@
<p>This is considered invalid:</p>
<pre><code>h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> => <span class="n">3</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> => <span class="n">3</span>}</code></pre>
<p>And it has to written as this instead:</p>
<pre><code>h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>}</code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/HashDuplicatedKey:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/HashDuplicatedKey:
Enabled: true</code></pre>
@ -628,7 +628,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/hash_duplicated_key.cr#L23" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/hash_duplicated_key.cr#L23" target="_blank">
ameba/rule/lint/hash_duplicated_key.cr
</a>
@ -921,22 +921,22 @@
<p>This is considered invalid:</p>
<pre><code>h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> => <span class="n">3</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>, <span class="s">&quot;foo&quot;</span> => <span class="n">3</span>}</code></pre>
<p>And it has to written as this instead:</p>
<pre><code>h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>}</code></pre>
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">&quot;foo&quot;</span> => <span class="n">1</span>, <span class="s">&quot;bar&quot;</span> => <span class="n">2</span>}</code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/HashDuplicatedKey:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/HashDuplicatedKey:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/hash_duplicated_key.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/hash_duplicated_key.cr#L23" target="_blank">View source</a>]
</div>
</div>
@ -1078,7 +1078,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/hash_duplicated_key.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/hash_duplicated_key.cr#L30" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::LiteralInCondition - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -583,14 +583,14 @@ replaced with either the body of the construct, or deleted entirely.</p>
<p>This is considered invalid:</p>
<pre><code><span class="k">if</span> <span class="s">&quot;something&quot;</span>
<pre><code class="language-crystal"><span class="k">if</span> <span class="s">&quot;something&quot;</span>
<span class="n">:ok</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/LiteralInCondition:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/LiteralInCondition:
Enabled: true</code></pre>
@ -633,7 +633,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L23" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L23" target="_blank">
ameba/rule/lint/literal_in_condition.cr
</a>
@ -1000,20 +1000,20 @@ replaced with either the body of the construct, or deleted entirely.</p>
<p>This is considered invalid:</p>
<pre><code><span class="k">if</span> <span class="s">&quot;something&quot;</span>
<pre><code class="language-crystal"><span class="k">if</span> <span class="s">&quot;something&quot;</span>
<span class="n">:ok</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/LiteralInCondition:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/LiteralInCondition:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L23" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L23" target="_blank">View source</a>]
</div>
</div>
@ -1043,7 +1043,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L33" target="_blank">View source</a>]
</div>
</div>
@ -1171,7 +1171,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L38" target="_blank">View source</a>]
</div>
</div>
@ -1187,7 +1187,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L42" target="_blank">View source</a>]
</div>
</div>
@ -1203,7 +1203,7 @@ replaced with either the body of the construct, or deleted entirely.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L46" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L46" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::LiteralInInterpolation - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,13 +579,13 @@ that contain a literal value instead of a variable or function.</p>
<p>For example:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<span class="s">&quot;There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/LiteralInInterpolation
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/LiteralInInterpolation
Enabled: true</code></pre>
@ -628,7 +628,7 @@ that contain a literal value instead of a variable or function.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_interpolation.cr#L19" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_interpolation.cr#L19" target="_blank">
ameba/rule/lint/literal_in_interpolation.cr
</a>
@ -976,19 +976,19 @@ that contain a literal value instead of a variable or function.</p>
<p>For example:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">&quot;</span>
<span class="s">&quot;There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/LiteralInInterpolation
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/LiteralInInterpolation
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_interpolation.cr#L19" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_interpolation.cr#L19" target="_blank">View source</a>]
</div>
</div>
@ -1130,7 +1130,7 @@ that contain a literal value instead of a variable or function.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_interpolation.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_interpolation.cr#L28" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::PercentArrays - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,20 +578,20 @@
<p>For example, this is usually written by mistake:</p>
<pre><code><span class="s">%i(:one, :two)</span>
<pre><code class="language-crystal"><span class="s">%i(:one, :two)</span>
<span class="s">%w(&quot;one&quot;, &quot;two&quot;)</span></code></pre>
<p>And the expected example is:</p>
<pre><code><span class="s">%i(one two)</span>
<pre><code class="language-crystal"><span class="s">%i(one two)</span>
<span class="s">%w(one two)</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/PercentArrays:
<pre><code class="language-crystal">Lint/PercentArrays:
Enabled: true
StringArrayUnwantedSymbols: &#39;,&quot;&#39;
SymbolArrayUnwantedSymbols: &#39;,:&#39;</span></code></pre>
StringArrayUnwantedSymbols: ',"'
SymbolArrayUnwantedSymbols: ',:'</code></pre>
@ -632,7 +632,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/percent_array.cr#L27" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/percent_array.cr#L27" target="_blank">
ameba/rule/lint/percent_array.cr
</a>
@ -945,26 +945,26 @@
<p>For example, this is usually written by mistake:</p>
<pre><code><span class="s">%i(:one, :two)</span>
<pre><code class="language-crystal"><span class="s">%i(:one, :two)</span>
<span class="s">%w(&quot;one&quot;, &quot;two&quot;)</span></code></pre>
<p>And the expected example is:</p>
<pre><code><span class="s">%i(one two)</span>
<pre><code class="language-crystal"><span class="s">%i(one two)</span>
<span class="s">%w(one two)</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/PercentArrays:
<pre><code class="language-crystal">Lint/PercentArrays:
Enabled: true
StringArrayUnwantedSymbols: &#39;,&quot;&#39;
SymbolArrayUnwantedSymbols: &#39;,:&#39;</span></code></pre>
StringArrayUnwantedSymbols: ',"'
SymbolArrayUnwantedSymbols: ',:'</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/percent_array.cr#L27" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/percent_array.cr#L27" target="_blank">View source</a>]
</div>
</div>
@ -1162,7 +1162,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/percent_array.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/percent_array.cr#L36" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::RandZero - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,18 +579,18 @@ Such calls always return <code>0</code>.</p>
<p>For example:</p>
<pre><code>rand(<span class="n">1</span>)</code></pre>
<pre><code class="language-crystal">rand(<span class="n">1</span>)</code></pre>
<p>Should be written as:</p>
<pre><code>rand
<pre><code class="language-crystal">rand
<span class="c"># or</span>
rand(<span class="n">2</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RandZero:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RandZero:
Enabled: true</code></pre>
@ -631,7 +631,7 @@ rand(<span class="n">2</span>)</code></pre>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/rand_zero.cr#L26" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/rand_zero.cr#L26" target="_blank">
ameba/rule/lint/rand_zero.cr
</a>
@ -925,24 +925,24 @@ Such calls always return <code>0</code>.</p>
<p>For example:</p>
<pre><code>rand(<span class="n">1</span>)</code></pre>
<pre><code class="language-crystal">rand(<span class="n">1</span>)</code></pre>
<p>Should be written as:</p>
<pre><code>rand
<pre><code class="language-crystal">rand
<span class="c"># or</span>
rand(<span class="n">2</span>)</code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RandZero:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RandZero:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/rand_zero.cr#L26" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/rand_zero.cr#L26" target="_blank">View source</a>]
</div>
</div>
@ -1084,7 +1084,7 @@ rand(<span class="n">2</span>)</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/rand_zero.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/rand_zero.cr#L33" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::RedundantStringCoercion - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,16 +579,16 @@ which is redundant.</p>
<p>For example, this is considered invalid:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">&quot;</span></code></pre>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>And this is valid:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantStringCoersion
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantStringCoersion
Enabled: true</code></pre>
@ -631,7 +631,7 @@ which is redundant.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_string_coercion.cr#L24" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_string_coercion.cr#L24" target="_blank">
ameba/rule/lint/redundant_string_coercion.cr
</a>
@ -979,22 +979,22 @@ which is redundant.</p>
<p>For example, this is considered invalid:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">&quot;</span></code></pre>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>And this is valid:</p>
<pre><code><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<pre><code class="language-crystal"><span class="s">&quot;Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">&quot;</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantStringCoersion
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantStringCoersion
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_string_coercion.cr#L24" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_string_coercion.cr#L24" target="_blank">View source</a>]
</div>
</div>
@ -1136,7 +1136,7 @@ which is redundant.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_string_coercion.cr#L33" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_string_coercion.cr#L33" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::RedundantWithIndex - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,24 +578,24 @@
<p>For example, this is considered invalid:</p>
<pre><code>collection.each.with_index <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each.with_index <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span>
collection.each_with_index <span class="k">do</span> <span class="o">|</span>e, UNDERSCORE<span class="o">|</span>
collection.each_with_index <span class="k">do</span> <span class="o">|</span>e, _<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>and it should be written as follows:</p>
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantWithIndex:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantWithIndex:
Enabled: true</code></pre>
@ -636,7 +636,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/d28f9f75/src/ameba/rule/lint/redundant_with_index.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_index.cr#L30" target="_blank">
ameba/rule/lint/redundant_with_index.cr
</a>
@ -910,30 +910,30 @@ collection.each_with_index <span class="k">do</span> <span class="o">|</span>e,
<p>For example, this is considered invalid:</p>
<pre><code>collection.each.with_index <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each.with_index <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span>
collection.each_with_index <span class="k">do</span> <span class="o">|</span>e, UNDERSCORE<span class="o">|</span>
collection.each_with_index <span class="k">do</span> <span class="o">|</span>e, _<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>and it should be written as follows:</p>
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantWithIndex:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantWithIndex:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_with_index.cr#L30" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_index.cr#L30" target="_blank">View source</a>]
</div>
</div>
@ -1075,7 +1075,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/d28f9f75/src/ameba/rule/lint/redundant_with_index.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_index.cr#L35" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::RedundantWithObject - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,24 +578,24 @@
<p>For example, this is considered invalid:</p>
<pre><code>collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span>
collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e, UNDERSCORE<span class="o">|</span>
collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e, _<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>and it should be written as follows:</p>
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantWithObject:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantWithObject:
Enabled: true</code></pre>
@ -636,7 +636,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/d28f9f75/src/ameba/rule/lint/redundant_with_object.cr#L31" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_object.cr#L31" target="_blank">
ameba/rule/lint/redundant_with_object.cr
</a>
@ -910,30 +910,30 @@ collection.each_with_object(<span class="n">0</span>) <span class="k">do</span>
<p>For example, this is considered invalid:</p>
<pre><code>collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span>
collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e, UNDERSCORE<span class="o">|</span>
collection.each_with_object(<span class="n">0</span>) <span class="k">do</span> <span class="o">|</span>e, _<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>and it should be written as follows:</p>
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>e<span class="o">|</span>
<span class="c"># ...</span>
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/RedundantWithObject:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/RedundantWithObject:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_with_object.cr#L31" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_object.cr#L31" target="_blank">View source</a>]
</div>
</div>
@ -1075,7 +1075,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/d28f9f75/src/ameba/rule/lint/redundant_with_object.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_object.cr#L36" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::ShadowedArgument - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,7 +578,7 @@
<p>For example, this is considered invalid:</p>
<pre><code>do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
<pre><code class="language-crystal">do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
foo <span class="o">=</span> <span class="n">1</span> <span class="c"># shadows block argument</span>
foo
<span class="k">end</span>
@ -590,7 +590,7 @@
<p>and it should be written as follows:</p>
<pre><code>do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
<pre><code class="language-crystal">do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
foo <span class="o">=</span> foo <span class="o">+</span> <span class="n">42</span>
foo
<span class="k">end</span>
@ -602,8 +602,8 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowedArgument:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowedArgument:
Enabled: true</code></pre>
@ -644,7 +644,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_argument.cr#L39" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_argument.cr#L39" target="_blank">
ameba/rule/lint/shadowed_argument.cr
</a>
@ -942,7 +942,7 @@
<p>For example, this is considered invalid:</p>
<pre><code>do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
<pre><code class="language-crystal">do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
foo <span class="o">=</span> <span class="n">1</span> <span class="c"># shadows block argument</span>
foo
<span class="k">end</span>
@ -954,7 +954,7 @@
<p>and it should be written as follows:</p>
<pre><code>do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
<pre><code class="language-crystal">do_something <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span>
foo <span class="o">=</span> foo <span class="o">+</span> <span class="n">42</span>
foo
<span class="k">end</span>
@ -966,14 +966,14 @@
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowedArgument:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowedArgument:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_argument.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_argument.cr#L39" target="_blank">View source</a>]
</div>
</div>
@ -1115,7 +1115,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_argument.cr#L50" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_argument.cr#L50" target="_blank">View source</a>]
</div>
</div>
@ -1131,7 +1131,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_argument.cr#L46" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_argument.cr#L46" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::ShadowedException - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -580,7 +580,7 @@ exception is rescued.</p>
<p>For example, this is invalid:</p>
<pre><code><span class="k">begin</span>
<pre><code class="language-crystal"><span class="k">begin</span>
do_something
<span class="k">rescue</span> <span class="t">Exception</span>
handle_exception
@ -590,7 +590,7 @@ exception is rescued.</p>
<p>And it has to be written as follows:</p>
<pre><code><span class="k">begin</span>
<pre><code class="language-crystal"><span class="k">begin</span>
do_something
<span class="k">rescue</span> <span class="t">ArgumentError</span>
handle_argument_error_exception
@ -600,8 +600,8 @@ exception is rescued.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowedException:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowedException:
Enabled: true</code></pre>
@ -642,7 +642,7 @@ exception is rescued.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_exception.cr#L37" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_exception.cr#L37" target="_blank">
ameba/rule/lint/shadowed_exception.cr
</a>
@ -937,7 +937,7 @@ exception is rescued.</p>
<p>For example, this is invalid:</p>
<pre><code><span class="k">begin</span>
<pre><code class="language-crystal"><span class="k">begin</span>
do_something
<span class="k">rescue</span> <span class="t">Exception</span>
handle_exception
@ -947,7 +947,7 @@ exception is rescued.</p>
<p>And it has to be written as follows:</p>
<pre><code><span class="k">begin</span>
<pre><code class="language-crystal"><span class="k">begin</span>
do_something
<span class="k">rescue</span> <span class="t">ArgumentError</span>
handle_argument_error_exception
@ -957,14 +957,14 @@ exception is rescued.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowedException:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowedException:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_exception.cr#L37" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_exception.cr#L37" target="_blank">View source</a>]
</div>
</div>
@ -1106,7 +1106,7 @@ exception is rescued.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_exception.cr#L44" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_exception.cr#L44" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::ShadowingOuterLocalVar - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,7 +579,7 @@ for block or proc arguments.</p>
<p>For example, this is considered incorrect:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
foo <span class="o">=</span> <span class="n">1</span>
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span> <span class="c"># shadowing outer `foo`</span>
@ -588,7 +588,7 @@ for block or proc arguments.</p>
<p>and should be written as:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
foo <span class="o">=</span> <span class="n">1</span>
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>bar<span class="o">|</span>
@ -597,8 +597,8 @@ for block or proc arguments.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowingOuterLocalVar:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowingOuterLocalVar:
Enabled: true</code></pre>
@ -639,7 +639,7 @@ for block or proc arguments.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L34" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L34" target="_blank">
ameba/rule/lint/shadowing_local_outer_var.cr
</a>
@ -943,7 +943,7 @@ for block or proc arguments.</p>
<p>For example, this is considered incorrect:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
foo <span class="o">=</span> <span class="n">1</span>
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>foo<span class="o">|</span> <span class="c"># shadowing outer `foo`</span>
@ -952,7 +952,7 @@ for block or proc arguments.</p>
<p>and should be written as:</p>
<pre><code><span class="k">def</span> <span class="m">some_method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">some_method</span>
foo <span class="o">=</span> <span class="n">1</span>
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>bar<span class="o">|</span>
@ -961,14 +961,14 @@ for block or proc arguments.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/ShadowingOuterLocalVar:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/ShadowingOuterLocalVar:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L34" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L34" target="_blank">View source</a>]
</div>
</div>
@ -1110,7 +1110,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L46" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L46" target="_blank">View source</a>]
</div>
</div>
@ -1126,7 +1126,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L50" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L50" target="_blank">View source</a>]
</div>
</div>
@ -1142,7 +1142,7 @@ for block or proc arguments.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L42" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::SharedVarInFiber - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -581,7 +581,7 @@ which are mutated during iterations.</p>
<p>For example, having this example:</p>
<pre><code>n <span class="o">=</span> <span class="n">0</span>
<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>
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
@ -596,7 +596,7 @@ and when <code>channel.receive</code> is executed its value is <code>3</code>.</
<p>To solve this, the code above needs to be rewritten to the following:</p>
<pre><code>n <span class="o">=</span> <span class="n">0</span>
<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>
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
@ -612,12 +612,12 @@ during iterations. So it reports the issue on the first sample and passes on
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" target="_blank">officially documented</a></p>
<a href="https://crystal-lang.org/reference/guides/concurrency.html">officially documented</a></p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/SharedVarInFiber:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/SharedVarInFiber:
Enabled: true</code></pre>
@ -658,7 +658,7 @@ the second one.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shared_var_in_fiber.cr#L53" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shared_var_in_fiber.cr#L53" target="_blank">
ameba/rule/lint/shared_var_in_fiber.cr
</a>
@ -959,7 +959,7 @@ which are mutated during iterations.</p>
<p>For example, having this example:</p>
<pre><code>n <span class="o">=</span> <span class="n">0</span>
<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>
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
@ -974,7 +974,7 @@ and when <code>channel.receive</code> is executed its value is <code>3</code>.</
<p>To solve this, the code above needs to be rewritten to the following:</p>
<pre><code>n <span class="o">=</span> <span class="n">0</span>
<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>
<span class="k">while</span> n <span class="o">&lt;</span> <span class="n">3</span>
@ -990,18 +990,18 @@ during iterations. So it reports the issue on the first sample and passes on
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" target="_blank">officially documented</a></p>
<a href="https://crystal-lang.org/reference/guides/concurrency.html">officially documented</a></p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/SharedVarInFiber:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/SharedVarInFiber:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shared_var_in_fiber.cr#L53" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shared_var_in_fiber.cr#L53" target="_blank">View source</a>]
</div>
</div>
@ -1143,7 +1143,7 @@ the second one.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shared_var_in_fiber.cr#L64" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shared_var_in_fiber.cr#L64" target="_blank">View source</a>]
</div>
</div>
@ -1159,7 +1159,7 @@ the second one.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shared_var_in_fiber.cr#L60" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shared_var_in_fiber.cr#L60" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::Syntax - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,14 +578,14 @@
<p>For example, this syntax is invalid:</p>
<pre><code><span class="k">def</span> <span class="m">hello</span>
<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">end</span></code></pre>
<p>And should be properly written:</p>
<pre><code><span class="k">def</span> <span class="m">hello</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
do_something
<span class="k">rescue</span> e : <span class="t">Exception</span>
<span class="k">end</span></code></pre>
@ -629,7 +629,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/syntax.cr#L22" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/syntax.cr#L22" target="_blank">
ameba/rule/lint/syntax.cr
</a>
@ -903,14 +903,14 @@
<p>For example, this syntax is invalid:</p>
<pre><code><span class="k">def</span> <span class="m">hello</span>
<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">end</span></code></pre>
<p>And should be properly written:</p>
<pre><code><span class="k">def</span> <span class="m">hello</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">hello</span>
do_something
<span class="k">rescue</span> e : <span class="t">Exception</span>
<span class="k">end</span></code></pre>
@ -919,7 +919,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/syntax.cr#L22" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/syntax.cr#L22" target="_blank">View source</a>]
</div>
</div>
@ -1061,7 +1061,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/syntax.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/syntax.cr#L28" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::UnneededDisableDirective - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -577,7 +577,7 @@
<p>A rule that reports unneeded disable directives.
For example, this is considered invalid:</p>
<pre><code><span class="c"># ameba:disable Style/PredicateName</span>
<pre><code class="language-crystal"><span class="c"># ameba:disable Style/PredicateName</span>
<span class="k">def</span> <span class="m">comment?</span>
do_something
<span class="k">end</span></code></pre>
@ -585,14 +585,14 @@ For example, this is considered invalid:</p>
<p>as the predicate name is correct and the comment directive does not
have any effect, the snippet should be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">comment?</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">comment?</span>
do_something
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnneededDisableDirective
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UnneededDisableDirective
Enabled: true</code></pre>
@ -633,7 +633,7 @@ have any effect, the snippet should be written as the following:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unneeded_disable_directive.cr#L28" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unneeded_disable_directive.cr#L28" target="_blank">
ameba/rule/lint/unneeded_disable_directive.cr
</a>
@ -925,7 +925,7 @@ have any effect, the snippet should be written as the following:</p>
<p>A rule that reports unneeded disable directives.
For example, this is considered invalid:</p>
<pre><code><span class="c"># ameba:disable Style/PredicateName</span>
<pre><code class="language-crystal"><span class="c"># ameba:disable Style/PredicateName</span>
<span class="k">def</span> <span class="m">comment?</span>
do_something
<span class="k">end</span></code></pre>
@ -933,20 +933,20 @@ For example, this is considered invalid:</p>
<p>as the predicate name is correct and the comment directive does not
have any effect, the snippet should be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">comment?</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">comment?</span>
do_something
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnneededDisableDirective
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UnneededDisableDirective
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unneeded_disable_directive.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unneeded_disable_directive.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1088,7 +1088,7 @@ have any effect, the snippet should be written as the following:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unneeded_disable_directive.cr#L35" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unneeded_disable_directive.cr#L35" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::UnreachableCode - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,12 +578,12 @@
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
<span class="k">return</span> <span class="n">42</span>
a <span class="o">+</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<pre><code>a <span class="o">=</span> <span class="n">1</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>
@ -591,12 +591,12 @@ loop <span class="k">do</span>
<p>And has to be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
<span class="k">return</span> <span class="n">42</span> <span class="k">if</span> a <span class="o">==</span> <span class="n">0</span>
a <span class="o">+</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<pre><code>a <span class="o">=</span> <span class="n">1</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span> a <span class="o">&gt;</span> <span class="n">3</span>
a += <span class="n">1</span>
@ -604,8 +604,8 @@ loop <span class="k">do</span>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnreachableCode:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UnreachableCode:
Enabled: true</code></pre>
@ -648,7 +648,7 @@ loop <span class="k">do</span>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unreachable_code.cr#L45" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unreachable_code.cr#L45" target="_blank">
ameba/rule/lint/unreachable_code.cr
</a>
@ -1000,12 +1000,12 @@ loop <span class="k">do</span>
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
<span class="k">return</span> <span class="n">42</span>
a <span class="o">+</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<pre><code>a <span class="o">=</span> <span class="n">1</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>
@ -1013,12 +1013,12 @@ loop <span class="k">do</span>
<p>And has to be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a)
<span class="k">return</span> <span class="n">42</span> <span class="k">if</span> a <span class="o">==</span> <span class="n">0</span>
a <span class="o">+</span> <span class="n">1</span>
<span class="k">end</span></code></pre>
<pre><code>a <span class="o">=</span> <span class="n">1</span>
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span>
loop <span class="k">do</span>
<span class="k">break</span> a <span class="o">&gt;</span> <span class="n">3</span>
a += <span class="n">1</span>
@ -1026,14 +1026,14 @@ loop <span class="k">do</span>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnreachableCode:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UnreachableCode:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unreachable_code.cr#L45" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unreachable_code.cr#L45" target="_blank">View source</a>]
</div>
</div>
@ -1175,7 +1175,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unreachable_code.cr#L58" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unreachable_code.cr#L58" target="_blank">View source</a>]
</div>
</div>
@ -1191,7 +1191,7 @@ loop <span class="k">do</span>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unreachable_code.cr#L54" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unreachable_code.cr#L54" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::UnusedArgument - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -577,23 +577,23 @@
<p>A rule that reports unused arguments.
For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b, c)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b, c)
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>and should be written as:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b)
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnusedArgument:
<pre><code class="language-crystal">Lint/UnusedArgument:
Enabled: true
IgnoreDefs: true
IgnoreBlocks: false
IgnoreProcs: false</span></code></pre>
IgnoreProcs: false</code></pre>
@ -634,7 +634,7 @@ For example, this is considered invalid:</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L28" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L28" target="_blank">
ameba/rule/lint/unused_argument.cr
</a>
@ -971,29 +971,29 @@ For example, this is considered invalid:</p>
<p>A rule that reports unused arguments.
For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b, c)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b, c)
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>and should be written as:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b)
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b)
a <span class="o">+</span> b
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UnusedArgument:
<pre><code class="language-crystal">Lint/UnusedArgument:
Enabled: true
IgnoreDefs: true
IgnoreBlocks: false
IgnoreProcs: false</span></code></pre>
IgnoreProcs: false</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L28" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L28" target="_blank">View source</a>]
</div>
</div>
@ -1219,7 +1219,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L44" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L44" target="_blank">View source</a>]
</div>
</div>
@ -1235,7 +1235,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L48" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L48" target="_blank">View source</a>]
</div>
</div>
@ -1251,7 +1251,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L52" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L52" target="_blank">View source</a>]
</div>
</div>
@ -1267,7 +1267,7 @@ For example, this is considered invalid:</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L40" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::UselessAssign - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -578,22 +578,22 @@
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>
var <span class="o">=</span> <span class="n">1</span>
do_something
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>
var <span class="o">=</span> <span class="n">1</span>
do_something(var)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UselessAssign:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UselessAssign:
Enabled: true</code></pre>
@ -634,7 +634,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_assign.cr#L29" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_assign.cr#L29" target="_blank">
ameba/rule/lint/useless_assign.cr
</a>
@ -932,28 +932,28 @@
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>
var <span class="o">=</span> <span class="n">1</span>
do_something
<span class="k">end</span></code></pre>
<p>And has to be written as the following:</p>
<pre><code><span class="k">def</span> <span class="m">method</span>
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>
var <span class="o">=</span> <span class="n">1</span>
do_something(var)
<span class="k">end</span></code></pre>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UselessAssign:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UselessAssign:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_assign.cr#L29" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_assign.cr#L29" target="_blank">View source</a>]
</div>
</div>
@ -1095,7 +1095,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_assign.cr#L40" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_assign.cr#L40" target="_blank">View source</a>]
</div>
</div>
@ -1111,7 +1111,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_assign.cr#L36" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_assign.cr#L36" target="_blank">View source</a>]
</div>
</div>

View file

@ -3,21 +3,16 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="generator" content="Crystal Docs 0.35.1">
<meta name="crystal_docs.project_version" content="master">
<meta name="crystal_docs.project_name" content="ameba">
<link href="../../../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../js/doc.js"></script>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<meta id="repository-name" content="ameba">
<meta name="repository-name" content="ameba">
<title>Ameba::Rule::Lint::UselessConditionInWhen - ameba master</title>
<script type="text/javascript">
CrystalDocs.base_path = "../../../";
@ -25,6 +20,11 @@
</head>
<body>
<svg class="hidden">
<symbol id="octicon-link" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
</symbol>
</svg>
<div class="sidebar">
<div class="sidebar-header">
<div class="search-box">
@ -44,7 +44,7 @@
</div>
</div>
<div class="search-results" class="hidden">
<div class="search-results hidden">
<ul class="search-list"></ul>
</div>
@ -579,7 +579,7 @@ where it is guaranteed to always return the same result.</p>
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">case</span>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
@ -588,7 +588,7 @@ where it is guaranteed to always return the same result.</p>
<p>And has to be written as the following:</p>
<pre><code><span class="k">case</span>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
@ -597,8 +597,8 @@ where it is guaranteed to always return the same result.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UselessConditionInWhen:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UselessConditionInWhen:
Enabled: true</code></pre>
@ -639,7 +639,7 @@ where it is guaranteed to always return the same result.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_condition_in_when.cr#L34" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_condition_in_when.cr#L34" target="_blank">
ameba/rule/lint/useless_condition_in_when.cr
</a>
@ -933,7 +933,7 @@ where it is guaranteed to always return the same result.</p>
<p>For example, this is considered invalid:</p>
<pre><code><span class="k">case</span>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
@ -942,7 +942,7 @@ where it is guaranteed to always return the same result.</p>
<p>And has to be written as the following:</p>
<pre><code><span class="k">case</span>
<pre><code class="language-crystal"><span class="k">case</span>
<span class="k">when</span> utc?
io <span class="o">&lt;&lt;</span> <span class="s">&quot; UTC&quot;</span>
<span class="k">when</span> local?
@ -951,14 +951,14 @@ where it is guaranteed to always return the same result.</p>
<p>YAML configuration example:</p>
<pre><code><span class="t">Lint</span><span class="s">/UselessConditionInWhen:
Enabled: true</span></code></pre>
<pre><code class="language-crystal">Lint/UselessConditionInWhen:
Enabled: true</code></pre>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_condition_in_when.cr#L34" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_condition_in_when.cr#L34" target="_blank">View source</a>]
</div>
</div>
@ -1100,7 +1100,7 @@ where it is guaranteed to always return the same result.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_condition_in_when.cr#L54" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_condition_in_when.cr#L54" target="_blank">View source</a>]
</div>
</div>