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 @ 48b15b9bf8
🚀
This commit is contained in:
parent
42809c9681
commit
f760465482
106 changed files with 5612 additions and 4623 deletions
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.36.1">
|
||||
<meta name="generator" content="Crystal Docs 1.1.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -286,6 +286,11 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/AmbiguousAssignment" data-name="ameba::rule::lint::ambiguousassignment">
|
||||
<a href="../../../Ameba/Rule/Lint/AmbiguousAssignment.html">AmbiguousAssignment</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class=" " data-id="ameba/Ameba/Rule/Lint/BadDirective" data-name="ameba::rule::lint::baddirective">
|
||||
<a href="../../../Ameba/Rule/Lint/BadDirective.html">BadDirective</a>
|
||||
|
||||
|
@ -641,25 +646,19 @@
|
|||
|
||||
<p>This rule is used to identify usage of chained calls not utilizing
|
||||
the bang method variants.</p>
|
||||
|
||||
<p>For example, this is considered inefficient:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq
|
||||
.sort</code></pre>
|
||||
|
||||
<p>And can be written as this:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq!
|
||||
.sort!</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
|
||||
Enabled: true
|
||||
CallNames:
|
||||
|
@ -708,7 +707,7 @@ chars <span class="o">=</span> names
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">
|
||||
ameba/rule/performance/chained_call_with_no_bang.cr
|
||||
</a>
|
||||
|
||||
|
@ -758,14 +757,14 @@ chars <span class="o">=</span> names
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method" class="signature"><strong>.new</strong>(ctx : YAML::ParseContext, node : YAML::Nodes::Node)</a>
|
||||
<a href="#new%28ctx%3AYAML%3A%3AParseContext%2Cnode%3AYAML%3A%3ANodes%3A%3ANode%29-class-method" class="signature"><strong>.new</strong>(ctx : YAML::ParseContext, node : YAML::Nodes::Node)</a>
|
||||
|
||||
<div class="summary"><p>This rule is used to identify usage of chained calls not utilizing the bang method variants.</p></div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#new(config=nil)-class-method" class="signature"><strong>.new</strong>(config = <span class="n">nil</span>)</a>
|
||||
<a href="#new%28config%3Dnil%29-class-method" class="signature"><strong>.new</strong>(config = <span class="n">nil</span>)</a>
|
||||
|
||||
<div class="summary"><p>This rule is used to identify usage of chained calls not utilizing the bang method variants.</p></div>
|
||||
|
||||
|
@ -788,62 +787,62 @@ chars <span class="o">=</span> names
|
|||
<ul class="list-summary">
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#call_names:Array(String)-instance-method" class="signature"><strong>#call_names</strong> : Array(String)</a>
|
||||
<a href="#call_names%3AArray%28String%29-instance-method" class="signature"><strong>#call_names</strong> : Array(String)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#call_names=(call_names:Array(String))-instance-method" class="signature"><strong>#call_names=</strong>(call_names : Array(String))</a>
|
||||
<a href="#call_names%3D%28call_names%3AArray%28String%29%29-instance-method" class="signature"><strong>#call_names=</strong>(call_names : Array(String))</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#description:String-instance-method" class="signature"><strong>#description</strong> : String</a>
|
||||
<a href="#description%3AString-instance-method" class="signature"><strong>#description</strong> : String</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#description=(description:String)-instance-method" class="signature"><strong>#description=</strong>(description : String)</a>
|
||||
<a href="#description%3D%28description%3AString%29-instance-method" class="signature"><strong>#description=</strong>(description : String)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#enabled:Bool-instance-method" class="signature"><strong>#enabled</strong> : Bool</a>
|
||||
<a href="#enabled%3ABool-instance-method" class="signature"><strong>#enabled</strong> : Bool</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#enabled=(enabled)-instance-method" class="signature"><strong>#enabled=</strong>(enabled)</a>
|
||||
<a href="#enabled%3D%28enabled%29-instance-method" class="signature"><strong>#enabled=</strong>(enabled)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#excluded:Array(String)?-instance-method" class="signature"><strong>#excluded</strong> : Array(String)?</a>
|
||||
<a href="#excluded%3AArray%28String%29%3F-instance-method" class="signature"><strong>#excluded</strong> : Array(String)?</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#excluded=(excluded:Array(String)?)-instance-method" class="signature"><strong>#excluded=</strong>(excluded : Array(String)?)</a>
|
||||
<a href="#excluded%3D%28excluded%3AArray%28String%29%3F%29-instance-method" class="signature"><strong>#excluded=</strong>(excluded : Array(String)?)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#severity:Ameba::Severity-instance-method" class="signature"><strong>#severity</strong> : Ameba::Severity</a>
|
||||
<a href="#severity%3AAmeba%3A%3ASeverity-instance-method" class="signature"><strong>#severity</strong> : Ameba::Severity</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#severity=(severity)-instance-method" class="signature"><strong>#severity=</strong>(severity)</a>
|
||||
<a href="#severity%3D%28severity%29-instance-method" class="signature"><strong>#severity=</strong>(severity)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#test(source,node:Crystal::Call)-instance-method" class="signature"><strong>#test</strong>(source, node : Crystal::Call)</a>
|
||||
<a href="#test%28source%2Cnode%3ACrystal%3A%3ACall%29-instance-method" class="signature"><strong>#test</strong>(source, node : Crystal::Call)</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="entry-summary">
|
||||
<a href="#test(source)-instance-method" class="signature"><strong>#test</strong>(source)</a>
|
||||
<a href="#test%28source%29-instance-method" class="signature"><strong>#test</strong>(source)</a>
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -880,7 +879,7 @@ chars <span class="o">=</span> names
|
|||
<h3>Instance methods inherited from class <code><a href="../../../Ameba/Rule/Performance/Base.html">Ameba::Rule::Performance::Base</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Performance/Base.html#catch(source:Source)-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Performance/Base.html#catch%28source%3ASource%29-instance-method" class="tooltip">
|
||||
<span>catch(source : Source)</span>
|
||||
catch</a>
|
||||
|
||||
|
@ -892,7 +891,7 @@ chars <span class="o">=</span> names
|
|||
<h3>Constructor methods inherited from class <code><a href="../../../Ameba/Rule/Performance/Base.html">Ameba::Rule::Performance::Base</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Performance/Base.html#new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Performance/Base.html#new%28ctx%3AYAML%3A%3AParseContext%2Cnode%3AYAML%3A%3ANodes%3A%3ANode%29-class-method" class="tooltip">
|
||||
<span>new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)<br/>new(config = <span class="n">nil</span>)</span>
|
||||
new</a>
|
||||
|
||||
|
@ -928,17 +927,17 @@ chars <span class="o">=</span> names
|
|||
<h3>Instance methods inherited from class <code><a href="../../../Ameba/Rule/Base.html">Ameba::Rule::Base</a></code></h3>
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Base.html#==(other)-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Base.html#%3D%3D%28other%29-instance-method" class="tooltip">
|
||||
<span>==(other)</span>
|
||||
==</a>,
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Base.html#catch(source:Source)-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Base.html#catch%28source%3ASource%29-instance-method" class="tooltip">
|
||||
<span>catch(source : Source)</span>
|
||||
catch</a>,
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Base.html#excluded?(source)-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Base.html#excluded%3F%28source%29-instance-method" class="tooltip">
|
||||
<span>excluded?(source)</span>
|
||||
excluded?</a>,
|
||||
|
||||
|
@ -958,12 +957,12 @@ chars <span class="o">=</span> names
|
|||
name</a>,
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Base.html#special?-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Base.html#special%3F-instance-method" class="tooltip">
|
||||
<span>special?</span>
|
||||
special?</a>,
|
||||
|
||||
|
||||
<a href="../../../Ameba/Rule/Base.html#test(source:Source,node:Crystal::ASTNode,*opts)-instance-method" class="tooltip">
|
||||
<a href="../../../Ameba/Rule/Base.html#test%28source%3ASource%2Cnode%3ACrystal%3A%3AASTNode%2C%2Aopts%29-instance-method" class="tooltip">
|
||||
<span>test(source : Source, node : Crystal::ASTNode, *opts)<br/>test(source : Source)</span>
|
||||
test</a>
|
||||
|
||||
|
@ -1033,32 +1032,26 @@ chars <span class="o">=</span> names
|
|||
|
||||
def self.<strong>new</strong>(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
|
||||
|
||||
<a class="method-permalink" href="#new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28ctx%3AYAML%3A%3AParseContext%2Cnode%3AYAML%3A%3ANodes%3A%3ANode%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>This rule is used to identify usage of chained calls not utilizing
|
||||
the bang method variants.</p>
|
||||
|
||||
<p>For example, this is considered inefficient:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq
|
||||
.sort</code></pre>
|
||||
|
||||
<p>And can be written as this:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq!
|
||||
.sort!</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
|
||||
Enabled: true
|
||||
CallNames:
|
||||
|
@ -1080,32 +1073,26 @@ chars <span class="o">=</span> names
|
|||
|
||||
def self.<strong>new</strong>(config = <span class="n">nil</span>)
|
||||
|
||||
<a class="method-permalink" href="#new(config=nil)-class-method">#</a>
|
||||
<a class="method-permalink" href="#new%28config%3Dnil%29-class-method">#</a>
|
||||
</div>
|
||||
|
||||
<div class="doc">
|
||||
|
||||
<p>This rule is used to identify usage of chained calls not utilizing
|
||||
the bang method variants.</p>
|
||||
|
||||
<p>For example, this is considered inefficient:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq
|
||||
.sort</code></pre>
|
||||
|
||||
<p>And can be written as this:</p>
|
||||
|
||||
<pre><code class="language-crystal">names <span class="o">=</span> <span class="s">%w[Alice Bob]</span>
|
||||
chars <span class="o">=</span> names
|
||||
.flat_map(<span class="o">&</span>.chars)
|
||||
.uniq!
|
||||
.sort!</code></pre>
|
||||
|
||||
<p>YAML configuration example:</p>
|
||||
|
||||
<pre><code class="language-crystal">Performance/ChainedCallWithNoBang:
|
||||
Enabled: true
|
||||
CallNames:
|
||||
|
@ -1119,7 +1106,7 @@ chars <span class="o">=</span> names
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1143,7 +1130,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>call_names</strong> : Array(String)
|
||||
|
||||
<a class="method-permalink" href="#call_names:Array(String)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#call_names%3AArray%28String%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1157,7 +1144,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>call_names=</strong>(call_names : Array(String))
|
||||
|
||||
<a class="method-permalink" href="#call_names=(call_names:Array(String))-instance-method">#</a>
|
||||
<a class="method-permalink" href="#call_names%3D%28call_names%3AArray%28String%29%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1171,7 +1158,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>description</strong> : String
|
||||
|
||||
<a class="method-permalink" href="#description:String-instance-method">#</a>
|
||||
<a class="method-permalink" href="#description%3AString-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1185,7 +1172,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>description=</strong>(description : String)
|
||||
|
||||
<a class="method-permalink" href="#description=(description:String)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#description%3D%28description%3AString%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1199,7 +1186,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>enabled</strong> : Bool
|
||||
|
||||
<a class="method-permalink" href="#enabled:Bool-instance-method">#</a>
|
||||
<a class="method-permalink" href="#enabled%3ABool-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1213,7 +1200,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>enabled=</strong>(enabled)
|
||||
|
||||
<a class="method-permalink" href="#enabled=(enabled)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#enabled%3D%28enabled%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1227,7 +1214,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>excluded</strong> : Array(String)?
|
||||
|
||||
<a class="method-permalink" href="#excluded:Array(String)?-instance-method">#</a>
|
||||
<a class="method-permalink" href="#excluded%3AArray%28String%29%3F-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1241,7 +1228,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>excluded=</strong>(excluded : Array(String)?)
|
||||
|
||||
<a class="method-permalink" href="#excluded=(excluded:Array(String)?)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#excluded%3D%28excluded%3AArray%28String%29%3F%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1255,7 +1242,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>severity</strong> : <a href="../../../Ameba/Severity.html">Ameba::Severity</a>
|
||||
|
||||
<a class="method-permalink" href="#severity:Ameba::Severity-instance-method">#</a>
|
||||
<a class="method-permalink" href="#severity%3AAmeba%3A%3ASeverity-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1269,7 +1256,7 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>severity=</strong>(severity)
|
||||
|
||||
<a class="method-permalink" href="#severity=(severity)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#severity%3D%28severity%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
@ -1283,13 +1270,13 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>test</strong>(source, node : Crystal::Call)
|
||||
|
||||
<a class="method-permalink" href="#test(source,node:Crystal::Call)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#test%28source%2Cnode%3ACrystal%3A%3ACall%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L68" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L68" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1299,13 +1286,13 @@ chars <span class="o">=</span> names
|
|||
|
||||
def <strong>test</strong>(source)
|
||||
|
||||
<a class="method-permalink" href="#test(source)-instance-method">#</a>
|
||||
<a class="method-permalink" href="#test%28source%29-instance-method">#</a>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L59" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/rule/performance/chained_call_with_no_bang.cr#L59" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue