mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Deploying to gh-pages from @ 51b0a07e81
🚀
This commit is contained in:
parent
2f03204df2
commit
8d0a0f7c6a
93 changed files with 1813 additions and 1813 deletions
|
@ -3,21 +3,16 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Crystal Docs 0.34.0">
|
||||
<meta name="generator" content="Crystal Docs 0.35.1">
|
||||
<meta name="crystal_docs.project_version" content="master">
|
||||
<meta name="crystal_docs.project_name" content="ameba">
|
||||
|
||||
|
||||
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../js/doc.js"></script>
|
||||
|
||||
<svg class="hidden">
|
||||
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<meta id="repository-name" content="ameba">
|
||||
<meta name="repository-name" content="ameba">
|
||||
<title>Ameba::Config - ameba master</title>
|
||||
<script type="text/javascript">
|
||||
CrystalDocs.base_path = "../";
|
||||
|
@ -25,6 +20,11 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<svg class="hidden">
|
||||
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||
</symbol>
|
||||
</svg>
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<div class="search-box">
|
||||
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-results" class="hidden">
|
||||
<div class="search-results hidden">
|
||||
<ul class="search-list"></ul>
|
||||
</div>
|
||||
|
||||
|
@ -578,7 +578,7 @@
|
|||
|
||||
<p>Config can be loaded from configuration YAML file and adjusted.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> my_formatter</code></pre>
|
||||
|
||||
<p>By default config loads <code>.ameba.yml</code> file in a current directory.</p>
|
||||
|
@ -620,7 +620,7 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
</h2>
|
||||
|
||||
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L15" target="_blank">
|
||||
<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L15" target="_blank">
|
||||
ameba/config.cr
|
||||
</a>
|
||||
|
||||
|
@ -858,7 +858,7 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L86" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L86" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -875,13 +875,13 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
|
||||
<p>Loads YAML configuration file by <code>path</code>.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load</code></pre>
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L78" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L78" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -911,14 +911,14 @@ config.formatter <span class="o">=</span> my_formatter</code></pre>
|
|||
<p>Represents a list of paths to exclude from globs.
|
||||
Can have wildcards.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>, <span class="s">"src/server/*.cr"</span>]</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -936,14 +936,14 @@ config.excluded <span class="o">=</span> [<span class="s">"spec"</span
|
|||
<p>Represents a list of paths to exclude from globs.
|
||||
Can have wildcards.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>, <span class="s">"src/server/*.cr"</span>]</code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L56" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -961,7 +961,7 @@ config.excluded <span class="o">=</span> [<span class="s">"spec"</span
|
|||
<p>Returns a formatter to be used while inspecting files.
|
||||
If formatter is not set, it will return default formatter.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> custom_formatter
|
||||
config.formatter</code></pre>
|
||||
</div>
|
||||
|
@ -969,7 +969,7 @@ config.formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L114" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L114" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -985,7 +985,7 @@ config.formatter</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L34" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L34" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1002,14 +1002,14 @@ config.formatter</code></pre>
|
|||
|
||||
<p>Sets formatter by name.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.formatter <span class="o">=</span> <span class="n">:progress</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L125" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L125" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1028,7 +1028,7 @@ config.formatter <span class="o">=</span> <span class="n">:progress</span></code
|
|||
Represents a list of sources to be inspected.
|
||||
If globs are not set, it will return default list of files.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.globs</code></pre>
|
||||
</div>
|
||||
|
@ -1036,7 +1036,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1055,7 +1055,7 @@ config.globs</code></pre>
|
|||
Represents a list of sources to be inspected.
|
||||
If globs are not set, it will return default list of files.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.globs</code></pre>
|
||||
</div>
|
||||
|
@ -1063,7 +1063,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L47" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1079,7 +1079,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L35" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L35" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1095,7 +1095,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1111,7 +1111,7 @@ config.globs</code></pre>
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L36" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1128,7 +1128,7 @@ config.globs</code></pre>
|
|||
|
||||
<p>Returns a list of sources matching globs and excluded sections.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.sources <span class="c"># => list of default sources</span>
|
||||
config.globs <span class="o">=</span> [<span class="s">"**/*.cr"</span>]
|
||||
config.excluded <span class="o">=</span> [<span class="s">"spec"</span>]
|
||||
|
@ -1138,7 +1138,7 @@ config.sources <span class="c"># => list of sources pointing to files found b
|
|||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L100" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L100" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1155,14 +1155,14 @@ config.sources <span class="c"># => list of sources pointing to files found b
|
|||
|
||||
<p>Updates rule properties.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.update_rule <span class="s">"MyRuleName"</span>, enabled: <span class="n">false</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L140" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L140" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1179,18 +1179,18 @@ config.update_rule <span class="s">"MyRuleName"</span>, enabled: <span
|
|||
|
||||
<p>Updates rules properties.</p>
|
||||
|
||||
<pre><code>config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
<pre><code class="language-crystal">config <span class="o">=</span> <span class="t">Ameba</span><span class="t">::</span><span class="t">Config</span>.load
|
||||
config.update_rules <span class="s">%w(Rule1 Rule2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
|
||||
<p>also it allows to update groups of rules:</p>
|
||||
|
||||
<pre><code>config.update_rules <span class="s">%w(Group1 Group2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
<pre><code class="language-crystal">config.update_rules <span class="s">%w(Group1 Group2)</span>, enabled: <span class="n">true</span></code></pre>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div>
|
||||
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/d28f9f75/src/ameba/config.cr#L163" target="_blank">View source</a>]
|
||||
[<a href="https://github.com/crystal-ameba/ameba/blob/51b0a07e/src/ameba/config.cr#L163" target="_blank">View source</a>]
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue