mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Deploying to gh-pages from @ 51b0a07e81 🚀
This commit is contained in:
parent
2f03204df2
commit
8d0a0f7c6a
93 changed files with 1813 additions and 1813 deletions
44
Ameba.html
44
Ameba.html
|
|
@ -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 - 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>
|
||||
|
||||
|
|
@ -576,11 +576,11 @@
|
|||
|
||||
<p>To run the linter with default parameters:</p>
|
||||
|
||||
<pre><code><span class="t">Ameba</span>.run</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Ameba</span>.run</code></pre>
|
||||
|
||||
<p>To configure and run it:</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> formatter
|
||||
config.files <span class="o">=</span> file_paths
|
||||
|
||||
|
|
@ -623,63 +623,63 @@ config.files <span class="o">=</span> file_paths
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba.cr#L24" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba.cr#L24" target="_blank">
|
||||
ameba.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/glob_utils.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/glob_utils.cr#L1" target="_blank">
|
||||
ameba/glob_utils.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L1" target="_blank">
|
||||
ameba/inline_comments.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L1" target="_blank">
|
||||
ameba/issue.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L1" target="_blank">
|
||||
ameba/reportable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L1" target="_blank">
|
||||
ameba/runner.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L1" target="_blank">
|
||||
ameba/severity.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L1" target="_blank">
|
||||
ameba/source.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/tokenizer.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/tokenizer.cr#L3" target="_blank">
|
||||
ameba/tokenizer.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -769,14 +769,14 @@ Can be configured via <code>config</code> parameter.</p>
|
|||
|
||||
<p>Examples:</p>
|
||||
|
||||
<pre><code><span class="t">Ameba</span>.run
|
||||
<pre><code class="language-crystal"><span class="t">Ameba</span>.run
|
||||
<span class="t">Ameba</span>.run config</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST - 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>
|
||||
|
||||
|
|
@ -597,105 +597,105 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L1" target="_blank">
|
||||
ameba/ast/branch.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L3" target="_blank">
|
||||
ameba/ast/branchable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L3" target="_blank">
|
||||
ameba/ast/flow_expression.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L3" target="_blank">
|
||||
ameba/ast/scope.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L1" target="_blank">
|
||||
ameba/ast/variabling/argument.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L4" target="_blank">
|
||||
ameba/ast/variabling/assignment.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L1" target="_blank">
|
||||
ameba/ast/variabling/ivariable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/reference.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/reference.cr#L3" target="_blank">
|
||||
ameba/ast/variabling/reference.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L1" target="_blank">
|
||||
ameba/ast/variabling/variable.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/base_visitor.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/base_visitor.cr#L4" target="_blank">
|
||||
ameba/ast/visitors/base_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L1" target="_blank">
|
||||
ameba/ast/visitors/counting_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/flow_expression_visitor.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/flow_expression_visitor.cr#L4" target="_blank">
|
||||
ameba/ast/visitors/flow_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L3" target="_blank">
|
||||
ameba/ast/visitors/node_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L1" target="_blank">
|
||||
ameba/ast/visitors/redundant_control_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/scope_visitor.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/scope_visitor.cr#L3" target="_blank">
|
||||
ameba/ast/visitors/scope_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::AST::Argument - 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 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
<p>For example, all these vars are arguments:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">method</span>(a, b, c <span class="o">=</span> <span class="n">10</span>, <span class="o">&</span>block)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">method</span>(a, b, c <span class="o">=</span> <span class="n">10</span>, <span class="o">&</span>block)
|
||||
<span class="n">3</span>.times <span class="k">do</span> <span class="o">|</span>i<span class="o">|</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L15" target="_blank">
|
||||
ameba/ast/variabling/argument.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -763,13 +763,13 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
|
||||
<p>Creates a new argument.</p>
|
||||
|
||||
<pre><code><span class="t">Argument</span>.<span class="k">new</span>(node, variable)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Argument</span>.<span class="k">new</span>(node, variable)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -799,7 +799,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -815,7 +815,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -836,7 +836,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -852,7 +852,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -868,7 +868,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -889,7 +889,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -910,7 +910,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -926,7 +926,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -942,7 +942,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -963,7 +963,7 @@ Holds the reference to the variable, thus to scope.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/argument.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/argument.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Assignment - 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>
|
||||
|
||||
|
|
@ -600,7 +600,7 @@ Holds the assign node and the variable.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L7" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/assignment.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -797,13 +797,13 @@ Holds the assign node and the variable.</p>
|
|||
|
||||
<p>Creates a new assignment.</p>
|
||||
|
||||
<pre><code><span class="t">Assignment</span>.<span class="k">new</span>(node, variable, scope)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Assignment</span>.<span class="k">new</span>(node, variable, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L32" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L32" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -838,7 +838,7 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -854,7 +854,7 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -870,7 +870,7 @@ Holds the assign node and the variable.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -888,13 +888,13 @@ Holds the assign node and the variable.</p>
|
|||
<p>Returns true if this assignment is in a branch, false if not.
|
||||
For example, this assignment is in a branch:</p>
|
||||
|
||||
<pre><code>a <span class="o">=</span> <span class="n">1</span> <span class="k">if</span> a.<span class="k">nil?</span></code></pre>
|
||||
<pre><code class="language-crystal">a <span class="o">=</span> <span class="n">1</span> <span class="k">if</span> a.<span class="k">nil?</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L61" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L61" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -910,7 +910,7 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -926,7 +926,7 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -947,7 +947,7 @@ For example, this assignment is in a branch:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -965,13 +965,13 @@ For example, this assignment is in a branch:</p>
|
|||
<p>Returns true if this assignment is an op assign, false if not.
|
||||
For example, this is an op assign:</p>
|
||||
|
||||
<pre><code>a ||= <span class="n">1</span></code></pre>
|
||||
<pre><code class="language-crystal">a ||= <span class="n">1</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L51" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L51" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -987,7 +987,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1003,7 +1003,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1019,7 +1019,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L41" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L41" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1040,7 +1040,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1061,7 +1061,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L66" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L66" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1077,7 +1077,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1093,7 +1093,7 @@ For example, this is an op assign:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1111,13 +1111,13 @@ For example, this is an op assign:</p>
|
|||
<p>Indicates whether the node is a transformed assignment by the compiler.
|
||||
i.e.</p>
|
||||
|
||||
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>(a, b)<span class="o">|</span>
|
||||
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>(a, b)<span class="o">|</span>
|
||||
puts b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>is transformed to:</p>
|
||||
|
||||
<pre><code>collection.each <span class="k">do</span> <span class="o">|</span>__arg0<span class="o">|</span>
|
||||
<pre><code class="language-crystal">collection.each <span class="k">do</span> <span class="o">|</span>__arg0<span class="o">|</span>
|
||||
a <span class="o">=</span> __arg0[<span class="n">0</span>]
|
||||
b <span class="o">=</span> __arg0[<span class="n">1</span>]
|
||||
puts(b)
|
||||
|
|
@ -1127,7 +1127,7 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L99" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L99" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1148,7 +1148,7 @@ i.e.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/assignment.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/assignment.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::BaseVisitor - 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>
|
||||
|
||||
|
|
@ -617,7 +617,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/base_visitor.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/base_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/base_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -730,13 +730,13 @@
|
|||
|
||||
<p>Creates instance of this visitor.</p>
|
||||
|
||||
<pre><code>visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
<pre><code class="language-crystal">visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/base_visitor.cr#L19" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/base_visitor.cr#L19" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -772,7 +772,7 @@ Returns true meaning all child nodes will be traversed.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/base_visitor.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/base_visitor.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Branch - 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 @@
|
|||
Branch is a part of a branchable statement.
|
||||
For example, the branchable if statement contains 3 branches:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> a <span class="o">=</span> something <span class="c"># --> Branch A</span>
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">=</span> something <span class="c"># --> Branch A</span>
|
||||
a <span class="o">=</span> <span class="n">1</span> <span class="c"># --> Branch B</span>
|
||||
put a <span class="k">if</span> <span class="k">out</span> <span class="c"># --> Branch C</span>
|
||||
<span class="k">else</span>
|
||||
|
|
@ -608,7 +608,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L15" target="_blank">
|
||||
ameba/ast/branch.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -795,13 +795,13 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Creates a new branch.</p>
|
||||
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">new</span>(if_node)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">new</span>(if_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L33" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -830,13 +830,13 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Constructs a new branch based on the node some parent scope.</p>
|
||||
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">of</span>(assign_node, def_node)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">of</span>(assign_node, def_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L66" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L66" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -853,13 +853,13 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
|
||||
<p>Constructs a new branch based on the node in scope.</p>
|
||||
|
||||
<pre><code><span class="t">Branch</span>.<span class="k">of</span>(assign_node, scope)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Branch</span>.<span class="k">of</span>(assign_node, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L57" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L57" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -910,7 +910,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -926,7 +926,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -967,7 +967,7 @@ For example, the branchable if statement contains 3 branches:</p>
|
|||
<p>Returns true if current branch is in a loop, false - otherwise.
|
||||
For example, this branch is in a loop:</p>
|
||||
|
||||
<pre><code><span class="k">while</span> <span class="n">true</span>
|
||||
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">true</span>
|
||||
handle_input <span class="c"># this branch is in a loop</span>
|
||||
<span class="k">if</span> wrong_input
|
||||
show_message <span class="c"># this branch is also in a loop.</span>
|
||||
|
|
@ -978,7 +978,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L48" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L48" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -994,7 +994,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1010,7 +1010,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1031,7 +1031,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1052,7 +1052,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1068,7 +1068,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1084,7 +1084,7 @@ For example, this branch is in a loop:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branch.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Branchable - 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 @@
|
|||
For example, <code>Crystal::If</code>, <code>Crystal::Unless</code>, <code>Crystal::While</code>
|
||||
are branchables.</p>
|
||||
|
||||
<pre><code>white a <span class="o">></span> <span class="n">100</span> <span class="c"># Branchable A</span>
|
||||
<pre><code class="language-crystal">white a <span class="o">></span> <span class="n">100</span> <span class="c"># Branchable A</span>
|
||||
<span class="k">if</span> b <span class="o">></span> <span class="n">2</span> <span class="c"># Branchable B</span>
|
||||
a += <span class="n">1</span>
|
||||
<span class="k">end</span>
|
||||
|
|
@ -621,7 +621,7 @@ are branchables.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L15" target="_blank">
|
||||
ameba/ast/branchable.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -827,13 +827,13 @@ are branchables.</p>
|
|||
|
||||
<p>Creates a new branchable</p>
|
||||
|
||||
<pre><code><span class="t">Branchable</span>.<span class="k">new</span>(node, parent_branchable)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Branchable</span>.<span class="k">new</span>(node, parent_branchable)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -863,7 +863,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -879,7 +879,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -895,7 +895,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -911,7 +911,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -927,7 +927,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -948,7 +948,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -969,7 +969,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -990,7 +990,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1006,7 +1006,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1022,7 +1022,7 @@ are branchables.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/branchable.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::CountingVisitor - 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>
|
||||
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L3" target="_blank">
|
||||
ameba/ast/visitors/counting_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -745,7 +745,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -780,7 +780,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -796,7 +796,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -812,7 +812,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/counting_visitor.cr#L33" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/counting_visitor.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::FlowExpression - 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>Represents a flow expression in Crystal code.
|
||||
For example,</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foobar</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foobar</span>
|
||||
a <span class="o">=</span> <span class="n">3</span>
|
||||
<span class="k">return</span> <span class="n">42</span> <span class="c"># => flow expression</span>
|
||||
a <span class="o">+</span> <span class="n">1</span>
|
||||
|
|
@ -624,7 +624,7 @@ a parent node, which allows easily search through the related statement
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L18" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L18" target="_blank">
|
||||
ameba/ast/flow_expression.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -825,13 +825,13 @@ a parent node, which allows easily search through the related statement
|
|||
|
||||
<p>Creates a new flow expression.</p>
|
||||
|
||||
<pre><code><span class="t">FlowExpression</span>.<span class="k">new</span>(node, parent_node)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">FlowExpression</span>.<span class="k">new</span>(node, parent_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -861,7 +861,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -877,7 +877,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -898,7 +898,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -914,7 +914,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -930,7 +930,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -951,7 +951,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -967,7 +967,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -983,7 +983,7 @@ a parent node, which allows easily search through the related statement
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1001,7 +1001,7 @@ a parent node, which allows easily search through the related statement
|
|||
<p>Returns nodes which can't be reached because of a flow command inside.
|
||||
For example:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foobar</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foobar</span>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="k">return</span> <span class="n">42</span>
|
||||
|
||||
|
|
@ -1012,7 +1012,7 @@ For example:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/flow_expression.cr#L50" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/flow_expression.cr#L50" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::FlowExpressionVisitor - 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>
|
||||
|
||||
|
|
@ -613,7 +613,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/flow_expression_visitor.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/flow_expression_visitor.cr#L6" target="_blank">
|
||||
ameba/ast/visitors/flow_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -793,7 +793,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/flow_expression_visitor.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/flow_expression_visitor.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::InstanceVariable - 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>
|
||||
|
||||
|
|
@ -588,7 +588,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L2" target="_blank">
|
||||
ameba/ast/variabling/ivariable.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -726,7 +726,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L10" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -756,7 +756,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -772,7 +772,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -788,7 +788,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -804,7 +804,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -820,7 +820,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -836,7 +836,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -852,7 +852,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -868,7 +868,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -884,7 +884,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/ivariable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::NodeVisitor - 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>An AST Visitor that traverses the source and allows all nodes
|
||||
to be inspected by rules.</p>
|
||||
|
||||
<pre><code>visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
<pre><code class="language-crystal">visitor <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">AST</span><span class="t">::</span><span class="t">NodeVisitor</span>.<span class="k">new</span>(rule, source)</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -602,7 +602,7 @@ to be inspected by rules.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L39" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L39" target="_blank">
|
||||
ameba/ast/visitors/node_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -906,7 +906,7 @@ to be inspected by rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L42" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -942,7 +942,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -964,7 +964,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -986,7 +986,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1008,7 +1008,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1030,7 +1030,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1052,7 +1052,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1074,7 +1074,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1096,7 +1096,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1118,7 +1118,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1140,7 +1140,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1162,7 +1162,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1184,7 +1184,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1206,7 +1206,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1228,7 +1228,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1250,7 +1250,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1272,7 +1272,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1294,7 +1294,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1316,7 +1316,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1338,7 +1338,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1360,7 +1360,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1382,7 +1382,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1404,7 +1404,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1426,7 +1426,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1448,7 +1448,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1464,7 +1464,7 @@ Returns true meaning that child nodes will be traversed as well.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/node_visitor.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/node_visitor.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::RedundantControlExpressionVisitor - 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>
|
||||
|
||||
|
|
@ -601,7 +601,7 @@ is reached.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L5" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/redundant_control_expression_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -715,7 +715,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L15" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -750,7 +750,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -771,7 +771,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L7" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L7" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -792,7 +792,7 @@ is reached.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L10" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/redundant_control_expression_visitor.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Reference - 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>
|
||||
|
||||
|
|
@ -601,7 +601,7 @@ the variable from its reference.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/reference.cr#L7" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/reference.cr#L7" target="_blank">
|
||||
ameba/ast/variabling/reference.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -814,7 +814,7 @@ the variable from its reference.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -830,7 +830,7 @@ the variable from its reference.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/reference.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Scope - 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>
|
||||
|
||||
|
|
@ -600,7 +600,7 @@ This is where the local variables belong to.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L6" target="_blank">
|
||||
ameba/ast/scope.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -798,7 +798,7 @@ This is where the local variables belong to.</p>
|
|||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#references?(variable:Variable)-instance-method" class="signature"><strong>#references?</strong>(variable : Variable)</a>
|
||||
<a href="#references?(variable:Variable,check_inner_scopes=true)-instance-method" class="signature"><strong>#references?</strong>(variable : Variable, check_inner_scopes = <span class="n">true</span>)</a>
|
||||
|
||||
<div class="summary"><p>Returns true if current scope (or any of inner scopes) references variable, false if not.</p></div>
|
||||
|
||||
|
|
@ -894,13 +894,13 @@ This is where the local variables belong to.</p>
|
|||
|
||||
<p>Creates a new scope. Accepts the AST node and the outer scope.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)</code></pre>
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -954,14 +954,14 @@ This is where the local variables belong to.</p>
|
|||
|
||||
<p>Creates a new argument in the current scope.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_argument(arg_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L59" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -978,14 +978,14 @@ scope.add_argument(arg_node)</code></pre>
|
|||
|
||||
<p>Adds a new instance variable to the current scope.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_ivariable(ivar_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L70" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1002,14 +1002,14 @@ scope.add_ivariable(ivar_node)</code></pre>
|
|||
|
||||
<p>Creates a new variable in the current scope.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.add_variable(var_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1030,7 +1030,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L155" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1051,7 +1051,7 @@ scope.add_variable(var_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1068,14 +1068,14 @@ scope.add_variable(var_node)</code></pre>
|
|||
|
||||
<p>Creates a new assignment for the variable.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.assign_variable(var_name, assign_node)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L90" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1096,7 +1096,7 @@ scope.assign_variable(var_name, assign_node)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L119" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1118,7 +1118,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L96" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1139,7 +1139,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L145" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1155,7 +1155,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1171,7 +1171,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1193,7 +1193,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L174" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1210,14 +1210,14 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
<p>Returns variable by its name or nil if it does not exist.</p>
|
||||
|
||||
<pre><code>scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
<pre><code class="language-crystal">scope <span class="o">=</span> <span class="t">Scope</span>.<span class="k">new</span>(class_node, <span class="n">nil</span>)
|
||||
scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L80" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1261,7 +1261,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1282,7 +1282,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1303,7 +1303,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L17" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1319,7 +1319,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1335,7 +1335,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1356,7 +1356,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1377,7 +1377,7 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1398,17 +1398,17 @@ scope.find_variable(<span class="s">"foo"</span>)</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-detail" id="references?(variable:Variable)-instance-method">
|
||||
<div class="entry-detail" id="references?(variable:Variable,check_inner_scopes=true)-instance-method">
|
||||
<div class="signature">
|
||||
|
||||
def <strong>references?</strong>(variable : <a href="../../Ameba/AST/Variable.html">Variable</a>)
|
||||
def <strong>references?</strong>(variable : <a href="../../Ameba/AST/Variable.html">Variable</a>, check_inner_scopes = <span class="n">true</span>)
|
||||
|
||||
<a class="method-permalink" href="#references?(variable:Variable)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#references?(variable:Variable,check_inner_scopes=true)-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
|
@ -1420,7 +1420,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L137" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1437,7 +1437,7 @@ false if not.</p>
|
|||
|
||||
<p>Returns true if current scope represents a spawn block, e. g.</p>
|
||||
|
||||
<pre><code>spawn <span class="k">do</span>
|
||||
<pre><code class="language-crystal">spawn <span class="k">do</span>
|
||||
<span class="c"># ...</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
</div>
|
||||
|
|
@ -1445,7 +1445,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L107" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1461,7 +1461,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1477,7 +1477,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1498,7 +1498,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L150" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1520,7 +1520,7 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L126" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1541,7 +1541,7 @@ type definition, for example a class.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/scope.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::ScopeVisitor - 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>
|
||||
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/scope_visitor.cr#L5" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/scope_visitor.cr#L5" target="_blank">
|
||||
ameba/ast/visitors/scope_visitor.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -742,7 +742,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/visitors/scope_visitor.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/visitors/scope_visitor.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Util - 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>
|
||||
|
||||
|
|
@ -629,7 +629,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L2" target="_blank">
|
||||
ameba/ast/util.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -750,7 +750,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L141" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L141" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -771,7 +771,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L135" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L135" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -794,7 +794,7 @@ or special call node that interrupts execution (i.e. raise, exit, abort).</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L62" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L62" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -815,7 +815,7 @@ Node represents a flow expression if it is full-filled by a flow command.</p>
|
|||
<p>For example, this node is a flow expression, because each branch contains
|
||||
a flow command <code>return</code>:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:positive</span>
|
||||
<span class="k">elsif</span> a <span class="o"><</span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:negative</span>
|
||||
|
|
@ -825,7 +825,7 @@ a flow command <code>return</code>:</p>
|
|||
|
||||
<p>This node is a not a flow expression:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<pre><code class="language-crystal"><span class="k">if</span> a <span class="o">></span> <span class="n">0</span>
|
||||
<span class="k">return</span> <span class="n">:positive</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -835,7 +835,7 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L101" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L101" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -856,7 +856,7 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L4" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L4" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -877,7 +877,7 @@ a flow command <code>return</code>:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L147" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L147" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -900,7 +900,7 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L33" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L33" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -921,7 +921,7 @@ to determine and cut a piece of source of the node.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/util.cr#L129" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/util.cr#L129" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::AST::Variable - 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>
|
||||
|
||||
|
|
@ -614,7 +614,7 @@ Holds the var node and variable assigments.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L4" target="_blank">
|
||||
ameba/ast/variabling/variable.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -862,13 +862,13 @@ Holds the var node and variable assigments.</p>
|
|||
|
||||
<p>Creates a new variable(in the scope).</p>
|
||||
|
||||
<pre><code><span class="t">Variable</span>.<span class="k">new</span>(node, scope)</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Variable</span>.<span class="k">new</span>(node, scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -900,7 +900,7 @@ Holds the var node and variable assigments.</p>
|
|||
<p>Assigns the variable (creates a new assignment).
|
||||
Variable may have multiple assignments.</p>
|
||||
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.assign(node1)
|
||||
variable.assign(node2)
|
||||
variable.assignment.size <span class="c"># => 2</span></code></pre>
|
||||
|
|
@ -909,7 +909,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L49" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -930,7 +930,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -951,7 +951,7 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -970,19 +970,19 @@ variable.assignment.size <span class="c"># => 2</span></code></pre>
|
|||
in the block. For example this variable is captured
|
||||
by block:</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="n">3</span>.times { <span class="o">|</span>i<span class="o">|</span> a <span class="o">=</span> a <span class="o">+</span> i }</code></pre>
|
||||
|
||||
<p>And this variable is not captured by block.</p>
|
||||
|
||||
<pre><code>i <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">i <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="n">3</span>.times { <span class="o">|</span>i<span class="o">|</span> i <span class="o">+</span> <span class="n">1</span> }</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L114" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1003,7 +1003,7 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L161" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L161" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1019,7 +1019,7 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1035,7 +1035,7 @@ by block:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1057,7 +1057,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L154" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L154" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1078,7 +1078,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L148" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L148" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1094,7 +1094,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1110,7 +1110,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1126,7 +1126,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1142,7 +1142,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1163,7 +1163,7 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1180,14 +1180,14 @@ the same Crystal node as <code>@node</code>.</p>
|
|||
|
||||
<p>Creates a reference to this variable in some scope.</p>
|
||||
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.reference(var_node, some_scope)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L73" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L73" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1204,7 +1204,7 @@ variable.reference(var_node, some_scope)</code></pre>
|
|||
|
||||
<p>Reference variable's assignments.</p>
|
||||
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.assign(assign_node)
|
||||
variable.reference_assignments!</code></pre>
|
||||
</div>
|
||||
|
|
@ -1212,7 +1212,7 @@ variable.reference_assignments!</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L87" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L87" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1229,7 +1229,7 @@ variable.reference_assignments!</code></pre>
|
|||
|
||||
<p>Returns true if variable has any reference.</p>
|
||||
|
||||
<pre><code>variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
<pre><code class="language-crystal">variable <span class="o">=</span> <span class="t">Variable</span>.<span class="k">new</span>(node, scope)
|
||||
variable.reference(var_node)
|
||||
variable.referenced? <span class="c"># => true</span></code></pre>
|
||||
</div>
|
||||
|
|
@ -1237,7 +1237,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L62" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L62" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1258,7 +1258,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L9" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1279,7 +1279,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L15" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L15" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1300,7 +1300,7 @@ variable.referenced? <span class="c"># => true</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1322,7 +1322,7 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L136" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L136" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1338,7 +1338,7 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1354,7 +1354,7 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1376,7 +1376,7 @@ false if not.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/ast/variabling/variable.cr#L125" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/ast/variabling/variable.cr#L125" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Config - 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>Config can be loaded from configuration YAML file and adjusted.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> my_formatter</code></pre>
|
||||
|
||||
<p>By default config loads <code>.ameba.yml</code> file in a current directory.</p>
|
||||
|
|
@ -620,7 +620,7 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L15" target="_blank">
|
||||
ameba/config.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -858,7 +858,7 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L86" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L86" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -875,13 +875,13 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
|
||||
<p>Loads YAML configuration file by <code>path</code>.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load</code></pre>
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L78" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L78" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -911,14 +911,14 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
<p>Represents a list of paths to exclude from globs.
|
||||
Can have wildcards.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>, <span class="s">"src/server/*.cr"</span>]</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -936,14 +936,14 @@ config.excluded <span class="o">=</span> [<span class="s">"spec"</span
|
|||
<p>Represents a list of paths to exclude from globs.
|
||||
Can have wildcards.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>, <span class="s">"src/server/*.cr"</span>]</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -961,7 +961,7 @@ config.excluded <span class="o">=</span> [<span class="s">"spec"</span
|
|||
<p>Returns a formatter to be used while inspecting files.
|
||||
If formatter is not set, it will return default formatter.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> custom_formatter
|
||||
config.formatter</code></pre>
|
||||
</div>
|
||||
|
|
@ -969,7 +969,7 @@ config.formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L114" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -985,7 +985,7 @@ config.formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L34" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L34" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1002,14 +1002,14 @@ config.formatter</code></pre>
|
|||
|
||||
<p>Sets formatter by name.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> <span class="n">:progress</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L125" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L125" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1028,7 +1028,7 @@ config.formatter <span class="o">=</span> <span class="n">:progress</span></code
|
|||
Represents a list of sources to be inspected.
|
||||
If globs are not set, it will return default list of files.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.globs</code></pre>
|
||||
</div>
|
||||
|
|
@ -1036,7 +1036,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1055,7 +1055,7 @@ config.globs</code></pre>
|
|||
Represents a list of sources to be inspected.
|
||||
If globs are not set, it will return default list of files.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.globs</code></pre>
|
||||
</div>
|
||||
|
|
@ -1063,7 +1063,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1079,7 +1079,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1095,7 +1095,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1111,7 +1111,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1128,7 +1128,7 @@ config.globs</code></pre>
|
|||
|
||||
<p>Returns a list of sources matching globs and excluded sections.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.sources <span class="c"># => list of default sources</span>
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>]
|
||||
|
|
@ -1138,7 +1138,7 @@ config.sources <span class="c"># => list of sources pointing to files found b
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L100" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L100" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1155,14 +1155,14 @@ config.sources <span class="c"># => list of sources pointing to files found b
|
|||
|
||||
<p>Updates rule properties.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.update_rule <span class="s">"MyRuleName"</span>, enabled: <span class="n">false</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L140" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L140" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1179,18 +1179,18 @@ config.update_rule <span class="s">"MyRuleName"</span>, enabled: <span
|
|||
|
||||
<p>Updates rules properties.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.update_rules <span class="s">%w(Rule1 Rule2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
|
||||
<p>also it allows to update groups of rules:</p>
|
||||
|
||||
<pre><code>config.update_rules <span class="s">%w(Group1 Group2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
<pre><code class="language-crystal">config.update_rules <span class="s">%w(Group1 Group2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L163" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L163" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter - 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>
|
||||
|
||||
|
|
@ -597,56 +597,56 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L4" target="_blank">
|
||||
ameba/formatter/base_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/disabled_formatter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/disabled_formatter.cr#L1" target="_blank">
|
||||
ameba/formatter/disabled_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/dot_formatter.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/dot_formatter.cr#L3" target="_blank">
|
||||
ameba/formatter/dot_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L3" target="_blank">
|
||||
ameba/formatter/explain_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/flycheck_formatter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/flycheck_formatter.cr#L1" target="_blank">
|
||||
ameba/formatter/flycheck_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L3" target="_blank">
|
||||
ameba/formatter/json_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/todo_formatter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/todo_formatter.cr#L1" target="_blank">
|
||||
ameba/formatter/todo_formatter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/util.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/util.cr#L1" target="_blank">
|
||||
ameba/formatter/util.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::Formatter::BaseFormatter - 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>
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ callbacks in <code><a href="../../Ameba/Runner.html#run-instance-method">Ameba::
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L8" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L8" target="_blank">
|
||||
ameba/formatter/base_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -754,7 +754,7 @@ callbacks in <code><a href="../../Ameba/Runner.html#run-instance-method">Ameba::
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -784,7 +784,7 @@ callbacks in <code><a href="../../Ameba/Runner.html#run-instance-method">Ameba::
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -806,7 +806,7 @@ A list of inspected sources is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -827,7 +827,7 @@ A list of inspected sources is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L10" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L10" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -849,7 +849,7 @@ A corresponding source is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -871,7 +871,7 @@ A corresponding source is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -893,7 +893,7 @@ A list of sources to inspect is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/base_formatter.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/base_formatter.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::DisabledFormatter - 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>
|
||||
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/disabled_formatter.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/disabled_formatter.cr#L3" target="_blank">
|
||||
ameba/formatter/disabled_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -749,7 +749,7 @@ A list of inspected sources is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/disabled_formatter.cr#L4" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/disabled_formatter.cr#L4" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::DotFormatter - 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>
|
||||
|
||||
|
|
@ -628,7 +628,7 @@ It is similar to Crystal's dot formatter for specs.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/dot_formatter.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/dot_formatter.cr#L6" target="_blank">
|
||||
ameba/formatter/dot_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -806,7 +806,7 @@ It is similar to Crystal's dot formatter for specs.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/dot_formatter.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/dot_formatter.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -827,7 +827,7 @@ It is similar to Crystal's dot formatter for specs.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/dot_formatter.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/dot_formatter.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -848,7 +848,7 @@ It is similar to Crystal's dot formatter for specs.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/dot_formatter.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/dot_formatter.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::ExplainFormatter - 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>
|
||||
|
||||
|
|
@ -614,7 +614,7 @@ a specific location.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L6" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L6" target="_blank">
|
||||
ameba/formatter/explain_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -777,14 +777,14 @@ a specific location.</p>
|
|||
Accepts <em>output</em> which indicates the io where the explanation will be wrtitten to.
|
||||
Second argument is <em>location</em> which indicates the location to explain.</p>
|
||||
|
||||
<pre><code><span class="t">ExplainFormatter</span>.<span class="k">new</span> output,
|
||||
<pre><code class="language-crystal"><span class="t">ExplainFormatter</span>.<span class="k">new</span> output,
|
||||
{file: path, line: line_number, column: column_number}</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -819,7 +819,7 @@ Second argument is <em>location</em> which indicates the location to explain.</p
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -835,7 +835,7 @@ Second argument is <em>location</em> which indicates the location to explain.</p
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -851,7 +851,7 @@ Second argument is <em>location</em> which indicates the location to explain.</p
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/explain_formatter.cr#L13" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/explain_formatter.cr#L13" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::FlycheckFormatter - 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>
|
||||
|
||||
|
|
@ -588,7 +588,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/flycheck_formatter.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/flycheck_formatter.cr#L2" target="_blank">
|
||||
ameba/formatter/flycheck_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ A corresponding source is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/flycheck_formatter.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/flycheck_formatter.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::JSONFormatter - 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>Example:</p>
|
||||
|
||||
<pre><code>{
|
||||
<pre><code class="language-crystal">{
|
||||
<span class="s">"metadata"</span>: {
|
||||
<span class="s">"ameba_version"</span>: <span class="s">"x.x.x"</span>,
|
||||
<span class="s">"crystal_version"</span>: <span class="s">"x.x.x"</span>,
|
||||
|
|
@ -657,7 +657,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L66" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L66" target="_blank">
|
||||
ameba/formatter/json_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -824,7 +824,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L67" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L67" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -864,7 +864,7 @@ A list of inspected sources is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L87" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L87" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -890,7 +890,7 @@ A corresponding source is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L75" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L75" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -916,7 +916,7 @@ A list of sources to inspect is passed as an argument.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/json_formatter.cr#L71" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/json_formatter.cr#L71" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::TODOFormatter - 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>
|
||||
|
||||
|
|
@ -601,7 +601,7 @@ or excludes failed sources from these rules.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/todo_formatter.cr#L5" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/todo_formatter.cr#L5" target="_blank">
|
||||
ameba/formatter/todo_formatter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -802,7 +802,7 @@ or excludes failed sources from these rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/todo_formatter.cr#L6" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/todo_formatter.cr#L6" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -841,7 +841,7 @@ or excludes failed sources from these rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/todo_formatter.cr#L9" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/todo_formatter.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Formatter::Util - 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>
|
||||
|
||||
|
|
@ -602,7 +602,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/util.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/util.cr#L2" target="_blank">
|
||||
ameba/formatter/util.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -667,7 +667,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/formatter/util.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/formatter/util.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::GlobUtils - 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>
|
||||
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/glob_utils.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/glob_utils.cr#L3" target="_blank">
|
||||
ameba/glob_utils.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -686,13 +686,13 @@
|
|||
|
||||
<p>Expands globs. Globs can point to files or even directories.</p>
|
||||
|
||||
<pre><code>expand([<span class="s">"spec/*.cr"</span>, <span class="s">"src"</span>]) <span class="c"># => all files in src folder + first level specs</span></code></pre>
|
||||
<pre><code class="language-crystal">expand([<span class="s">"spec/*.cr"</span>, <span class="s">"src"</span>]) <span class="c"># => all files in src folder + first level specs</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/glob_utils.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/glob_utils.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -710,13 +710,13 @@
|
|||
<p>Returns all files that match specified globs.
|
||||
Globs can have wildcards or be rejected:</p>
|
||||
|
||||
<pre><code>find_files_by_globs([<span class="s">"**/*.cr"</span>, <span class="s">"!lib"</span>])</code></pre>
|
||||
<pre><code class="language-crystal">find_files_by_globs([<span class="s">"**/*.cr"</span>, <span class="s">"!lib"</span>])</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/glob_utils.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/glob_utils.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::InlineComments - 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>
|
||||
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L3" target="_blank">
|
||||
ameba/inline_comments.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -716,7 +716,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L80" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L80" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -740,14 +740,14 @@ false otherwise.</p>
|
|||
|
||||
<p>For example, here are two examples of disabled location:</p>
|
||||
|
||||
<pre><code><span class="c"># ameba:disable Style/LargeNumbers</span>
|
||||
<pre><code class="language-crystal"><span class="c"># ameba:disable Style/LargeNumbers</span>
|
||||
<span class="t">Time</span>.epoch(<span class="n">1483859302</span>)
|
||||
|
||||
<span class="t">Time</span>.epoch(<span class="n">1483859302</span>) <span class="c"># ameba:disable Style/LargeNumbers</span></code></pre>
|
||||
|
||||
<p>But here are examples which are not considered as disabled location:</p>
|
||||
|
||||
<pre><code><span class="c"># ameba:disable Style/LargeNumbers</span>
|
||||
<pre><code class="language-crystal"><span class="c"># ameba:disable Style/LargeNumbers</span>
|
||||
<span class="c">#</span>
|
||||
<span class="t">Time</span>.epoch(<span class="n">1483859302</span>)
|
||||
|
||||
|
|
@ -759,7 +759,7 @@ false otherwise.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -777,21 +777,21 @@ false otherwise.</p>
|
|||
<p>Parses inline comment directive. Returns a tuple that consists of
|
||||
an action and parsed rules if directive found, nil otherwise.</p>
|
||||
|
||||
<pre><code>line <span class="o">=</span> <span class="s">"# ameba:disable Rule1, Rule2"</span>
|
||||
<pre><code class="language-crystal">line <span class="o">=</span> <span class="s">"# ameba:disable Rule1, Rule2"</span>
|
||||
directive <span class="o">=</span> parse_inline_directive(line)
|
||||
directive[<span class="n">:action</span>] <span class="c"># => "disable"</span>
|
||||
directive[<span class="n">:rules</span>] <span class="c"># => ["Rule1", "Rule2"]</span></code></pre>
|
||||
|
||||
<p>It ignores the directive if it is commented out.</p>
|
||||
|
||||
<pre><code>line <span class="o">=</span> <span class="s">"# # ameba:disable Rule1, Rule2"</span>
|
||||
<pre><code class="language-crystal">line <span class="o">=</span> <span class="s">"# # ameba:disable Rule1, Rule2"</span>
|
||||
parse_inline_directive(line) <span class="c"># => nil</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L69" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L69" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::InlineComments::Action - 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>
|
||||
|
||||
|
|
@ -597,7 +597,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L7" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L7" target="_blank">
|
||||
ameba/inline_comments.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -731,7 +731,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -747,7 +747,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/inline_comments.cr#L9" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/inline_comments.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Issue - 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>
|
||||
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L3" target="_blank">
|
||||
ameba/issue.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -747,7 +747,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -777,7 +777,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -793,7 +793,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -809,7 +809,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -895,7 +895,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/issue.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/issue.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Reportable - 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>
|
||||
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L3" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L3" target="_blank">
|
||||
ameba/reportable.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -725,7 +725,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L8" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L8" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -746,7 +746,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -767,7 +767,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -788,7 +788,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L14" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L14" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -809,7 +809,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L19" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L19" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -830,7 +830,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -851,7 +851,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/reportable.cr#L37" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/reportable.cr#L37" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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 - 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>
|
||||
|
||||
|
|
@ -586,7 +586,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L1" target="_blank">
|
||||
ameba/rule/base.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -676,13 +676,13 @@ behave differently than usual rules.</p>
|
|||
|
||||
<p>Returns a list of all available rules.</p>
|
||||
|
||||
<pre><code><span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span>.rules <span class="c"># => [Rule1, Rule2, ....]</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span>.rules <span class="c"># => [Rule1, Rule2, ....]</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L194" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L194" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Base - 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>Represents a base of all rules. In other words, all rules
|
||||
inherits from this struct:</p>
|
||||
|
||||
<pre><code><span class="k">struct</span> <span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<pre><code class="language-crystal"><span class="k">struct</span> <span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<span class="k">def</span> <span class="m">test</span>(source)
|
||||
<span class="k">if</span> invalid?(source)
|
||||
issue_for line, column, <span class="s">"Something wrong."</span>
|
||||
|
|
@ -730,7 +730,7 @@ that are tested by this rule, it should add an issue.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L30" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L30" target="_blank">
|
||||
ameba/rule/base.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -940,7 +940,7 @@ that are tested by this rule, it should add an issue.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -969,7 +969,7 @@ that are tested by this rule, it should add an issue.</p>
|
|||
|
||||
<p>Returns documentation for this rule if any.</p>
|
||||
|
||||
<pre><code><span class="k">module</span> <span class="t">Ameba</span>
|
||||
<pre><code class="language-crystal"><span class="k">module</span> <span class="t">Ameba</span>
|
||||
<span class="c"># This is a test rule.</span>
|
||||
<span class="c"># Does nothing.</span>
|
||||
<span class="k">struct</span> <span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
|
|
@ -984,7 +984,7 @@ that are tested by this rule, it should add an issue.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L157" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L157" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1017,12 +1017,12 @@ that are tested by this rule, it should add an issue.</p>
|
|||
|
||||
<p>Returns <code>true</code> if this struct is equal to <em>other</em>.</p>
|
||||
|
||||
<p>Both structs's instance vars are compared to each other. Thus, two
|
||||
<p>Both structs' instance vars are compared to each other. Thus, two
|
||||
structs are considered equal if each of their instance variables are
|
||||
equal. Subclasses should override this method to provide specific
|
||||
equality semantics.</p>
|
||||
|
||||
<pre><code><span class="k">struct</span> <span class="t">Point</span>
|
||||
<pre><code class="language-crystal"><span class="k">struct</span> <span class="t">Point</span>
|
||||
<span class="k">def</span> <span class="m">initialize</span>(@x : <span class="t">Int32</span>, @y : <span class="t">Int32</span>)
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
|
|
@ -1038,7 +1038,7 @@ p1 <span class="o">==</span> p3 <span class="c"># => false</span></code></pre
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L113" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L113" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1056,14 +1056,14 @@ p1 <span class="o">==</span> p3 <span class="c"># => false</span></code></pre
|
|||
<p>A convenient addition to <code><a href="../../Ameba/Rule/Base.html#test(source:Source,node:Crystal::ASTNode,*opts)-instance-method">#test</a></code> method that does the same
|
||||
but returns a passed in <code>source</code> as an addition.</p>
|
||||
|
||||
<pre><code>source <span class="o">=</span> <span class="t">MyRule</span>.<span class="k">new</span>.catch(source)
|
||||
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">MyRule</span>.<span class="k">new</span>.catch(source)
|
||||
source.valid?</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L54" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L54" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1082,13 +1082,13 @@ source.valid?</code></pre>
|
|||
It searches for a path in <code>excluded</code> property which matches
|
||||
the one of the given source.</p>
|
||||
|
||||
<pre><code>my_rule.excluded?(source) <span class="c"># => true or false</span></code></pre>
|
||||
<pre><code class="language-crystal">my_rule.excluded?(source) <span class="c"># => true or false</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L95" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L95" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1105,7 +1105,7 @@ the one of the given source.</p>
|
|||
|
||||
<p>Returns a group this rule belong to.</p>
|
||||
|
||||
<pre><code><span class="k">struct</span> <span class="t">MyGroup</span><span class="t">::</span><span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<pre><code class="language-crystal"><span class="k">struct</span> <span class="t">MyGroup</span><span class="t">::</span><span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<span class="c"># ...</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -1115,7 +1115,7 @@ the one of the given source.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L83" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L83" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1136,7 +1136,7 @@ the one of the given source.</p>
|
|||
|
||||
<p>Generates an <code>UInt64</code> hash value for this object.</p>
|
||||
|
||||
<p>This method must have the property that <code>a == b</code> implies <code>a<a href="../../Ameba/Rule/Base.html#hash-instance-method">.hash</a> == b<a href="../../Ameba/Rule/Base.html#hash-instance-method">.hash</a></code>.</p>
|
||||
<p>This method must have the property that <code>a == b</code> implies <code>a.hash == b.hash</code>.</p>
|
||||
|
||||
<p>The hash value is used along with <code><a href="../../Ameba/Rule/Base.html#==(other)-instance-method">#==</a></code> by the <code>Hash</code> class to determine if two objects
|
||||
reference the same hash key.</p>
|
||||
|
|
@ -1148,7 +1148,7 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L117" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L117" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1165,7 +1165,7 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
|
|||
|
||||
<p>Returns a name of this rule, which is basically a class name.</p>
|
||||
|
||||
<pre><code><span class="k">struct</span> <span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<pre><code class="language-crystal"><span class="k">struct</span> <span class="t">MyRule</span> <span class="o"><</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Rule</span><span class="t">::</span><span class="t">Base</span>
|
||||
<span class="k">def</span> <span class="m">test</span>(source)
|
||||
<span class="k">end</span>
|
||||
<span class="k">end</span>
|
||||
|
|
@ -1176,7 +1176,7 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L69" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L69" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1194,13 +1194,13 @@ though usually the macro <code>def_hash</code> can be used to generate this meth
|
|||
<p>Returns true if this rule is special and behaves differently than
|
||||
usual rules.</p>
|
||||
|
||||
<pre><code>my_rule.special? <span class="c"># => true or false</span></code></pre>
|
||||
<pre><code class="language-crystal">my_rule.special? <span class="c"># => true or false</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L109" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L109" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1216,7 +1216,7 @@ usual rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L42" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1241,7 +1241,7 @@ Must be overriten for other type of rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L38" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L38" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1269,7 +1269,7 @@ Must be overriten for other type of rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/base.cr#L121" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L121" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Layout - 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>
|
||||
|
||||
|
|
@ -586,21 +586,21 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/line_length.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/line_length.cr#L1" target="_blank">
|
||||
ameba/rule/layout/line_length.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_blank_lines.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_blank_lines.cr#L1" target="_blank">
|
||||
ameba/rule/layout/trailing_blank_lines.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_whitespace.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_whitespace.cr#L1" target="_blank">
|
||||
ameba/rule/layout/trailing_whitespace.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::Layout::LineLength - 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,9 +578,9 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/LineLength:
|
||||
<pre><code class="language-crystal">Layout/LineLength:
|
||||
Enabled: true
|
||||
MaxLength: 100</span></code></pre>
|
||||
MaxLength: 100</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -621,7 +621,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/line_length.cr#L12" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/line_length.cr#L12" target="_blank">
|
||||
ameba/rule/layout/line_length.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -924,15 +924,15 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/LineLength:
|
||||
<pre><code class="language-crystal">Layout/LineLength:
|
||||
Enabled: true
|
||||
MaxLength: 100</span></code></pre>
|
||||
MaxLength: 100</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/line_length.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/line_length.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1102,7 +1102,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/line_length.cr#L21" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/line_length.cr#L21" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Layout::TrailingBlankLines - 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,8 +578,8 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/TrailingBlankLines:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Layout/TrailingBlankLines:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -620,7 +620,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_blank_lines.cr#L11" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_blank_lines.cr#L11" target="_blank">
|
||||
ameba/rule/layout/trailing_blank_lines.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -918,14 +918,14 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/TrailingBlankLines:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Layout/TrailingBlankLines:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_blank_lines.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_blank_lines.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1067,7 +1067,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_blank_lines.cr#L19" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_blank_lines.cr#L19" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Layout::TrailingWhitespace - 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,8 +578,8 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/TrailingWhitespace:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Layout/TrailingWhitespace:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -620,7 +620,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_whitespace.cr#L11" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_whitespace.cr#L11" target="_blank">
|
||||
ameba/rule/layout/trailing_whitespace.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -913,14 +913,14 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Layout</span><span class="s">/TrailingWhitespace:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Layout/TrailingWhitespace:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_whitespace.cr#L11" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_whitespace.cr#L11" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1062,7 +1062,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/layout/trailing_whitespace.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/layout/trailing_whitespace.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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 - 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>
|
||||
|
||||
|
|
@ -586,168 +586,168 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/bad_directive.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/bad_directive.cr#L1" target="_blank">
|
||||
ameba/rule/lint/bad_directive.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/comparison_to_boolean.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/comparison_to_boolean.cr#L1" target="_blank">
|
||||
ameba/rule/lint/comparison_to_boolean.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/debugger_statement.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/debugger_statement.cr#L1" target="_blank">
|
||||
ameba/rule/lint/debugger_statement.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_ensure.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_ensure.cr#L1" target="_blank">
|
||||
ameba/rule/lint/empty_ensure.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_expression.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_expression.cr#L1" target="_blank">
|
||||
ameba/rule/lint/empty_expression.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/empty_loop.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/empty_loop.cr#L1" target="_blank">
|
||||
ameba/rule/lint/empty_loop.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/hash_duplicated_key.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/hash_duplicated_key.cr#L1" target="_blank">
|
||||
ameba/rule/lint/hash_duplicated_key.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_condition.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_condition.cr#L1" target="_blank">
|
||||
ameba/rule/lint/literal_in_condition.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/literal_in_interpolation.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/literal_in_interpolation.cr#L1" target="_blank">
|
||||
ameba/rule/lint/literal_in_interpolation.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/percent_array.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/percent_array.cr#L1" target="_blank">
|
||||
ameba/rule/lint/percent_array.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/rand_zero.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/rand_zero.cr#L1" target="_blank">
|
||||
ameba/rule/lint/rand_zero.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_string_coercion.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_string_coercion.cr#L1" target="_blank">
|
||||
ameba/rule/lint/redundant_string_coercion.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_with_index.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_index.cr#L1" target="_blank">
|
||||
ameba/rule/lint/redundant_with_index.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/redundant_with_object.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/redundant_with_object.cr#L1" target="_blank">
|
||||
ameba/rule/lint/redundant_with_object.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_argument.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_argument.cr#L1" target="_blank">
|
||||
ameba/rule/lint/shadowed_argument.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowed_exception.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowed_exception.cr#L1" target="_blank">
|
||||
ameba/rule/lint/shadowed_exception.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shadowing_local_outer_var.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shadowing_local_outer_var.cr#L1" target="_blank">
|
||||
ameba/rule/lint/shadowing_local_outer_var.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/shared_var_in_fiber.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/shared_var_in_fiber.cr#L1" target="_blank">
|
||||
ameba/rule/lint/shared_var_in_fiber.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/syntax.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/syntax.cr#L1" target="_blank">
|
||||
ameba/rule/lint/syntax.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unneeded_disable_directive.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unneeded_disable_directive.cr#L1" target="_blank">
|
||||
ameba/rule/lint/unneeded_disable_directive.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unreachable_code.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unreachable_code.cr#L1" target="_blank">
|
||||
ameba/rule/lint/unreachable_code.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/unused_argument.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/unused_argument.cr#L1" target="_blank">
|
||||
ameba/rule/lint/unused_argument.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_assign.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_assign.cr#L1" target="_blank">
|
||||
ameba/rule/lint/useless_assign.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/lint/useless_condition_in_when.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/lint/useless_condition_in_when.cr#L1" target="_blank">
|
||||
ameba/rule/lint/useless_condition_in_when.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"><</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"><</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>
|
||||
|
|
|
|||
|
|
@ -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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
|
||||
<p>And it has to written as this instead:</p>
|
||||
|
||||
<pre><code>h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</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">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>, <span class="s">"foo"</span> => <span class="n">3</span>}</code></pre>
|
||||
|
||||
<p>And it has to written as this instead:</p>
|
||||
|
||||
<pre><code>h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</span> => <span class="n">2</span>}</code></pre>
|
||||
<pre><code class="language-crystal">h <span class="o">=</span> {<span class="s">"foo"</span> => <span class="n">1</span>, <span class="s">"bar"</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>
|
||||
|
|
|
|||
|
|
@ -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">"something"</span>
|
||||
<pre><code class="language-crystal"><span class="k">if</span> <span class="s">"something"</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">"something"</span>
|
||||
<pre><code class="language-crystal"><span class="k">if</span> <span class="s">"something"</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>
|
||||
|
|
|
|||
|
|
@ -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">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<span class="s">"There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats"</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><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">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span><span class="n">:Ary</span><span class="i">}</span><span class="s">"</span>
|
||||
<span class="s">"There are </span><span class="i">#{</span><span class="n">4</span><span class="i">}</span><span class="s"> cats"</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><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>
|
||||
|
|
|
|||
|
|
@ -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("one", "two")</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: ',"'
|
||||
SymbolArrayUnwantedSymbols: ',:'</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("one", "two")</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: ',"'
|
||||
SymbolArrayUnwantedSymbols: ',:'</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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">"Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
|
||||
<p>And this is valid:</p>
|
||||
|
||||
<pre><code><span class="s">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><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">"Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span>name.to_s<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
|
||||
<p>And this is valid:</p>
|
||||
|
||||
<pre><code><span class="s">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="s">"Hello, </span><span class="i">#{</span>name<span class="i">}</span><span class="s">"</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"><</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"><</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"><</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"><</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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">></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">></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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"><<</span> <span class="s">" UTC"</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"><<</span> <span class="s">" UTC"</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"><<</span> <span class="s">" UTC"</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"><<</span> <span class="s">" UTC"</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>
|
||||
|
|
|
|||
|
|
@ -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::Metrics - 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>
|
||||
|
||||
|
|
@ -586,7 +586,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/metrics/cyclomatic_complexity.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/metrics/cyclomatic_complexity.cr#L1" target="_blank">
|
||||
ameba/rule/metrics/cyclomatic_complexity.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::Metrics::CyclomaticComplexity - 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,9 +578,9 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Metrics</span><span class="s">/CyclomaticComplexity:
|
||||
<pre><code class="language-crystal">Metrics/CyclomaticComplexity:
|
||||
Enabled: true
|
||||
MaxComplexity: 10</span></code></pre>
|
||||
MaxComplexity: 10</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -621,7 +621,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/metrics/cyclomatic_complexity.cr#L12" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/metrics/cyclomatic_complexity.cr#L12" target="_blank">
|
||||
ameba/rule/metrics/cyclomatic_complexity.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -924,15 +924,15 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Metrics</span><span class="s">/CyclomaticComplexity:
|
||||
<pre><code class="language-crystal">Metrics/CyclomaticComplexity:
|
||||
Enabled: true
|
||||
MaxComplexity: 10</span></code></pre>
|
||||
MaxComplexity: 10</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/metrics/cyclomatic_complexity.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/metrics/cyclomatic_complexity.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1102,7 +1102,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/metrics/cyclomatic_complexity.cr#L20" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/metrics/cyclomatic_complexity.cr#L20" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Performance - 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>
|
||||
|
||||
|
|
@ -586,21 +586,21 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/any_after_filter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/any_after_filter.cr#L1" target="_blank">
|
||||
ameba/rule/performance/any_after_filter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/first_last_after_filter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/first_last_after_filter.cr#L1" target="_blank">
|
||||
ameba/rule/performance/first_last_after_filter.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/size_after_filter.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/size_after_filter.cr#L1" target="_blank">
|
||||
ameba/rule/performance/size_after_filter.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::Performance::AnyAfterFilter - 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,21 +578,21 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.any?
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.any?
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].reject { <span class="o">|</span>e<span class="o">|</span> e <span class="o">>=</span> <span class="n">2</span> }.any?</code></pre>
|
||||
|
||||
<p>And it should be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o"><</span> <span class="n">2</span> }</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/AnyAfterFilter:
|
||||
<pre><code class="language-crystal">Performance/AnyAfterFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject</span></code></pre>
|
||||
- reject</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -633,7 +633,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/any_after_filter.cr#L28" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/any_after_filter.cr#L28" target="_blank">
|
||||
ameba/rule/performance/any_after_filter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -941,27 +941,27 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.any?
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.any?
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].reject { <span class="o">|</span>e<span class="o">|</span> e <span class="o">>=</span> <span class="n">2</span> }.any?</code></pre>
|
||||
|
||||
<p>And it should be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].any? { <span class="o">|</span>e<span class="o">|</span> e <span class="o"><</span> <span class="n">2</span> }</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/AnyAfterFilter:
|
||||
<pre><code class="language-crystal">Performance/AnyAfterFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject</span></code></pre>
|
||||
- reject</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/any_after_filter.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/any_after_filter.cr#L28" 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/performance/any_after_filter.cr#L37" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/any_after_filter.cr#L37" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Performance::FirstLastAfterFilter - 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 considered inefficient:</p>
|
||||
|
||||
<pre><code>[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.first?
|
||||
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.first?
|
||||
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.last?</code></pre>
|
||||
|
||||
<p>And can be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }
|
||||
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].reverse_each.find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/FirstLastAfterFilter
|
||||
<pre><code class="language-crystal">Performance/FirstLastAfterFilter
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select</span></code></pre>
|
||||
- select</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -632,7 +632,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/first_last_after_filter.cr#L27" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/first_last_after_filter.cr#L27" target="_blank">
|
||||
ameba/rule/performance/first_last_after_filter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -950,26 +950,26 @@
|
|||
|
||||
<p>For example, this is considered inefficient:</p>
|
||||
|
||||
<pre><code>[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.first?
|
||||
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.first?
|
||||
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }.last?</code></pre>
|
||||
|
||||
<p>And can be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }
|
||||
[<span class="n">-1</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].reverse_each.find { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">0</span> }</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/FirstLastAfterFilter
|
||||
<pre><code class="language-crystal">Performance/FirstLastAfterFilter
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select</span></code></pre>
|
||||
- select</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/first_last_after_filter.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/first_last_after_filter.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1139,7 +1139,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/first_last_after_filter.cr#L46" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/first_last_after_filter.cr#L46" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1155,7 +1155,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/first_last_after_filter.cr#L37" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/first_last_after_filter.cr#L37" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Performance::SizeAfterFilter - 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="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.size
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.size
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].reject { <span class="o">|</span>e<span class="o">|</span> e <span class="o"><</span> <span class="n">2</span> }.size
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span>(<span class="o">&</span>.<span class="o"><</span> <span class="n">2</span>).size
|
||||
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span>(<span class="o">&</span>.zero?).size
|
||||
|
|
@ -586,7 +586,7 @@
|
|||
|
||||
<p>And it should be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">>=</span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count(<span class="o">&</span>.<span class="o"><</span> <span class="n">2</span>)
|
||||
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&</span>.zero?)
|
||||
|
|
@ -594,11 +594,11 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/SizeAfterFilter:
|
||||
<pre><code class="language-crystal">Performance/SizeAfterFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject</span></code></pre>
|
||||
- reject</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -639,7 +639,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/size_after_filter.cr#L34" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/size_after_filter.cr#L34" target="_blank">
|
||||
ameba/rule/performance/size_after_filter.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -952,7 +952,7 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.size
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span> { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }.size
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].reject { <span class="o">|</span>e<span class="o">|</span> e <span class="o"><</span> <span class="n">2</span> }.size
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].<span class="k">select</span>(<span class="o">&</span>.<span class="o"><</span> <span class="n">2</span>).size
|
||||
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].<span class="k">select</span>(<span class="o">&</span>.zero?).size
|
||||
|
|
@ -960,7 +960,7 @@
|
|||
|
||||
<p>And it should be written as this:</p>
|
||||
|
||||
<pre><code>[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
<pre><code class="language-crystal">[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">></span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count { <span class="o">|</span>e<span class="o">|</span> e <span class="o">>=</span> <span class="n">2</span> }
|
||||
[<span class="n">1</span>, <span class="n">2</span>, <span class="n">3</span>].count(<span class="o">&</span>.<span class="o"><</span> <span class="n">2</span>)
|
||||
[<span class="n">0</span>, <span class="n">1</span>, <span class="n">2</span>].count(<span class="o">&</span>.zero?)
|
||||
|
|
@ -968,17 +968,17 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Performance</span><span class="s">/SizeAfterFilter:
|
||||
<pre><code class="language-crystal">Performance/SizeAfterFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject</span></code></pre>
|
||||
- reject</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/size_after_filter.cr#L34" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/size_after_filter.cr#L34" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1148,7 +1148,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/size_after_filter.cr#L52" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/size_after_filter.cr#L52" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1164,7 +1164,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/performance/size_after_filter.cr#L43" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/performance/size_after_filter.cr#L43" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style - 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>
|
||||
|
||||
|
|
@ -586,91 +586,91 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/constant_names.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/constant_names.cr#L1" target="_blank">
|
||||
ameba/rule/style/constant_names.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/is_a_nil.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/is_a_nil.cr#L1" target="_blank">
|
||||
ameba/rule/style/is_a_nil.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/large_numbers.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/large_numbers.cr#L1" target="_blank">
|
||||
ameba/rule/style/large_numbers.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/method_names.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/method_names.cr#L1" target="_blank">
|
||||
ameba/rule/style/method_names.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/negated_conditions_in_unless.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/negated_conditions_in_unless.cr#L1" target="_blank">
|
||||
ameba/rule/style/negated_conditions_in_unless.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/predicate_name.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/predicate_name.cr#L1" target="_blank">
|
||||
ameba/rule/style/predicate_name.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_begin.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_begin.cr#L1" target="_blank">
|
||||
ameba/rule/style/redundant_begin.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_next.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_next.cr#L1" target="_blank">
|
||||
ameba/rule/style/redundant_next.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_return.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_return.cr#L1" target="_blank">
|
||||
ameba/rule/style/redundant_return.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L1" target="_blank">
|
||||
ameba/rule/style/type_names.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/unless_else.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/unless_else.cr#L1" target="_blank">
|
||||
ameba/rule/style/unless_else.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L1" target="_blank">
|
||||
ameba/rule/style/variable_names.cr
|
||||
</a>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/while_true.cr#L1" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/while_true.cr#L1" target="_blank">
|
||||
ameba/rule/style/while_true.cr
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -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::Style::ConstantNames - 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,18 +578,18 @@
|
|||
|
||||
<p>For example, these constant names are considered valid:</p>
|
||||
|
||||
<pre><code><span class="t">LUCKY_NUMBERS</span> <span class="o">=</span> [<span class="n">3</span>, <span class="n">7</span>, <span class="n">11</span>]
|
||||
<pre><code class="language-crystal"><span class="t">LUCKY_NUMBERS</span> <span class="o">=</span> [<span class="n">3</span>, <span class="n">7</span>, <span class="n">11</span>]
|
||||
<span class="t">DOCUMENTATION_URL</span> <span class="o">=</span> <span class="s">"http://crystal-lang.org/docs"</span></code></pre>
|
||||
|
||||
<p>And these are invalid names:</p>
|
||||
|
||||
<pre><code>myBadConstant <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">myBadConstant <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="t">Wrong_NAME</span> <span class="o">=</span> <span class="n">2</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/ConstantNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/ConstantNames:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -630,7 +630,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/constant_names.cr#L25" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/constant_names.cr#L25" target="_blank">
|
||||
ameba/rule/style/constant_names.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -923,24 +923,24 @@
|
|||
|
||||
<p>For example, these constant names are considered valid:</p>
|
||||
|
||||
<pre><code><span class="t">LUCKY_NUMBERS</span> <span class="o">=</span> [<span class="n">3</span>, <span class="n">7</span>, <span class="n">11</span>]
|
||||
<pre><code class="language-crystal"><span class="t">LUCKY_NUMBERS</span> <span class="o">=</span> [<span class="n">3</span>, <span class="n">7</span>, <span class="n">11</span>]
|
||||
<span class="t">DOCUMENTATION_URL</span> <span class="o">=</span> <span class="s">"http://crystal-lang.org/docs"</span></code></pre>
|
||||
|
||||
<p>And these are invalid names:</p>
|
||||
|
||||
<pre><code>myBadConstant <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">myBadConstant <span class="o">=</span> <span class="n">1</span>
|
||||
<span class="t">Wrong_NAME</span> <span class="o">=</span> <span class="n">2</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/ConstantNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/ConstantNames:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/constant_names.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/constant_names.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1082,7 +1082,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/constant_names.cr#L32" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/constant_names.cr#L32" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::IsANil - 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 bad:</p>
|
||||
|
||||
<pre><code>var.<span class="k">is_a?</span> <span class="t">Nil</span></code></pre>
|
||||
<pre><code class="language-crystal">var.<span class="k">is_a?</span> <span class="t">Nil</span></code></pre>
|
||||
|
||||
<p>And needs to be written as:</p>
|
||||
|
||||
<pre><code>var.<span class="k">nil?</span></code></pre>
|
||||
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/IsANil:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/IsANil:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -628,7 +628,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/is_a_nil.cr#L23" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/is_a_nil.cr#L23" target="_blank">
|
||||
ameba/rule/style/is_a_nil.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -926,22 +926,22 @@
|
|||
|
||||
<p>This is considered bad:</p>
|
||||
|
||||
<pre><code>var.<span class="k">is_a?</span> <span class="t">Nil</span></code></pre>
|
||||
<pre><code class="language-crystal">var.<span class="k">is_a?</span> <span class="t">Nil</span></code></pre>
|
||||
|
||||
<p>And needs to be written as:</p>
|
||||
|
||||
<pre><code>var.<span class="k">nil?</span></code></pre>
|
||||
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/IsANil:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/IsANil:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/is_a_nil.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/is_a_nil.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1083,7 +1083,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/is_a_nil.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/is_a_nil.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::LargeNumbers - 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,21 +580,21 @@ large numbers more easily.</p>
|
|||
|
||||
<p>For example, these are considered invalid:</p>
|
||||
|
||||
<pre><code><span class="n">10000</span>
|
||||
<pre><code class="language-crystal"><span class="n">10000</span>
|
||||
<span class="n">141592654</span>
|
||||
<span class="n">5.12345</span></code></pre>
|
||||
|
||||
<p>And has to be rewritten as the following:</p>
|
||||
|
||||
<pre><code><span class="n">10_000</span>
|
||||
<pre><code class="language-crystal"><span class="n">10_000</span>
|
||||
<span class="n">141_592_654</span>
|
||||
<span class="n">5.123_45</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/LargeNumbers:
|
||||
<pre><code class="language-crystal">Style/LargeNumbers:
|
||||
Enabled: true
|
||||
IntMinDigits: 5 # i.e. integers higher than 9999</span></code></pre>
|
||||
IntMinDigits: 5 # i.e. integers higher than 9999</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ large numbers more easily.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/large_numbers.cr#L30" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/large_numbers.cr#L30" target="_blank">
|
||||
ameba/rule/style/large_numbers.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -940,27 +940,27 @@ large numbers more easily.</p>
|
|||
|
||||
<p>For example, these are considered invalid:</p>
|
||||
|
||||
<pre><code><span class="n">10000</span>
|
||||
<pre><code class="language-crystal"><span class="n">10000</span>
|
||||
<span class="n">141592654</span>
|
||||
<span class="n">5.12345</span></code></pre>
|
||||
|
||||
<p>And has to be rewritten as the following:</p>
|
||||
|
||||
<pre><code><span class="n">10_000</span>
|
||||
<pre><code class="language-crystal"><span class="n">10_000</span>
|
||||
<span class="n">141_592_654</span>
|
||||
<span class="n">5.123_45</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/LargeNumbers:
|
||||
<pre><code class="language-crystal">Style/LargeNumbers:
|
||||
Enabled: true
|
||||
IntMinDigits: 5 # i.e. integers higher than 9999</span></code></pre>
|
||||
IntMinDigits: 5 # i.e. integers higher than 9999</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/large_numbers.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/large_numbers.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1130,7 +1130,7 @@ large numbers more easily.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/large_numbers.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/large_numbers.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::MethodNames - 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 valid:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">Person</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">Person</span>
|
||||
<span class="k">def</span> <span class="m">first_name</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -591,7 +591,7 @@
|
|||
|
||||
<p>And these are invalid method names:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">Person</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">Person</span>
|
||||
<span class="k">def</span> <span class="m">firstName</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -604,8 +604,8 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/MethodNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/MethodNames:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -646,7 +646,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/method_names.cr#L41" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/method_names.cr#L41" target="_blank">
|
||||
ameba/rule/style/method_names.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -939,7 +939,7 @@
|
|||
|
||||
<p>For example, these are considered valid:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">Person</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">Person</span>
|
||||
<span class="k">def</span> <span class="m">first_name</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -952,7 +952,7 @@
|
|||
|
||||
<p>And these are invalid method names:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">Person</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">Person</span>
|
||||
<span class="k">def</span> <span class="m">firstName</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -965,14 +965,14 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/MethodNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/MethodNames:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/method_names.cr#L41" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/method_names.cr#L41" 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/style/method_names.cr#L48" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/method_names.cr#L48" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::NegatedConditionsInUnless - 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,13 +578,13 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> <span class="o">!</span>s.empty?
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> <span class="o">!</span>s.empty?
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>And should be rewritten to the following:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> s.emtpy?
|
||||
<pre><code class="language-crystal"><span class="k">if</span> s.emtpy?
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -593,8 +593,8 @@ that is executed if a negated condition is NOT met.</p>
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/NegatedConditionsInUnless:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ that is executed if a negated condition is NOT met.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/negated_conditions_in_unless.cr#L30" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/negated_conditions_in_unless.cr#L30" target="_blank">
|
||||
ameba/rule/style/negated_conditions_in_unless.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -928,13 +928,13 @@ that is executed if a negated condition is NOT met.</p>
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> <span class="o">!</span>s.empty?
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> <span class="o">!</span>s.empty?
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>And should be rewritten to the following:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> s.emtpy?
|
||||
<pre><code class="language-crystal"><span class="k">if</span> s.emtpy?
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -943,14 +943,14 @@ that is executed if a negated condition is NOT met.</p>
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/NegatedConditionsInUnless:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/negated_conditions_in_unless.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/negated_conditions_in_unless.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1092,7 +1092,7 @@ that is executed if a negated condition is NOT met.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/negated_conditions_in_unless.cr#L37" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/negated_conditions_in_unless.cr#L37" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::PredicateName - 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 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>Favour these:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">valid?</span>(x)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">valid?</span>(x)
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="m">picture?</span>(x)
|
||||
|
|
@ -587,7 +587,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>Over these:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">is_valid?</span>(x)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">is_valid?</span>(x)
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="m">has_picture?</span>(x)
|
||||
|
|
@ -595,8 +595,8 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/PredicateName:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/PredicateName:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -637,7 +637,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/predicate_name.cr#L32" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/predicate_name.cr#L32" target="_blank">
|
||||
ameba/rule/style/predicate_name.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -931,7 +931,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>Favour these:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">valid?</span>(x)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">valid?</span>(x)
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="m">picture?</span>(x)
|
||||
|
|
@ -939,7 +939,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>Over these:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">is_valid?</span>(x)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">is_valid?</span>(x)
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">def</span> <span class="m">has_picture?</span>(x)
|
||||
|
|
@ -947,14 +947,14 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/PredicateName:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/PredicateName:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/predicate_name.cr#L32" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/predicate_name.cr#L32" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1096,7 +1096,7 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/predicate_name.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/predicate_name.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::RedundantBegin - 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>
|
||||
|
||||
|
|
@ -582,7 +582,7 @@
|
|||
|
||||
<p>For example, this:</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>
|
||||
<span class="k">begin</span>
|
||||
read_content
|
||||
<span class="k">rescue</span>
|
||||
|
|
@ -592,7 +592,7 @@
|
|||
|
||||
<p>should be rewritten as:</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>
|
||||
read_content
|
||||
<span class="k">rescue</span>
|
||||
close_file
|
||||
|
|
@ -602,7 +602,7 @@
|
|||
|
||||
<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>
|
||||
<span class="k">begin</span>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
b <span class="o">=</span> <span class="n">2</span>
|
||||
|
|
@ -611,15 +611,15 @@
|
|||
|
||||
<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>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
b <span class="o">=</span> <span class="n">2</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantBegin:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/RedundantBegin:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -662,7 +662,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_begin.cr#L59" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_begin.cr#L59" target="_blank">
|
||||
ameba/rule/style/redundant_begin.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -1013,7 +1013,7 @@
|
|||
|
||||
<p>For example, this:</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>
|
||||
<span class="k">begin</span>
|
||||
read_content
|
||||
<span class="k">rescue</span>
|
||||
|
|
@ -1023,7 +1023,7 @@
|
|||
|
||||
<p>should be rewritten as:</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>
|
||||
read_content
|
||||
<span class="k">rescue</span>
|
||||
close_file
|
||||
|
|
@ -1033,7 +1033,7 @@
|
|||
|
||||
<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>
|
||||
<span class="k">begin</span>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
b <span class="o">=</span> <span class="n">2</span>
|
||||
|
|
@ -1042,21 +1042,21 @@
|
|||
|
||||
<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>
|
||||
a <span class="o">=</span> <span class="n">1</span>
|
||||
b <span class="o">=</span> <span class="n">2</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantBegin:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/RedundantBegin:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_begin.cr#L59" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_begin.cr#L59" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1198,7 +1198,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::RedundantNext - 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,11 +581,11 @@ into the node which is the last in a block.</p>
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">next</span> v <span class="o">+</span> <span class="n">1</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">case</span> v
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="k">next</span> <span class="s">"nil"</span>
|
||||
|
|
@ -598,11 +598,11 @@ into the node which is the last in a block.</p>
|
|||
|
||||
<p>And has to be written as the following:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
v <span class="o">+</span> <span class="n">1</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="s">"nil"</span>
|
||||
|
|
@ -624,13 +624,13 @@ into the node which is the last in a block.</p>
|
|||
<p>Allows end-user to configure whether to report or not the next statements
|
||||
which yield tuple literals i.e.</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
<span class="k">next</span> a, b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the block above will be forced to be written as:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
{a, b}
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -639,14 +639,14 @@ which yield tuple literals i.e.</p>
|
|||
<p>Allows end-user to configure whether to report or not the next statements
|
||||
without arguments. Sometimes such statements are used to yild the <code>nil</code> value explicitly.</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="k">next</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the block above will be forced to be written as:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="n">nil</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
|
@ -657,10 +657,10 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantNext:
|
||||
<pre><code class="language-crystal">Style/RedundantNext:
|
||||
Enabled: true
|
||||
AllowMultiNext: true
|
||||
AllowEmptyNext: true</span></code></pre>
|
||||
AllowEmptyNext: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -701,7 +701,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
|
||||
ameba/rule/style/redundant_next.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -1022,11 +1022,11 @@ into the node which is the last in a block.</p>
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">next</span> v <span class="o">+</span> <span class="n">1</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">case</span> v
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="k">next</span> <span class="s">"nil"</span>
|
||||
|
|
@ -1039,11 +1039,11 @@ into the node which is the last in a block.</p>
|
|||
|
||||
<p>And has to be written as the following:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
v <span class="o">+</span> <span class="n">1</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code>block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span> <span class="o">|</span>v<span class="o">|</span>
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="s">"nil"</span>
|
||||
|
|
@ -1065,13 +1065,13 @@ into the node which is the last in a block.</p>
|
|||
<p>Allows end-user to configure whether to report or not the next statements
|
||||
which yield tuple literals i.e.</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
<span class="k">next</span> a, b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the block above will be forced to be written as:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
{a, b}
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -1080,14 +1080,14 @@ which yield tuple literals i.e.</p>
|
|||
<p>Allows end-user to configure whether to report or not the next statements
|
||||
without arguments. Sometimes such statements are used to yild the <code>nil</code> value explicitly.</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="k">next</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the block above will be forced to be written as:</p>
|
||||
|
||||
<pre><code>block <span class="k">do</span>
|
||||
<pre><code class="language-crystal">block <span class="k">do</span>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="n">nil</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
|
@ -1098,16 +1098,16 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantNext:
|
||||
<pre><code class="language-crystal">Style/RedundantNext:
|
||||
Enabled: true
|
||||
AllowMultiNext: true
|
||||
AllowEmptyNext: true</span></code></pre>
|
||||
AllowEmptyNext: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1305,7 +1305,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_next.cr#L112" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_next.cr#L112" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1321,7 +1321,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_next.cr#L108" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_next.cr#L108" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::RedundantReturn - 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,11 +578,11 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foo</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foo</span>
|
||||
<span class="k">return</span> <span class="n">:bar</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="k">return</span> <span class="s">"nil"</span>
|
||||
|
|
@ -595,11 +595,11 @@
|
|||
|
||||
<p>And has to be written as the following:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foo</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foo</span>
|
||||
<span class="n">:bar</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="s">"nil"</span>
|
||||
|
|
@ -621,13 +621,13 @@
|
|||
<p>Allows end-user to configure whether to report or not the return statements
|
||||
which return tuple literals i.e.</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)
|
||||
<span class="k">return</span> a, b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the method above has to 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, b}
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -636,14 +636,14 @@ which return tuple literals i.e.</p>
|
|||
<p>Allows end-user to configure whether to report or not the return statements
|
||||
without arguments. Sometimes such returns are used to return the <code>nil</code> value explicitly.</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>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="k">return</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the method above has to be written as:</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>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="n">nil</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
|
@ -654,10 +654,10 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantReturn:
|
||||
<pre><code class="language-crystal">Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMutliReturn: true
|
||||
AllowEmptyReturn: true</span></code></pre>
|
||||
AllowEmptyReturn: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -698,7 +698,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
|
||||
ameba/rule/style/redundant_return.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -1016,11 +1016,11 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foo</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foo</span>
|
||||
<span class="k">return</span> <span class="n">:bar</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="k">return</span> <span class="s">"nil"</span>
|
||||
|
|
@ -1033,11 +1033,11 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
|
||||
<p>And has to be written as the following:</p>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">foo</span>
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">foo</span>
|
||||
<span class="n">:bar</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<pre><code><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<pre><code class="language-crystal"><span class="k">def</span> <span class="m">bar</span>(arg)
|
||||
<span class="k">case</span> arg
|
||||
<span class="k">when</span> .<span class="k">nil?</span>
|
||||
<span class="s">"nil"</span>
|
||||
|
|
@ -1059,13 +1059,13 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
<p>Allows end-user to configure whether to report or not the return statements
|
||||
which return tuple literals i.e.</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)
|
||||
<span class="k">return</span> a, b
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the method above has to 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, b}
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
|
|
@ -1074,14 +1074,14 @@ which return tuple literals i.e.</p>
|
|||
<p>Allows end-user to configure whether to report or not the return statements
|
||||
without arguments. Sometimes such returns are used to return the <code>nil</code> value explicitly.</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>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="k">return</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>If this param equals to <code>false</code>, the method above has to be written as:</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>
|
||||
@foo <span class="o">=</span> <span class="n">:empty</span>
|
||||
<span class="n">nil</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
|
|
@ -1092,16 +1092,16 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/RedundantReturn:
|
||||
<pre><code class="language-crystal">Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMutliReturn: true
|
||||
AllowEmptyReturn: true</span></code></pre>
|
||||
AllowEmptyReturn: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1299,7 +1299,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_return.cr#L109" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_return.cr#L109" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1315,7 +1315,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/redundant_return.cr#L105" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/redundant_return.cr#L105" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::TypeNames - 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 valid:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">ParseError</span> <span class="o"><</span> <span class="t">Exception</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">ParseError</span> <span class="o"><</span> <span class="t">Exception</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">module</span> <span class="t">HTTP</span>
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
|
||||
<p>And these are invalid type names</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">My_class</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">My_class</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">module</span> <span class="t">HTT_p</span>
|
||||
|
|
@ -618,8 +618,8 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/TypeNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/TypeNames:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -660,7 +660,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L55" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L55" target="_blank">
|
||||
ameba/rule/style/type_names.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -973,7 +973,7 @@
|
|||
|
||||
<p>For example, these are considered valid:</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">ParseError</span> <span class="o"><</span> <span class="t">Exception</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">ParseError</span> <span class="o"><</span> <span class="t">Exception</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">module</span> <span class="t">HTTP</span>
|
||||
|
|
@ -994,7 +994,7 @@
|
|||
|
||||
<p>And these are invalid type names</p>
|
||||
|
||||
<pre><code><span class="k">class</span> <span class="t">My_class</span>
|
||||
<pre><code class="language-crystal"><span class="k">class</span> <span class="t">My_class</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="k">module</span> <span class="t">HTT_p</span>
|
||||
|
|
@ -1013,14 +1013,14 @@
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/TypeNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/TypeNames:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L55" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L55" 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/style/type_names.cr#L70" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L70" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1178,7 +1178,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L74" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L74" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1194,7 +1194,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L78" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L78" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1210,7 +1210,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L82" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L82" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1226,7 +1226,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/type_names.cr#L86" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/type_names.cr#L86" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::UnlessElse - 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, the rule considers these valid:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> something
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> something
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -590,7 +590,7 @@
|
|||
|
||||
<p>But it considers this one invalid as it is an <code>unless</code> with an <code>else</code>:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> something
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> something
|
||||
<span class="n">:one</span>
|
||||
<span class="k">else</span>
|
||||
<span class="n">:two</span>
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
<p>The solution is to swap the order of the blocks, and change the <code>unless</code> to
|
||||
an <code>if</code>, so the previous invalid example would become this:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> something
|
||||
<pre><code class="language-crystal"><span class="k">if</span> something
|
||||
<span class="n">:two</span>
|
||||
<span class="k">else</span>
|
||||
<span class="n">:one</span>
|
||||
|
|
@ -607,8 +607,8 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/UnlessElse:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/UnlessElse:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -649,7 +649,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/unless_else.cr#L46" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/unless_else.cr#L46" target="_blank">
|
||||
ameba/rule/style/unless_else.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -942,7 +942,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
|
||||
<p>For example, the rule considers these valid:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> something
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> something
|
||||
<span class="n">:ok</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
|
|
@ -954,7 +954,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
|
||||
<p>But it considers this one invalid as it is an <code>unless</code> with an <code>else</code>:</p>
|
||||
|
||||
<pre><code><span class="k">unless</span> something
|
||||
<pre><code class="language-crystal"><span class="k">unless</span> something
|
||||
<span class="n">:one</span>
|
||||
<span class="k">else</span>
|
||||
<span class="n">:two</span>
|
||||
|
|
@ -963,7 +963,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
<p>The solution is to swap the order of the blocks, and change the <code>unless</code> to
|
||||
an <code>if</code>, so the previous invalid example would become this:</p>
|
||||
|
||||
<pre><code><span class="k">if</span> something
|
||||
<pre><code class="language-crystal"><span class="k">if</span> something
|
||||
<span class="n">:two</span>
|
||||
<span class="k">else</span>
|
||||
<span class="n">:one</span>
|
||||
|
|
@ -971,14 +971,14 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/UnlessElse:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/UnlessElse:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/unless_else.cr#L46" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/unless_else.cr#L46" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1120,7 +1120,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/unless_else.cr#L53" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/unless_else.cr#L53" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::VariableNames - 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,19 +578,19 @@
|
|||
|
||||
<p>For example, these variable names are considered valid:</p>
|
||||
|
||||
<pre><code>var_name <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">var_name <span class="o">=</span> <span class="n">1</span>
|
||||
name <span class="o">=</span> <span class="n">2</span>
|
||||
_another_good_name <span class="o">=</span> <span class="n">3</span></code></pre>
|
||||
|
||||
<p>And these are invalid variable names:</p>
|
||||
|
||||
<pre><code>myBadNamedVar <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">myBadNamedVar <span class="o">=</span> <span class="n">1</span>
|
||||
wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/VariableNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/VariableNames:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -631,7 +631,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L26" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L26" target="_blank">
|
||||
ameba/rule/style/variable_names.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -934,25 +934,25 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
|
||||
<p>For example, these variable names are considered valid:</p>
|
||||
|
||||
<pre><code>var_name <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">var_name <span class="o">=</span> <span class="n">1</span>
|
||||
name <span class="o">=</span> <span class="n">2</span>
|
||||
_another_good_name <span class="o">=</span> <span class="n">3</span></code></pre>
|
||||
|
||||
<p>And these are invalid variable names:</p>
|
||||
|
||||
<pre><code>myBadNamedVar <span class="o">=</span> <span class="n">1</span>
|
||||
<pre><code class="language-crystal">myBadNamedVar <span class="o">=</span> <span class="n">1</span>
|
||||
wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/VariableNames:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/VariableNames:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L26" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L26" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1094,7 +1094,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1110,7 +1110,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L43" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L43" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1126,7 +1126,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/variable_names.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/variable_names.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Style::WhileTrue - 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">while</span> <span class="n">true</span>
|
||||
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">true</span>
|
||||
do_something
|
||||
<span class="k">break</span> <span class="k">if</span> some_condition
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>And should be replaced by the following:</p>
|
||||
|
||||
<pre><code>loop <span class="k">do</span>
|
||||
<pre><code class="language-crystal">loop <span class="k">do</span>
|
||||
do_something
|
||||
<span class="k">break</span> <span class="k">if</span> some_condition
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/WhileTrue:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/WhileTrue:
|
||||
Enabled: true</code></pre>
|
||||
|
||||
|
||||
|
||||
|
|
@ -634,7 +634,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/while_true.cr#L29" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/while_true.cr#L29" target="_blank">
|
||||
ameba/rule/style/while_true.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -927,28 +927,28 @@
|
|||
|
||||
<p>For example, this is considered invalid:</p>
|
||||
|
||||
<pre><code><span class="k">while</span> <span class="n">true</span>
|
||||
<pre><code class="language-crystal"><span class="k">while</span> <span class="n">true</span>
|
||||
do_something
|
||||
<span class="k">break</span> <span class="k">if</span> some_condition
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>And should be replaced by the following:</p>
|
||||
|
||||
<pre><code>loop <span class="k">do</span>
|
||||
<pre><code class="language-crystal">loop <span class="k">do</span>
|
||||
do_something
|
||||
<span class="k">break</span> <span class="k">if</span> some_condition
|
||||
<span class="k">end</span></code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code><span class="t">Style</span><span class="s">/WhileTrue:
|
||||
Enabled: true</span></code></pre>
|
||||
<pre><code class="language-crystal">Style/WhileTrue:
|
||||
Enabled: true</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/while_true.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/while_true.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1090,7 +1090,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/rule/style/while_true.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/style/while_true.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Runner - 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 @@ Holds a list of rules to do inspection based on,
|
|||
list of sources to run inspection on and a formatter
|
||||
to prepare a report.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
runner.run.success? <span class="c"># => true or false</span></code></pre>
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ runner.run.success? <span class="c"># => true or false</span></code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L13" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L13" target="_blank">
|
||||
ameba/runner.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -730,7 +730,7 @@ runner.run.success? <span class="c"># => true or false</span></code></pre>
|
|||
|
||||
<p>Instantiates a runner using a <code>config</code>.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.files <span class="o">=</span> files
|
||||
config.formatter <span class="o">=</span> formatter
|
||||
|
||||
|
|
@ -740,7 +740,7 @@ config.formatter <span class="o">=</span> formatter
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L42" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -774,7 +774,7 @@ config.formatter <span class="o">=</span> formatter
|
|||
<p>Runner should perform inspection before doing the explain.
|
||||
This is necessary to be able to find the issue at a specified location.</p>
|
||||
|
||||
<pre><code>runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
<pre><code class="language-crystal">runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
runner.run
|
||||
runner.explain({file: file, line: l, column: c})</code></pre>
|
||||
</div>
|
||||
|
|
@ -782,7 +782,7 @@ runner.explain({file: file, line: l, column: c})</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L118" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L118" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -804,14 +804,14 @@ an issue to that source.</p>
|
|||
<p>This action also notifies formatter when inspection is started/finished,
|
||||
and when a specific source started/finished to be inspected.</p>
|
||||
|
||||
<pre><code>runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
<pre><code class="language-crystal">runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
runner.run <span class="c"># => returns runner again</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L69" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L69" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -832,7 +832,7 @@ runner.run <span class="c"># => returns runner again</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L18" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L18" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -850,7 +850,7 @@ runner.run <span class="c"># => returns runner again</span></code></pre>
|
|||
<p>Indicates whether the last inspection successful or not.
|
||||
It returns true if no issues matching severity in sources found, false otherwise.</p>
|
||||
|
||||
<pre><code>runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
<pre><code class="language-crystal">runner <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Runner</span>.<span class="k">new</span> config
|
||||
runner.run
|
||||
runner.success? <span class="c"># => true or false</span></code></pre>
|
||||
</div>
|
||||
|
|
@ -858,7 +858,7 @@ runner.success? <span class="c"># => true or false</span></code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/runner.cr#L131" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/runner.cr#L131" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Severity - 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>
|
||||
|
||||
|
|
@ -586,7 +586,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L2" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L2" target="_blank">
|
||||
ameba/severity.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -755,14 +755,14 @@
|
|||
|
||||
<p>Creates Severity by the name.</p>
|
||||
|
||||
<pre><code><span class="t">Severity</span>.parse(<span class="s">"convention"</span>) <span class="c"># => Severity::Convention</span>
|
||||
<pre><code class="language-crystal"><span class="t">Severity</span>.parse(<span class="s">"convention"</span>) <span class="c"># => Severity::Convention</span>
|
||||
<span class="t">Severity</span>.parse(<span class="s">"foo-bar"</span>) <span class="c"># => Exception: Incorrect severity name</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L23" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L23" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -790,7 +790,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L5" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L5" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -806,7 +806,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L3" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L3" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -823,13 +823,13 @@
|
|||
|
||||
<p>Returns a symbol uniquely indicating severity.</p>
|
||||
|
||||
<pre><code><span class="t">Severity</span><span class="t">::</span><span class="t">Warning</span>.symbol <span class="c"># => 'W'</span></code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Severity</span><span class="t">::</span><span class="t">Warning</span>.symbol <span class="c"># => 'W'</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -845,7 +845,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L4" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L4" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::SeverityYamlConverter - 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>
|
||||
|
||||
|
|
@ -599,7 +599,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L31" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L31" target="_blank">
|
||||
ameba/severity.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -687,7 +687,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L32" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L32" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -703,7 +703,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/severity.cr#L45" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/severity.cr#L45" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Source - 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>
|
||||
|
||||
|
|
@ -616,7 +616,7 @@ Has path, lines of code and issues reported by rules.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L4" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L4" target="_blank">
|
||||
ameba/source.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -812,14 +812,14 @@ Has path, lines of code and issues reported by rules.</p>
|
|||
|
||||
<p>For example:</p>
|
||||
|
||||
<pre><code>path <span class="o">=</span> <span class="s">"./src/source.cr"</span>
|
||||
<pre><code class="language-crystal">path <span class="o">=</span> <span class="s">"./src/source.cr"</span>
|
||||
<span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> <span class="t">File</span>.read(path), path</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L27" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L27" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -850,14 +850,14 @@ Has path, lines of code and issues reported by rules.</p>
|
|||
|
||||
<p>Returns AST nodes constructed by <code>Crystal::Parser</code>.</p>
|
||||
|
||||
<pre><code>source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
source.ast</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L52" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L52" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -878,7 +878,7 @@ source.ast</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L12" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L12" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -894,7 +894,7 @@ source.ast</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L60" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L60" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -915,14 +915,14 @@ method caches lines in an instance variable, so calling
|
|||
it second time will not perform a split, but will return
|
||||
lines instantly.</p>
|
||||
|
||||
<pre><code>source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> <span class="s">"a = 1\nb = 2"</span>, path
|
||||
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> <span class="s">"a = 1\nb = 2"</span>, path
|
||||
source.lines <span class="c"># => ["a = 1", "b = 2"]</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L41" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L41" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -943,7 +943,7 @@ source.lines <span class="c"># => ["a = 1", "b = 2"]</spa
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L65" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L65" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -964,7 +964,7 @@ source.lines <span class="c"># => ["a = 1", "b = 2"]</spa
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/source.cr#L9" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/source.cr#L9" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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::Tokenizer - 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>
|
||||
|
||||
|
|
@ -576,7 +576,7 @@
|
|||
|
||||
<p>Represents Crystal syntax tokenizer based on <code>Crystal::Lexer</code>.</p>
|
||||
|
||||
<pre><code>source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
tokenizer <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Tokenizer</span>.<span class="k">new</span>(source)
|
||||
tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class="o">|</span>
|
||||
puts token
|
||||
|
|
@ -605,7 +605,7 @@ tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/tokenizer.cr#L14" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/tokenizer.cr#L14" target="_blank">
|
||||
ameba/tokenizer.cr
|
||||
</a>
|
||||
|
||||
|
|
@ -715,14 +715,14 @@ tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class
|
|||
|
||||
<p>Instantiates Tokenizer using a <code>lexer</code>.</p>
|
||||
|
||||
<pre><code>lexer <span class="o">=</span> <span class="t">Crystal</span><span class="t">::</span><span class="t">Lexer</span>.<span class="k">new</span>(code)
|
||||
<pre><code class="language-crystal">lexer <span class="o">=</span> <span class="t">Crystal</span><span class="t">::</span><span class="t">Lexer</span>.<span class="k">new</span>(code)
|
||||
<span class="t">Ameba</span><span class="t">::</span><span class="t">Tokenizer</span>.<span class="k">new</span>(lexer)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/tokenizer.cr#L37" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/tokenizer.cr#L37" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -739,14 +739,14 @@ tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class
|
|||
|
||||
<p>Instantiates Tokenizer using a <code>source</code>.</p>
|
||||
|
||||
<pre><code>source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
<pre><code class="language-crystal">source <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Source</span>.<span class="k">new</span> code, path
|
||||
<span class="t">Ameba</span><span class="t">::</span><span class="t">Tokenizer</span>.<span class="k">new</span>(source)</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/tokenizer.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/tokenizer.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -777,7 +777,7 @@ tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class
|
|||
|
||||
<p>Runs the tokenizer and yields each token as a block argument.</p>
|
||||
|
||||
<pre><code><span class="t">Ameba</span><span class="t">::</span><span class="t">Tokenizer</span>.<span class="k">new</span>(source).run <span class="k">do</span> <span class="o">|</span>token<span class="o">|</span>
|
||||
<pre><code class="language-crystal"><span class="t">Ameba</span><span class="t">::</span><span class="t">Tokenizer</span>.<span class="k">new</span>(source).run <span class="k">do</span> <span class="o">|</span>token<span class="o">|</span>
|
||||
puts token
|
||||
<span class="k">end</span></code></pre>
|
||||
</div>
|
||||
|
|
@ -785,7 +785,7 @@ tokenizer.run <span class="k">do</span> <span class="o">|</span>token<span class
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/tokenizer.cr#L48" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/tokenizer.cr#L48" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
46
index.html
46
index.html
|
|
@ -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 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>
|
||||
|
||||
|
|
@ -553,19 +553,19 @@
|
|||
|
||||
|
||||
<div class="main-content">
|
||||
<ul><li><a href="#about" target="_blank">About</a></li><li><a href="#usage" target="_blank">Usage</a></li></ul>
|
||||
<ul><li><a href="#about">About</a></li><li><a href="#usage">Usage</a></li></ul>
|
||||
|
||||
<ul><li><a href="#run-in-parallel" target="_blank">Run in parallel</a></li></ul></ul>
|
||||
<ul><li><a href="#run-in-parallel">Run in parallel</a></li></ul></ul>
|
||||
|
||||
<ul><li><a href="#installation" target="_blank">Installation</a></li></ul>
|
||||
<ul><li><a href="#installation">Installation</a></li></ul>
|
||||
|
||||
<ul><li><a href="#as-a-project-dependency" target="_blank">As a project dependency:</a></li><li><a href="#os-x" target="_blank">OS X</a></li><li><a href="#docker" target="_blank">Docker</a></li><li><a href="#from-sources" target="_blank">From sources</a></li></ul></ul>
|
||||
<ul><li><a href="#as-a-project-dependency">As a project dependency:</a></li><li><a href="#os-x">OS X</a></li><li><a href="#docker">Docker</a></li><li><a href="#from-sources">From sources</a></li></ul></ul>
|
||||
|
||||
<ul><li><a href="#configuration" target="_blank">Configuration</a></li></ul>
|
||||
<ul><li><a href="#configuration">Configuration</a></li></ul>
|
||||
|
||||
<ul><li><a href="#sources" target="_blank">Sources</a></li><li><a href="#rules" target="_blank">Rules</a></li><li><a href="#explain-issues" target="_blank">Explain issues</a></li><li><a href="#inline-disabling" target="_blank">Inline disabling</a></li></ul></ul>
|
||||
<ul><li><a href="#sources">Sources</a></li><li><a href="#rules">Rules</a></li><li><a href="#explain-issues">Explain issues</a></li><li><a href="#inline-disabling">Inline disabling</a></li></ul></ul>
|
||||
|
||||
<ul><li><a href="#editors--integrations" target="_blank">Editors & integrations</a></li><li><a href="#credits--inspirations" target="_blank">Credits & inspirations</a></li><li><a href="#contributors" target="_blank">Contributors</a></li></ul>
|
||||
<ul><li><a href="#editors--integrations">Editors & integrations</a></li><li><a href="#credits--inspirations">Credits & inspirations</a></li><li><a href="#contributors">Contributors</a></li></ul>
|
||||
|
||||
<h2><a id="about" class="anchor" href="#about">
|
||||
<svg class="octicon-link" aria-hidden="true">
|
||||
|
|
@ -574,10 +574,10 @@
|
|||
</a>About</h2>
|
||||
|
||||
<p>Ameba is a static code analysis tool for the Crystal language.
|
||||
It enforces a consistent <a href="https://crystal-lang.org/docs/conventions/coding_style.html" target="_blank">Crystal code style</a>,
|
||||
It enforces a consistent <a href="https://crystal-lang.org/docs/conventions/coding_style.html">Crystal code style</a>,
|
||||
also catches code smells and wrong code constructions.</p>
|
||||
|
||||
<p>See also <a href="https://github.com/crystal-ameba/ameba/wiki" target="_blank">Roadmap</a>.</p>
|
||||
<p>See also <a href="https://github.com/crystal-ameba/ameba/wiki">Roadmap</a>.</p>
|
||||
|
||||
<h2><a id="usage" class="anchor" href="#usage">
|
||||
<svg class="octicon-link" aria-hidden="true">
|
||||
|
|
@ -613,7 +613,7 @@ Finished in 542.64 milliseconds
|
|||
</svg>
|
||||
</a>Run in parallel</h3>
|
||||
|
||||
<p>Starting from 0.31.0 Crystal <a href="https://crystal-lang.org/2019/09/06/parallelism-in-crystal.html" target="_blank">supports parallelism</a>.
|
||||
<p>Starting from 0.31.0 Crystal <a href="https://crystal-lang.org/2019/09/06/parallelism-in-crystal.html">supports parallelism</a>.
|
||||
It allows to run linting in parallel too.
|
||||
In order to take advantage of this feature you need to build ameba with preview_mt support:</p>
|
||||
|
||||
|
|
@ -648,7 +648,7 @@ $ CRYSTAL_WORKERS=8 ameba #=> 10.14 seconds</code></pre>
|
|||
|
||||
<p>Build <code>bin/ameba</code> binary within your project directory while running <code>shards install</code>.</p>
|
||||
|
||||
<p>You may also want to use it on <a href="travis-ci.org" target="_blank">Travis</a>:</p>
|
||||
<p>You may also want to use it on <a href="travis-ci.org">Travis</a>:</p>
|
||||
|
||||
<pre><code class="language-yaml"># .travis.yml
|
||||
language: crystal
|
||||
|
|
@ -790,7 +790,7 @@ time <span class="o">=</span> <span class="t">Time</span>.epoch(<span class="n">
|
|||
</svg>
|
||||
</a>Editors & integrations</h2>
|
||||
|
||||
<ul><li>Vim: <a href="https://github.com/rhysd/vim-crystal" target="_blank">vim-crystal</a>, <a href="https://github.com/w0rp/ale" target="_blank">Ale</a></li><li>Emacs: <a href="https://github.com/crystal-ameba/ameba.el" target="_blank">ameba.el</a></li><li>Sublime Text: <a href="https://github.com/epergo/SublimeLinter-contrib-ameba" target="_blank">Sublime Linter Ameba</a></li><li>VSCode: <a href="https://github.com/crystal-ameba/vscode-crystal-ameba" target="_blank">vscode-crystal-ameba</a></li><li>Codacy: <a href="https://github.com/codacy/codacy-ameba" target="_blank">codacy-ameba</a></li><li>GitHub Actions: <a href="https://github.com/crystal-ameba/github-action" target="_blank">github-action</a></li></ul>
|
||||
<ul><li>Vim: <a href="https://github.com/rhysd/vim-crystal">vim-crystal</a>, <a href="https://github.com/w0rp/ale">Ale</a></li><li>Emacs: <a href="https://github.com/crystal-ameba/ameba.el">ameba.el</a></li><li>Sublime Text: <a href="https://github.com/epergo/SublimeLinter-contrib-ameba">Sublime Linter Ameba</a></li><li>VSCode: <a href="https://github.com/crystal-ameba/vscode-crystal-ameba">vscode-crystal-ameba</a></li><li>Codacy: <a href="https://github.com/codacy/codacy-ameba">codacy-ameba</a></li><li>GitHub Actions: <a href="https://github.com/crystal-ameba/github-action">github-action</a></li></ul>
|
||||
|
||||
<h2><a id="credits-inspirations" class="anchor" href="#credits-inspirations">
|
||||
<svg class="octicon-link" aria-hidden="true">
|
||||
|
|
@ -798,7 +798,7 @@ time <span class="o">=</span> <span class="t">Time</span>.epoch(<span class="n">
|
|||
</svg>
|
||||
</a>Credits & inspirations</h2>
|
||||
|
||||
<ul><li><a href="https://crystal-lang.org" target="_blank">Crystal Language</a></li><li><a href="https://rubocop.readthedocs.io/en/latest/" target="_blank">Rubocop</a></li><li><a href="http://credo-ci.org/" target="_blank">Credo</a></li><li><a href="https://github.com/lpil/dogma" target="_blank">Dogma</a></li></ul>
|
||||
<ul><li><a href="https://crystal-lang.org">Crystal Language</a></li><li><a href="https://rubocop.readthedocs.io/en/latest/">Rubocop</a></li><li><a href="http://credo-ci.org/">Credo</a></li><li><a href="https://github.com/lpil/dogma">Dogma</a></li></ul>
|
||||
|
||||
<h2><a id="contributors" class="anchor" href="#contributors">
|
||||
<svg class="octicon-link" aria-hidden="true">
|
||||
|
|
@ -806,7 +806,7 @@ time <span class="o">=</span> <span class="t">Time</span>.epoch(<span class="n">
|
|||
</svg>
|
||||
</a>Contributors</h2>
|
||||
|
||||
<ul><li><a href="https://github.com/veelenga" target="_blank">veelenga</a> Vitalii Elenhaupt - creator, maintainer</li></ul>
|
||||
<ul><li><a href="https://github.com/veelenga">veelenga</a> Vitalii Elenhaupt - creator, maintainer</li></ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -908,7 +908,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
};
|
||||
}
|
||||
|
||||
var repositoryName = document.querySelector('#repository-name').getAttribute('content');
|
||||
var repositoryName = document.querySelector('[name=repository-name]').getAttribute('content');
|
||||
var typesList = document.querySelector('.types-list');
|
||||
var searchInput = document.querySelector('.search-input');
|
||||
var parents = document.querySelectorAll('.types-list li.parent');
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue