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 @ 80532da357
🚀
This commit is contained in:
parent
5691d407a5
commit
017e9a8722
121 changed files with 1270 additions and 1270 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 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -742,8 +742,8 @@
|
|||
<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 class="language-crystal">Style/ConstantNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">ConstantNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -784,7 +784,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L24" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L24" target="_blank">
|
||||
ameba/rule/style/constant_names.cr
|
||||
</a>
|
||||
|
||||
|
@ -1062,14 +1062,14 @@
|
|||
<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 class="language-crystal">Style/ConstantNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">ConstantNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L24" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L24" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1211,7 +1211,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/constant_names.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/constant_names.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -768,17 +768,17 @@ ok
|
|||
|
||||
<span class="c"># bad</span>
|
||||
<span class="k">if</span> something
|
||||
foo || raise(<span class="s">"exception"</span>)
|
||||
foo <span class="o">||</span> raise(<span class="s">"exception"</span>)
|
||||
<span class="k">else</span>
|
||||
ok
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="c"># good</span>
|
||||
foo || raise(<span class="s">"exception"</span>) <span class="k">if</span> something
|
||||
foo <span class="o">||</span> raise(<span class="s">"exception"</span>) <span class="k">if</span> something
|
||||
ok</code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/GuardClause:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">GuardClause</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -821,7 +821,7 @@ ok</code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">
|
||||
ameba/rule/style/guard_clause.cr
|
||||
</a>
|
||||
|
||||
|
@ -1219,23 +1219,23 @@ ok
|
|||
|
||||
<span class="c"># bad</span>
|
||||
<span class="k">if</span> something
|
||||
foo || raise(<span class="s">"exception"</span>)
|
||||
foo <span class="o">||</span> raise(<span class="s">"exception"</span>)
|
||||
<span class="k">else</span>
|
||||
ok
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="c"># good</span>
|
||||
foo || raise(<span class="s">"exception"</span>) <span class="k">if</span> something
|
||||
foo <span class="o">||</span> raise(<span class="s">"exception"</span>) <span class="k">if</span> something
|
||||
ok</code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/GuardClause:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">GuardClause</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L54" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1349,7 +1349,7 @@ ok</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L175" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L175" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1393,7 +1393,7 @@ ok</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L69" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L69" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1409,7 +1409,7 @@ ok</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L83" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L83" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1425,7 +1425,7 @@ ok</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/guard_clause.cr#L65" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/guard_clause.cr#L65" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -736,7 +736,7 @@
|
|||
|
||||
<p>This rule is used to identify usage of <code>is_a?/nil?</code> calls within filters.</p>
|
||||
<p>For example, this is considered invalid:</p>
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="s">/^A./</span>))
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
|
||||
|
||||
matches.any?(<span class="o">&</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># => true</span>
|
||||
matches.one?(<span class="o">&</span>.<span class="k">nil?</span>) <span class="c"># => true</span>
|
||||
|
@ -744,7 +744,7 @@ matches.one?(<span class="o">&</span>.<span class="k">nil?</span>)
|
|||
<span class="k">typeof</span>(matches.reject(<span class="o">&</span>.<span class="k">nil?</span>)) <span class="c"># => Array(Regex::MatchData | Nil)</span>
|
||||
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="o">&</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>))) <span class="c"># => Array(Regex::MatchData | Nil)</span></code></pre>
|
||||
<p>And it should be written as this:</p>
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="s">/^A./</span>))
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
|
||||
|
||||
matches.any?(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>) <span class="c"># => true</span>
|
||||
matches.one?(<span class="t">Nil</span>) <span class="c"># => true</span>
|
||||
|
@ -752,15 +752,15 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
<span class="k">typeof</span>(matches.reject(<span class="t">Nil</span>)) <span class="c"># => Array(Regex::MatchData)</span>
|
||||
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># => Array(Regex::MatchData)</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/IsAFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject
|
||||
- any?
|
||||
- all?
|
||||
- none?
|
||||
- one?</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsAFilter</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">FilterNames</span>:
|
||||
<span class="o">-</span> <span class="k">select</span>
|
||||
<span class="o">-</span> reject
|
||||
<span class="o">-</span> any?
|
||||
<span class="o">-</span> all?
|
||||
<span class="o">-</span> none?
|
||||
<span class="o">-</span> one?</code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -801,7 +801,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">
|
||||
ameba/rule/style/is_a_filter.cr
|
||||
</a>
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
|
||||
<p>This rule is used to identify usage of <code>is_a?/nil?</code> calls within filters.</p>
|
||||
<p>For example, this is considered invalid:</p>
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="s">/^A./</span>))
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
|
||||
|
||||
matches.any?(<span class="o">&</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># => true</span>
|
||||
matches.one?(<span class="o">&</span>.<span class="k">nil?</span>) <span class="c"># => true</span>
|
||||
|
@ -1106,7 +1106,7 @@ matches.one?(<span class="o">&</span>.<span class="k">nil?</span>)
|
|||
<span class="k">typeof</span>(matches.reject(<span class="o">&</span>.<span class="k">nil?</span>)) <span class="c"># => Array(Regex::MatchData | Nil)</span>
|
||||
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="o">&</span>.<span class="k">is_a?</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>))) <span class="c"># => Array(Regex::MatchData | Nil)</span></code></pre>
|
||||
<p>And it should be written as this:</p>
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="s">/^A./</span>))
|
||||
<pre><code class="language-crystal">matches <span class="o">=</span> <span class="s">%w[Alice Bob]</span>.map(<span class="o">&</span>.match(<span class="o">/</span><span class="o">^</span><span class="t">A</span>.<span class="o">/</span>))
|
||||
|
||||
matches.any?(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>) <span class="c"># => true</span>
|
||||
matches.one?(<span class="t">Nil</span>) <span class="c"># => true</span>
|
||||
|
@ -1114,21 +1114,21 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
<span class="k">typeof</span>(matches.reject(<span class="t">Nil</span>)) <span class="c"># => Array(Regex::MatchData)</span>
|
||||
<span class="k">typeof</span>(matches.<span class="k">select</span>(<span class="t">Regex</span><span class="t">::</span><span class="t">MatchData</span>)) <span class="c"># => Array(Regex::MatchData)</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/IsAFilter:
|
||||
Enabled: true
|
||||
FilterNames:
|
||||
- select
|
||||
- reject
|
||||
- any?
|
||||
- all?
|
||||
- none?
|
||||
- one?</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsAFilter</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">FilterNames</span>:
|
||||
<span class="o">-</span> <span class="k">select</span>
|
||||
<span class="o">-</span> reject
|
||||
<span class="o">-</span> any?
|
||||
<span class="o">-</span> all?
|
||||
<span class="o">-</span> none?
|
||||
<span class="o">-</span> one?</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L41" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1298,7 +1298,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L60" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L60" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1314,7 +1314,7 @@ matches.one?(<span class="t">Nil</span>) <span class="c"># => tr
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_filter.cr#L51" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_filter.cr#L51" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -740,8 +740,8 @@
|
|||
<p>And needs to be written as:</p>
|
||||
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/IsANil:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsANil</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -782,7 +782,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">
|
||||
ameba/rule/style/is_a_nil.cr
|
||||
</a>
|
||||
|
||||
|
@ -1063,14 +1063,14 @@
|
|||
<p>And needs to be written as:</p>
|
||||
<pre><code class="language-crystal">var.<span class="k">nil?</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/IsANil:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">IsANil</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L22" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1212,7 +1212,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/is_a_nil.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/is_a_nil.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -746,9 +746,9 @@ large numbers more easily.</p>
|
|||
<span class="n">141_592_654</span>
|
||||
<span class="n">5.123_456</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/LargeNumbers:
|
||||
Enabled: true
|
||||
IntMinDigits: 6 # i.e. integers higher than 99999</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">LargeNumbers</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">IntMinDigits</span>: <span class="n">6</span> <span class="c"># i.e. integers higher than 99999</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -789,7 +789,7 @@ large numbers more easily.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">
|
||||
ameba/rule/style/large_numbers.cr
|
||||
</a>
|
||||
|
||||
|
@ -1081,15 +1081,15 @@ large numbers more easily.</p>
|
|||
<span class="n">141_592_654</span>
|
||||
<span class="n">5.123_456</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/LargeNumbers:
|
||||
Enabled: true
|
||||
IntMinDigits: 6 # i.e. integers higher than 99999</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">LargeNumbers</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">IntMinDigits</span>: <span class="n">6</span> <span class="c"># i.e. integers higher than 99999</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1259,7 +1259,7 @@ large numbers more easily.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/large_numbers.cr#L38" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/large_numbers.cr#L38" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -758,8 +758,8 @@
|
|||
<span class="k">end</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/MethodNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">MethodNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -802,7 +802,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L40" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L40" target="_blank">
|
||||
ameba/rule/style/method_names.cr
|
||||
</a>
|
||||
|
||||
|
@ -1175,14 +1175,14 @@
|
|||
<span class="k">end</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/MethodNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">MethodNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L40" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L40" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1324,7 +1324,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/method_names.cr#L49" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/method_names.cr#L49" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -746,8 +746,8 @@
|
|||
<p>It is pretty difficult to wrap your head around a block of code
|
||||
that is executed if a negated condition is NOT met.</p>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">NegatedConditionsInUnless</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -788,7 +788,7 @@ that is executed if a negated condition is NOT met.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">
|
||||
ameba/rule/style/negated_conditions_in_unless.cr
|
||||
</a>
|
||||
|
||||
|
@ -1070,14 +1070,14 @@ that is executed if a negated condition is NOT met.</p>
|
|||
<p>It is pretty difficult to wrap your head around a block of code
|
||||
that is executed if a negated condition is NOT met.</p>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/NegatedConditionsInUnless:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">NegatedConditionsInUnless</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L29" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1219,7 +1219,7 @@ that is executed if a negated condition is NOT met.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/negated_conditions_in_unless.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/negated_conditions_in_unless.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -749,8 +749,8 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
<span class="k">def</span> <span class="m">has_picture?</span>(x)
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/PredicateName:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">PredicateName</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -791,7 +791,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/97acedae/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">
|
||||
ameba/rule/style/predicate_name.cr
|
||||
</a>
|
||||
|
||||
|
@ -1076,14 +1076,14 @@ start with the prefix <code>has_</code> or the prefix <code>is_</code>. Ignores
|
|||
<span class="k">def</span> <span class="m">has_picture?</span>(x)
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/PredicateName:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">PredicateName</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L31" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1225,7 +1225,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/97acedae/src/ameba/rule/style/predicate_name.cr#L39" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/predicate_name.cr#L39" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -769,8 +769,8 @@
|
|||
b <span class="o">=</span> <span class="n">2</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/RedundantBegin:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantBegin</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -813,7 +813,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">
|
||||
ameba/rule/style/redundant_begin.cr
|
||||
</a>
|
||||
|
||||
|
@ -1197,14 +1197,14 @@
|
|||
b <span class="o">=</span> <span class="n">2</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/RedundantBegin:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantBegin</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L58" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1346,7 +1346,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_begin.cr#L67" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -802,10 +802,10 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
<use href="#octicon-link"/>
|
||||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
<pre><code class="language-crystal">Style/RedundantNext:
|
||||
Enabled: true
|
||||
AllowMultiNext: true
|
||||
AllowEmptyNext: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantNext</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">AllowMultiNext</span>: <span class="n">true</span>
|
||||
<span class="t">AllowEmptyNext</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -848,7 +848,7 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">
|
||||
ameba/rule/style/redundant_next.cr
|
||||
</a>
|
||||
|
||||
|
@ -1290,16 +1290,16 @@ without arguments. Sometimes such statements are used to yild the <code>nil</cod
|
|||
<use href="#octicon-link"/>
|
||||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
<pre><code class="language-crystal">Style/RedundantNext:
|
||||
Enabled: true
|
||||
AllowMultiNext: true
|
||||
AllowEmptyNext: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantNext</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">AllowMultiNext</span>: <span class="n">true</span>
|
||||
<span class="t">AllowEmptyNext</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L99" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1497,7 +1497,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/97acedae/src/ameba/rule/style/redundant_next.cr#L115" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L115" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1513,7 +1513,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/97acedae/src/ameba/rule/style/redundant_next.cr#L111" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_next.cr#L111" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -799,10 +799,10 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
<use href="#octicon-link"/>
|
||||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
<pre><code class="language-crystal">Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMutliReturn: true
|
||||
AllowEmptyReturn: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantReturn</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">AllowMutliReturn</span>: <span class="n">true</span>
|
||||
<span class="t">AllowEmptyReturn</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -845,7 +845,7 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">
|
||||
ameba/rule/style/redundant_return.cr
|
||||
</a>
|
||||
|
||||
|
@ -1284,16 +1284,16 @@ without arguments. Sometimes such returns are used to return the <code>nil</code
|
|||
<use href="#octicon-link"/>
|
||||
</svg>
|
||||
</a>YAML config example</h3>
|
||||
<pre><code class="language-crystal">Style/RedundantReturn:
|
||||
Enabled: true
|
||||
AllowMutliReturn: true
|
||||
AllowEmptyReturn: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">RedundantReturn</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">AllowMutliReturn</span>: <span class="n">true</span>
|
||||
<span class="t">AllowEmptyReturn</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L96" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1491,7 +1491,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/97acedae/src/ameba/rule/style/redundant_return.cr#L112" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L112" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1507,7 +1507,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/97acedae/src/ameba/rule/style/redundant_return.cr#L108" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/redundant_return.cr#L108" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -772,8 +772,8 @@
|
|||
<span class="k">enum</span> <span class="t">Time_enum</span><span class="t">::</span><span class="t">Day_of_week</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/TypeNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">TypeNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -814,7 +814,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L54" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L54" target="_blank">
|
||||
ameba/rule/style/type_names.cr
|
||||
</a>
|
||||
|
||||
|
@ -1142,14 +1142,14 @@
|
|||
<span class="k">enum</span> <span class="t">Time_enum</span><span class="t">::</span><span class="t">Day_of_week</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/TypeNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">TypeNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L54" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L54" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1291,7 +1291,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L69" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L69" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1307,7 +1307,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L73" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L73" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1323,7 +1323,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L77" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L77" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1339,7 +1339,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L81" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L81" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1355,7 +1355,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/type_names.cr#L85" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/type_names.cr#L85" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -759,8 +759,8 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
<span class="n">:one</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/UnlessElse:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">UnlessElse</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -801,7 +801,7 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L45" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L45" target="_blank">
|
||||
ameba/rule/style/unless_else.cr
|
||||
</a>
|
||||
|
||||
|
@ -1096,14 +1096,14 @@ an <code>if</code>, so the previous invalid example would become this:</p>
|
|||
<span class="n">:one</span>
|
||||
<span class="k">end</span></code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/UnlessElse:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">UnlessElse</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/unless_else.cr#L45" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L45" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1245,7 +1245,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/97acedae/src/ameba/rule/style/unless_else.cr#L52" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/unless_else.cr#L52" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -743,8 +743,8 @@ _another_good_name <span class="o">=</span> <span class="n">3</span></code></pre
|
|||
<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 class="language-crystal">Style/VariableNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VariableNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -785,7 +785,7 @@ wrong_Name <span class="o">=</span> <span class="n">2</span></code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L25" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L25" target="_blank">
|
||||
ameba/rule/style/variable_names.cr
|
||||
</a>
|
||||
|
||||
|
@ -1081,14 +1081,14 @@ _another_good_name <span class="o">=</span> <span class="n">3</span></code></pre
|
|||
<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 class="language-crystal">Style/VariableNames:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VariableNames</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L25" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L25" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1230,7 +1230,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/97acedae/src/ameba/rule/style/variable_names.cr#L42" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L42" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1246,7 +1246,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/97acedae/src/ameba/rule/style/variable_names.cr#L46" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L46" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1262,7 +1262,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/97acedae/src/ameba/rule/style/variable_names.cr#L50" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L50" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1290,7 +1290,7 @@ Must be overriten for other type of rules.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/variable_names.cr#L38" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/variable_names.cr#L38" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -741,15 +741,15 @@ argument as a receiver, that can be collapsed into a short form.</p>
|
|||
<p>And it should be written as this:</p>
|
||||
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).any?(<span class="o">&</span>.odd?)</code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/VerboseBlock:
|
||||
Enabled: true
|
||||
ExcludeMultipleLineBlocks: true
|
||||
ExcludeCallsWithBlocks: true
|
||||
ExcludePrefixOperators: true
|
||||
ExcludeOperators: true
|
||||
ExcludeSetters: false
|
||||
MaxLineLength: ~
|
||||
MaxLength: 50 # use ~ to disable</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VerboseBlock</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeMultipleLineBlocks</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeCallsWithBlocks</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludePrefixOperators</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeOperators</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeSetters</span>: <span class="n">false</span>
|
||||
<span class="t">MaxLineLength</span>: <span class="o">~</span>
|
||||
<span class="t">MaxLength</span>: <span class="n">50</span> <span class="c"># use ~ to disable</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -792,7 +792,7 @@ argument as a receiver, that can be collapsed into a short form.</p>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">
|
||||
ameba/rule/style/verbose_block.cr
|
||||
</a>
|
||||
|
||||
|
@ -1223,21 +1223,21 @@ argument as a receiver, that can be collapsed into a short form.</p>
|
|||
<p>And it should be written as this:</p>
|
||||
<pre><code class="language-crystal">(<span class="n">1</span>..<span class="n">3</span>).any?(<span class="o">&</span>.odd?)</code></pre>
|
||||
<p>YAML configuration example:</p>
|
||||
<pre><code class="language-crystal">Style/VerboseBlock:
|
||||
Enabled: true
|
||||
ExcludeMultipleLineBlocks: true
|
||||
ExcludeCallsWithBlocks: true
|
||||
ExcludePrefixOperators: true
|
||||
ExcludeOperators: true
|
||||
ExcludeSetters: false
|
||||
MaxLineLength: ~
|
||||
MaxLength: 50 # use ~ to disable</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">VerboseBlock</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeMultipleLineBlocks</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeCallsWithBlocks</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludePrefixOperators</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeOperators</span>: <span class="n">true</span>
|
||||
<span class="t">ExcludeSetters</span>: <span class="n">false</span>
|
||||
<span class="t">MaxLineLength</span>: <span class="o">~</span>
|
||||
<span class="t">MaxLength</span>: <span class="n">50</span> <span class="c"># use ~ to disable</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L30" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1575,7 +1575,7 @@ argument as a receiver, that can be collapsed into a short form.</p>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/verbose_block.cr#L217" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/verbose_block.cr#L217" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 1.4.1">
|
||||
<meta name="generator" content="Crystal Docs 1.5.0">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
@ -746,8 +746,8 @@
|
|||
<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 class="language-crystal">Style/WhileTrue:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">WhileTrue</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
|
||||
|
||||
|
||||
|
@ -788,7 +788,7 @@
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L28" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L28" target="_blank">
|
||||
ameba/rule/style/while_true.cr
|
||||
</a>
|
||||
|
||||
|
@ -1070,14 +1070,14 @@
|
|||
<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 class="language-crystal">Style/WhileTrue:
|
||||
Enabled: true</code></pre>
|
||||
<pre><code class="language-crystal"><span class="t">Style</span><span class="o">/</span><span class="t">WhileTrue</span>:
|
||||
<span class="t">Enabled</span>: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L28" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L28" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1219,7 +1219,7 @@
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/97acedae/src/ameba/rule/style/while_true.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/80532da3/src/ameba/rule/style/while_true.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue