Deploying to gh-pages from @ d8c32f0045 🚀

This commit is contained in:
veelenga 2021-02-24 08:11:10 +00:00
parent 8d0a0f7c6a
commit c1e843ec60
103 changed files with 19232 additions and 1880 deletions

View file

@ -131,6 +131,11 @@
</li>
<li class=" " data-id="ameba/Ameba/AST/TopLevelNodesVisitor" data-name="ameba::ast::toplevelnodesvisitor">
<a href="../../Ameba/AST/TopLevelNodesVisitor.html">TopLevelNodesVisitor</a>
</li>
<li class=" " data-id="ameba/Ameba/AST/Util" data-name="ameba::ast::util">
<a href="../../Ameba/AST/Util.html">Util</a>
@ -221,9 +226,19 @@
</li>
<li class=" " data-id="ameba/Ameba/Issue" data-name="ameba::issue">
<li class="parent " data-id="ameba/Ameba/Issue" data-name="ameba::issue">
<a href="../../Ameba/Issue.html">Issue</a>
<ul>
<li class=" " data-id="ameba/Ameba/Issue/Status" data-name="ameba::issue::status">
<a href="../../Ameba/Issue/Status.html">Status</a>
</li>
</ul>
</li>
<li class=" " data-id="ameba/Ameba/Reportable" data-name="ameba::reportable">
@ -286,6 +301,11 @@
</li>
<li class=" " data-id="ameba/Ameba/Rule/Lint/DuplicatedRequire" data-name="ameba::rule::lint::duplicatedrequire">
<a href="../../Ameba/Rule/Lint/DuplicatedRequire.html">DuplicatedRequire</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Lint/EmptyEnsure" data-name="ameba::rule::lint::emptyensure">
<a href="../../Ameba/Rule/Lint/EmptyEnsure.html">EmptyEnsure</a>
@ -361,6 +381,11 @@
</li>
<li class=" " data-id="ameba/Ameba/Rule/Lint/SpecFocus" data-name="ameba::rule::lint::specfocus">
<a href="../../Ameba/Rule/Lint/SpecFocus.html">SpecFocus</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Lint/Syntax" data-name="ameba::rule::lint::syntax">
<a href="../../Ameba/Rule/Lint/Syntax.html">Syntax</a>
@ -421,11 +446,36 @@
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/AnyInsteadOfEmpty" data-name="ameba::rule::performance::anyinsteadofempty">
<a href="../../Ameba/Rule/Performance/AnyInsteadOfEmpty.html">AnyInsteadOfEmpty</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/ChainedCallWithNoBang" data-name="ameba::rule::performance::chainedcallwithnobang">
<a href="../../Ameba/Rule/Performance/ChainedCallWithNoBang.html">ChainedCallWithNoBang</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/CompactAfterMap" data-name="ameba::rule::performance::compactaftermap">
<a href="../../Ameba/Rule/Performance/CompactAfterMap.html">CompactAfterMap</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/FirstLastAfterFilter" data-name="ameba::rule::performance::firstlastafterfilter">
<a href="../../Ameba/Rule/Performance/FirstLastAfterFilter.html">FirstLastAfterFilter</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/FlattenAfterMap" data-name="ameba::rule::performance::flattenaftermap">
<a href="../../Ameba/Rule/Performance/FlattenAfterMap.html">FlattenAfterMap</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/MapInsteadOfBlock" data-name="ameba::rule::performance::mapinsteadofblock">
<a href="../../Ameba/Rule/Performance/MapInsteadOfBlock.html">MapInsteadOfBlock</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Performance/SizeAfterFilter" data-name="ameba::rule::performance::sizeafterfilter">
<a href="../../Ameba/Rule/Performance/SizeAfterFilter.html">SizeAfterFilter</a>
@ -446,6 +496,11 @@
</li>
<li class=" " data-id="ameba/Ameba/Rule/Style/IsAFilter" data-name="ameba::rule::style::isafilter">
<a href="../../Ameba/Rule/Style/IsAFilter.html">IsAFilter</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Style/IsANil" data-name="ameba::rule::style::isanil">
<a href="../../Ameba/Rule/Style/IsANil.html">IsANil</a>
@ -501,6 +556,11 @@
</li>
<li class=" " data-id="ameba/Ameba/Rule/Style/VerboseBlock" data-name="ameba::rule::style::verboseblock">
<a href="../../Ameba/Rule/Style/VerboseBlock.html">VerboseBlock</a>
</li>
<li class=" " data-id="ameba/Ameba/Rule/Style/WhileTrue" data-name="ameba::rule::style::whiletrue">
<a href="../../Ameba/Rule/Style/WhileTrue.html">WhileTrue</a>
@ -555,12 +615,12 @@
<div class="main-content">
<h1 class="type-name">
<span class="kind">abstract struct</span> Ameba::Rule::Base
<span class="kind">abstract class</span> Ameba::Rule::Base
</h1>
<ul class="superclass-hierarchy"><li class="superclass"><a href="../../Ameba/Rule/Base.html">Ameba::Rule::Base</a></li><li class="superclass">Struct</li><li class="superclass">Value</li><li class="superclass">Object</li></ul>
<ul class="superclass-hierarchy"><li class="superclass"><a href="../../Ameba/Rule/Base.html">Ameba::Rule::Base</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
@ -577,7 +637,7 @@
<p>Represents a base of all rules. In other words, all rules
inherits from this struct:</p>
<pre><code class="language-crystal"><span class="k">struct</span> <span class="t">MyRule</span> <span class="o">&lt;</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">class</span> <span class="t">MyRule</span> <span class="o">&lt;</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">&quot;Something wrong.&quot;</span>
@ -637,6 +697,8 @@ that are tested by this rule, it should add an issue.</p>
<li class="other-type"><a href="../../Ameba/Rule/Lint/DebuggerStatement.html">Ameba::Rule::Lint::DebuggerStatement</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/DuplicatedRequire.html">Ameba::Rule::Lint::DuplicatedRequire</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/EmptyEnsure.html">Ameba::Rule::Lint::EmptyEnsure</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/EmptyExpression.html">Ameba::Rule::Lint::EmptyExpression</a></li>
@ -667,6 +729,8 @@ that are tested by this rule, it should add an issue.</p>
<li class="other-type"><a href="../../Ameba/Rule/Lint/SharedVarInFiber.html">Ameba::Rule::Lint::SharedVarInFiber</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/SpecFocus.html">Ameba::Rule::Lint::SpecFocus</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/Syntax.html">Ameba::Rule::Lint::Syntax</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Lint/UnneededDisableDirective.html">Ameba::Rule::Lint::UnneededDisableDirective</a></li>
@ -683,12 +747,24 @@ that are tested by this rule, it should add an issue.</p>
<li class="other-type"><a href="../../Ameba/Rule/Performance/AnyAfterFilter.html">Ameba::Rule::Performance::AnyAfterFilter</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/AnyInsteadOfEmpty.html">Ameba::Rule::Performance::AnyInsteadOfEmpty</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/ChainedCallWithNoBang.html">Ameba::Rule::Performance::ChainedCallWithNoBang</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/CompactAfterMap.html">Ameba::Rule::Performance::CompactAfterMap</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/FirstLastAfterFilter.html">Ameba::Rule::Performance::FirstLastAfterFilter</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/FlattenAfterMap.html">Ameba::Rule::Performance::FlattenAfterMap</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/MapInsteadOfBlock.html">Ameba::Rule::Performance::MapInsteadOfBlock</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Performance/SizeAfterFilter.html">Ameba::Rule::Performance::SizeAfterFilter</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/ConstantNames.html">Ameba::Rule::Style::ConstantNames</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/IsAFilter.html">Ameba::Rule::Style::IsAFilter</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/IsANil.html">Ameba::Rule::Style::IsANil</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/LargeNumbers.html">Ameba::Rule::Style::LargeNumbers</a></li>
@ -711,6 +787,8 @@ that are tested by this rule, it should add an issue.</p>
<li class="other-type"><a href="../../Ameba/Rule/Style/VariableNames.html">Ameba::Rule::Style::VariableNames</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/VerboseBlock.html">Ameba::Rule::Style::VerboseBlock</a></li>
<li class="other-type"><a href="../../Ameba/Rule/Style/WhileTrue.html">Ameba::Rule::Style::WhileTrue</a></li>
</ul>
@ -730,7 +808,7 @@ that are tested by this rule, it should add an issue.</p>
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L30" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L29" target="_blank">
ameba/rule/base.cr
</a>
@ -741,23 +819,6 @@ that are tested by this rule, it should add an issue.</p>
<h2>
<a id="constructors" class="anchor" href="#constructors">
<svg class="octicon-link" aria-hidden="true">
<use href="#octicon-link"/>
</svg>
</a>
Constructors
</h2>
<ul class="list-summary">
<li class="entry-summary">
<a href="#new-class-method" class="signature"><strong>.new</strong></a>
</li>
</ul>
<h2>
@ -794,7 +855,7 @@ that are tested by this rule, it should add an issue.</p>
<li class="entry-summary">
<a href="#==(other)-instance-method" class="signature"><strong>#==</strong>(other)</a>
<div class="summary"><p>Returns <code>true</code> if this struct is equal to <em>other</em>.</p></div>
<div class="summary"><p>Returns <code>false</code> (other can only be a <code>Value</code> here).</p></div>
</li>
@ -896,16 +957,6 @@ that are tested by this rule, it should add an issue.</p>
@ -920,32 +971,6 @@ that are tested by this rule, it should add an issue.</p>
</div>
<h2>
<a id="constructor-detail" class="anchor" href="#constructor-detail">
<svg class="octicon-link" aria-hidden="true">
<use href="#octicon-link"/>
</svg>
</a>
Constructor Detail
</h2>
<div class="entry-detail" id="new-class-method">
<div class="signature">
def self.<strong>new</strong>
<a class="method-permalink" href="#new-class-method">#</a>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L30" target="_blank">View source</a>]
</div>
</div>
<h2>
@ -972,7 +997,7 @@ that are tested by this rule, it should add an issue.</p>
<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">&lt;</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">class</span> <span class="t">MyRule</span> <span class="o">&lt;</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>
@ -984,7 +1009,7 @@ that are tested by this rule, it should add an issue.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L157" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L151" target="_blank">View source</a>]
</div>
</div>
@ -1012,33 +1037,16 @@ that are tested by this rule, it should add an issue.</p>
<div class="doc">
<div class="doc-inherited">
Description copied from struct Struct
Description copied from class Reference
</div>
<p>Returns <code>true</code> if this struct is equal to <em>other</em>.</p>
<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 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>
p1 <span class="o">=</span> <span class="t">Point</span>.<span class="k">new</span> <span class="n">1</span>, <span class="n">2</span>
p2 <span class="o">=</span> <span class="t">Point</span>.<span class="k">new</span> <span class="n">1</span>, <span class="n">2</span>
p3 <span class="o">=</span> <span class="t">Point</span>.<span class="k">new</span> <span class="n">3</span>, <span class="n">4</span>
p1 <span class="o">==</span> p2 <span class="c"># =&gt; true</span>
p1 <span class="o">==</span> p3 <span class="c"># =&gt; false</span></code></pre>
<p>Returns <code>false</code> (other can only be a <code>Value</code> here).</p>
</div>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L113" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L107" target="_blank">View source</a>]
</div>
</div>
@ -1063,7 +1071,7 @@ source.valid?</code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L54" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L52" target="_blank">View source</a>]
</div>
</div>
@ -1088,7 +1096,7 @@ the one of the given source.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L95" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L90" target="_blank">View source</a>]
</div>
</div>
@ -1105,7 +1113,7 @@ the one of the given source.</p>
<p>Returns a group this rule belong to.</p>
<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">&lt;</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">class</span> <span class="t">MyGroup</span><span class="t">::</span><span class="t">MyRule</span> <span class="o">&lt;</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 +1123,7 @@ the one of the given source.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L83" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L79" target="_blank">View source</a>]
</div>
</div>
@ -1148,7 +1156,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/51b0a07e/src/ameba/rule/base.cr#L117" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L111" target="_blank">View source</a>]
</div>
</div>
@ -1165,7 +1173,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 class="language-crystal"><span class="k">struct</span> <span class="t">MyRule</span> <span class="o">&lt;</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">class</span> <span class="t">MyRule</span> <span class="o">&lt;</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 +1184,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/51b0a07e/src/ameba/rule/base.cr#L69" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L66" target="_blank">View source</a>]
</div>
</div>
@ -1200,7 +1208,7 @@ usual rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L109" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L103" target="_blank">View source</a>]
</div>
</div>
@ -1216,7 +1224,7 @@ usual rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L42" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L41" target="_blank">View source</a>]
</div>
</div>
@ -1241,7 +1249,7 @@ Must be overriten for other type of rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L38" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L37" target="_blank">View source</a>]
</div>
</div>
@ -1269,7 +1277,7 @@ Must be overriten for other type of rules.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/rule/base.cr#L121" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/d8c32f00/src/ameba/rule/base.cr#L115" target="_blank">View source</a>]
</div>
</div>