Deploying to gh-pages from @ 48b15b9bf8 🚀

This commit is contained in:
Sija 2021-10-19 09:45:33 +00:00
parent 42809c9681
commit f760465482
106 changed files with 5612 additions and 4623 deletions

View file

@ -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>
@ -676,7 +681,7 @@
</h2>
<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/inline_comments.cr#L3" target="_blank">
<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/inline_comments.cr#L3" target="_blank">
ameba/inline_comments.cr
</a>
@ -721,21 +726,21 @@
<ul class="list-summary">
<li class="entry-summary">
<a href="#comment?(line_number:Int32)-instance-method" class="signature"><strong>#comment?</strong>(line_number : Int32)</a>
<a href="#comment%3F%28line_number%3AInt32%29-instance-method" class="signature"><strong>#comment?</strong>(line_number : Int32)</a>
<div class="summary"><p>Returns true if the line at the given <code>line_number</code> is a comment.</p></div>
</li>
<li class="entry-summary">
<a href="#location_disabled?(location,rule)-instance-method" class="signature"><strong>#location_disabled?</strong>(location, rule)</a>
<a href="#location_disabled%3F%28location%2Crule%29-instance-method" class="signature"><strong>#location_disabled?</strong>(location, rule)</a>
<div class="summary"><p>Returns true if current location is disabled for a particular rule, false otherwise.</p></div>
</li>
<li class="entry-summary">
<a href="#parse_inline_directive(line)-instance-method" class="signature"><strong>#parse_inline_directive</strong>(line)</a>
<a href="#parse_inline_directive%28line%29-instance-method" class="signature"><strong>#parse_inline_directive</strong>(line)</a>
<div class="summary"><p>Parses inline comment directive.</p></div>
@ -770,7 +775,7 @@
def <strong>comment?</strong>(line_number : Int32)
<a class="method-permalink" href="#comment?(line_number:Int32)-instance-method">#</a>
<a class="method-permalink" href="#comment%3F%28line_number%3AInt32%29-instance-method">#</a>
</div>
<div class="doc">
@ -781,7 +786,7 @@
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/inline_comments.cr#L78" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/inline_comments.cr#L78" target="_blank">View source</a>]
</div>
</div>
@ -791,27 +796,24 @@
def <strong>location_disabled?</strong>(location, rule)
<a class="method-permalink" href="#location_disabled?(location,rule)-instance-method">#</a>
<a class="method-permalink" href="#location_disabled%3F%28location%2Crule%29-instance-method">#</a>
</div>
<div class="doc">
<p>Returns true if current location is disabled for a particular rule,
false otherwise.</p>
<p>Location is disabled in two cases:</p>
<ol><li>The line of the location ends with a comment directive.</li><li>The line above the location is a comment directive.</li></ol>
<ol>
<li>The line of the location ends with a comment directive.</li>
<li>The line above the location is a comment directive.</li>
</ol>
<p>For example, here are two examples of disabled location:</p>
<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 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>)
@ -824,7 +826,7 @@ false otherwise.</p>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/inline_comments.cr#L39" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/inline_comments.cr#L39" target="_blank">View source</a>]
</div>
</div>
@ -834,21 +836,18 @@ false otherwise.</p>
def <strong>parse_inline_directive</strong>(line)
<a class="method-permalink" href="#parse_inline_directive(line)-instance-method">#</a>
<a class="method-permalink" href="#parse_inline_directive%28line%29-instance-method">#</a>
</div>
<div class="doc">
<p>Parses inline comment directive. Returns a tuple that consists of
an action and parsed rules if directive found, nil otherwise.</p>
<pre><code class="language-crystal">line <span class="o">=</span> <span class="s">&quot;# ameba:disable Rule1, Rule2&quot;</span>
directive <span class="o">=</span> parse_inline_directive(line)
directive[<span class="n">:action</span>] <span class="c"># =&gt; &quot;disable&quot;</span>
directive[<span class="n">:rules</span>] <span class="c"># =&gt; [&quot;Rule1&quot;, &quot;Rule2&quot;]</span></code></pre>
<p>It ignores the directive if it is commented out.</p>
<pre><code class="language-crystal">line <span class="o">=</span> <span class="s">&quot;# # ameba:disable Rule1, Rule2&quot;</span>
parse_inline_directive(line) <span class="c"># =&gt; nil</span></code></pre>
</div>
@ -856,7 +855,7 @@ parse_inline_directive(line) <span class="c"># =&gt; nil</span></code></pre>
<br/>
<div>
[<a href="https://github.com/crystal-ameba/ameba/blob/9a91e42b/src/ameba/inline_comments.cr#L67" target="_blank">View source</a>]
[<a href="https://github.com/crystal-ameba/ameba/blob/48b15b9b/src/ameba/inline_comments.cr#L67" target="_blank">View source</a>]
</div>
</div>