Deployed 4f6ed155 to dev-snapshot with MkDocs 1.4.3 and mike 1.1.2
diff --git a/dev-snapshot/faq/index.html b/dev-snapshot/faq/index.html
index f23676e..b91517d 100644
--- a/dev-snapshot/faq/index.html
+++ b/dev-snapshot/faq/index.html
@@ -1052,20 +1052,15 @@
<p class="admonition-title">Tip</p>
<p>Suppressing a <code>ktlint</code> violation is meant primarily as an escape latch for the rare cases when <strong>ktlint</strong> is not able to produce the correct result. Please report any such instances using <a href="https://github.com/pinterest/ktlint/issues">GitHub Issues</a>).</p>
</div>
-<p>To disable a specific rule you'll need the rule identifier which is displayed at the end of the lint error.</p>
-<p>An error can be suppressed using:</p>
-<ul>
-<li>EOL comments</li>
-<li>Block comments</li>
-<li>@Suppress annotations</li>
-</ul>
-<div class="tabbed-set tabbed-alternate" data-tabs="1:3"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Suppress annotation</label><label for="__tabbed_1_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> EOL comments</label><label for="__tabbed_1_3"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Block comments</label></div>
+<p>To disable a specific rule you'll need the fully qualified rule identifier. This identifier is displayed at the end of the lint error. In case your code was autocorrected, you need to revert the code and run the <code>lint</code> task instead of the <code>format</code> to find the rule identifier.</p>
+<p>As of Ktlint 0.50, an error can only be suppressed using @Suppress or @SuppressWarnings annotations</p>
+<div class="tabbed-set tabbed-alternate" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Allowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="c1">// Suppressing all rules for the entire file</span>
<a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="nd">@file</span><span class="p">:</span><span class="n">Suppress</span><span class="p">(</span><span class="s">"ktlint"</span><span class="p">)</span>
<a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a>
-<a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="c1">// Suppress a single rule (with id 'rule-id', defined in rule set with id 'rule-set-id') from the annotated construct</span>
+<a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="c1">// Suppress a single rule (with id 'rule-id', defined in rule set with id 'rule-set-id') in the scope of the annotated construct</span>
<a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">"ktlint:rule-set-id:rule-id"</span><span class="p">)</span>
<a id="__codelineno-2-6" name="__codelineno-2-6" href="#__codelineno-2-6"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{}</span>
<a id="__codelineno-2-7" name="__codelineno-2-7" href="#__codelineno-2-7"></a>
@@ -1078,43 +1073,7 @@
<a id="__codelineno-2-14" name="__codelineno-2-14" href="#__codelineno-2-14"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span>
</code></pre></div>
</div>
-<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="c1">// Suppress a single rule for the commented line</span>
-<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span><span class="w"> </span><span class="c1">// ktlint-disable standard_no-wildcard-imports</span>
-<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a>
-<a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="c1">// Suppress multiple rules for the commented line</span>
-<a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span><span class="w"> </span><span class="c1">// ktlint-disable standard_no-wildcard-imports standard_other-rule-id</span>
-<a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a>
-<a id="__codelineno-3-7" name="__codelineno-3-7" href="#__codelineno-3-7"></a><span class="c1">// Suppress all rules for the commented line</span>
-<a id="__codelineno-3-8" name="__codelineno-3-8" href="#__codelineno-3-8"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span><span class="w"> </span><span class="c1">// ktlint-disable</span>
-</code></pre></div>
</div>
-<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="c1">// Suppress a single rule for all code between the start and end tag</span>
-<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="cm">/* ktlint-disable standard_no-wildcard-imports */</span>
-<a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span>
-<a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="cm">/* ktlint-disable standard_no-wildcard-imports */</span>
-<a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a>
-<a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a><span class="c1">// Suppress multiple rules for all code between the start and end tag</span>
-<a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a><span class="cm">/* ktlint-disable standard_no-wildcard-imports standard_no-wildcard-imports */</span>
-<a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span>
-<a id="__codelineno-4-9" name="__codelineno-4-9" href="#__codelineno-4-9"></a><span class="cm">/* ktlint-enable standard_no-wildcard-imports standard_no-wildcard-imports */</span>
-<a id="__codelineno-4-10" name="__codelineno-4-10" href="#__codelineno-4-10"></a>
-<a id="__codelineno-4-11" name="__codelineno-4-11" href="#__codelineno-4-11"></a><span class="c1">// Suppress all rules for all code between the start and end tag</span>
-<a id="__codelineno-4-12" name="__codelineno-4-12" href="#__codelineno-4-12"></a><span class="cm">/* ktlint-disable */</span>
-<a id="__codelineno-4-13" name="__codelineno-4-13" href="#__codelineno-4-13"></a><span class="k">import</span><span class="w"> </span><span class="nn">foo.*</span>
-<a id="__codelineno-4-14" name="__codelineno-4-14" href="#__codelineno-4-14"></a><span class="cm">/* ktlint-enable */</span>
-</code></pre></div>
-</div>
-</div>
-</div>
-<div class="admonition important">
-<p class="admonition-title">Important</p>
-<p>When using the block comments, the <code>ktlint-enable</code> directive needs to specify the exact same rule-id's and in the same order as the <code>ktlint-disable</code> directive.</p>
-</div>
-<div class="admonition warning">
-<p class="admonition-title">Warning</p>
-<p>From a consistency perspective seen, it might be best to <strong>not</strong> mix the (EOL/Block) comment style with the annotation style in the same project.</p>
</div>
<h2 id="how-do-i-globally-disable-a-rule-without-editorconfig">How do I globally disable a rule without <code>.editorconfig</code>?<a class="headerlink" href="#how-do-i-globally-disable-a-rule-without-editorconfig" title="Permanent link">¶</a></h2>
<p>When using Ktlint CLI, you may pass a list of disabled rules via the <code>--disabled_rules</code> command line flag. The value is a comma separated list of rule id's that have to be disabled. The rule id must be fully qualified (e.g. must be prefixed with the rule set id). </p>
@@ -1122,12 +1081,12 @@
<p>The <code>.editorconfig</code> properties <code>disabled_rules</code> and <code>ktlint_disabled_rules</code> are deprecated as of KtLint version <code>0.48</code> and are removed in version <code>0.49</code>. Those properties contain a comma separated list of rules which are disabled. Using a comma separated list of values has some disadvantages.</p>
<p>A big disadvantage is that it is not possible to override the property partially in an <code>.editorconfig</code> file in a subpackage. Another disadvantage is that it is not possible to express explicitly that a rule is enabled. Lastly, (qualified) rule ids can be 20 characters or longer, which makes a list with multiple entries hard to read.</p>
<p>Starting with KtLint <code>0.48</code> entire rule sets and individual rules can be disabled / enabled with a separate property per rule (set). Examples:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint
-<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a>ktlint_standard_final-newline = enabled # Enables the `final-newline` rule in the `standard` rule set provided by KtLint
-<a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a>ktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled
-<a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a>ktlint_standard_some-experimental-rule = disabled # Disables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint
-<a id="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a>ktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)
-<a id="__codelineno-5-6" name="__codelineno-5-6" href="#__codelineno-5-6"></a>ktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)
+<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint
+<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>ktlint_standard_final-newline = enabled # Enables the `final-newline` rule in the `standard` rule set provided by KtLint
+<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a>ktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled
+<a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a>ktlint_standard_some-experimental-rule = disabled # Disables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint
+<a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a>ktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)
+<a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a>ktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)
</code></pre></div></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
@@ -1155,33 +1114,33 @@
<p>Do not include the dependency <code>com.pinterest:ktlint</code> as that would import the entire ktlint project including unwanted dependencies. Besides a much bigger artifact, it might also result in problems regarding logging.</p>
</div>
<p>To format the output of KotlinPoet with KtLint, you can use the following snippet:</p>
-<p><div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">ruleProviders</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buildSet</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="w"> </span><span class="n">ServiceLoader</span>
-<a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="w"> </span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">RuleSetProviderV2</span><span class="o">::</span><span class="n">class</span><span class="p">.</span><span class="na">java</span><span class="p">)</span>
-<a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a><span class="w"> </span><span class="p">.</span><span class="na">flatMapTo</span><span class="p">(</span><span class="k">this</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="p">.</span><span class="na">getRuleProviders</span><span class="p">()</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-6-5" name="__codelineno-6-5" href="#__codelineno-6-5"></a><span class="p">}</span>
-<a id="__codelineno-6-6" name="__codelineno-6-6" href="#__codelineno-6-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">ktLintRuleEngine</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">KtLintRuleEngine</span><span class="p">(</span>
-<a id="__codelineno-6-7" name="__codelineno-6-7" href="#__codelineno-6-7"></a><span class="w"> </span><span class="n">ruleProviders</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ruleProviders</span><span class="p">,</span>
-<a id="__codelineno-6-8" name="__codelineno-6-8" href="#__codelineno-6-8"></a><span class="w"> </span><span class="n">editorConfigDefaults</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EditorConfigDefaults</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">EDITORCONFIG_PATH</span><span class="p">),</span>
-<a id="__codelineno-6-9" name="__codelineno-6-9" href="#__codelineno-6-9"></a><span class="p">)</span>
-<a id="__codelineno-6-10" name="__codelineno-6-10" href="#__codelineno-6-10"></a><span class="n">ktLintRuleEngine</span><span class="p">.</span><span class="na">format</span><span class="p">(</span><span class="n">outputDir</span><span class="p">.</span><span class="na">toPath</span><span class="p">())</span>
+<p><div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">ruleProviders</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buildSet</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="w"> </span><span class="n">ServiceLoader</span>
+<a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="w"> </span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">RuleSetProviderV2</span><span class="o">::</span><span class="n">class</span><span class="p">.</span><span class="na">java</span><span class="p">)</span>
+<a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="w"> </span><span class="p">.</span><span class="na">flatMapTo</span><span class="p">(</span><span class="k">this</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="p">.</span><span class="na">getRuleProviders</span><span class="p">()</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a><span class="p">}</span>
+<a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">ktLintRuleEngine</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">KtLintRuleEngine</span><span class="p">(</span>
+<a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a><span class="w"> </span><span class="n">ruleProviders</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ruleProviders</span><span class="p">,</span>
+<a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a><span class="w"> </span><span class="n">editorConfigDefaults</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">EditorConfigDefaults</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">EDITORCONFIG_PATH</span><span class="p">),</span>
+<a id="__codelineno-4-9" name="__codelineno-4-9" href="#__codelineno-4-9"></a><span class="p">)</span>
+<a id="__codelineno-4-10" name="__codelineno-4-10" href="#__codelineno-4-10"></a><span class="n">ktLintRuleEngine</span><span class="p">.</span><span class="na">format</span><span class="p">(</span><span class="n">outputDir</span><span class="p">.</span><span class="na">toPath</span><span class="p">())</span>
</code></pre></div>
Here, outputDir refers to the directory of the generated files by KotlinPoet, ktLintRuleEngine is an instance of KtLint rule engine.</p>
<p>It is also possible to format file-by-file the output of KotlinPoet if you write your <code>FileSpec</code> to a <code>StringBuilder()</code>, instead of a <code>File</code>,
and send the generated code as <code>String</code> to KtLint inside a <code>CodeSnippet</code>:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a><span class="n">kotlinFile</span><span class="p">.</span><span class="na">writeText</span><span class="p">(</span>
-<a id="__codelineno-7-2" name="__codelineno-7-2" href="#__codelineno-7-2"></a><span class="w"> </span><span class="n">ktLintRuleEngine</span><span class="p">.</span><span class="na">format</span><span class="p">(</span>
-<a id="__codelineno-7-3" name="__codelineno-7-3" href="#__codelineno-7-3"></a><span class="w"> </span><span class="n">Code</span><span class="p">.</span><span class="na">CodeSnippet</span><span class="p">(</span>
-<a id="__codelineno-7-4" name="__codelineno-7-4" href="#__codelineno-7-4"></a><span class="w"> </span><span class="n">stringBuilder</span><span class="p">.</span><span class="na">toString</span><span class="p">()</span>
-<a id="__codelineno-7-5" name="__codelineno-7-5" href="#__codelineno-7-5"></a><span class="w"> </span><span class="p">)</span>
-<a id="__codelineno-7-6" name="__codelineno-7-6" href="#__codelineno-7-6"></a><span class="w"> </span><span class="p">)</span>
-<a id="__codelineno-7-7" name="__codelineno-7-7" href="#__codelineno-7-7"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="n">kotlinFile</span><span class="p">.</span><span class="na">writeText</span><span class="p">(</span>
+<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="w"> </span><span class="n">ktLintRuleEngine</span><span class="p">.</span><span class="na">format</span><span class="p">(</span>
+<a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a><span class="w"> </span><span class="n">Code</span><span class="p">.</span><span class="na">CodeSnippet</span><span class="p">(</span>
+<a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a><span class="w"> </span><span class="n">stringBuilder</span><span class="p">.</span><span class="na">toString</span><span class="p">()</span>
+<a id="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-5-6" name="__codelineno-5-6" href="#__codelineno-5-6"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-5-7" name="__codelineno-5-7" href="#__codelineno-5-7"></a><span class="p">)</span>
</code></pre></div></p>
<h1 id="are-formatter-tags-respected">Are formatter tags respected?<a class="headerlink" href="#are-formatter-tags-respected" title="Permanent link">¶</a></h1>
<p>As of version <code>0.49.x</code> the formatter tags of IntelliJ IDEA are respected. By default, those formatter tags are disabled. The formatter tags can be enabled with <code>.editorconfig</code> properties below:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a>ij_formatter_tags_enabled = true # Defaults to 'false'
-<a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a>ij_formatter_off_tag = some-custom-off-tag # Defaults to '@formatter:off'
-<a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a>ij_formatter_on_tag = some-custom-on-tag # Defaults to '@formatter:on'
+<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>ij_formatter_tags_enabled = true # Defaults to 'false'
+<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a>ij_formatter_off_tag = some-custom-off-tag # Defaults to '@formatter:off'
+<a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a>ij_formatter_on_tag = some-custom-on-tag # Defaults to '@formatter:on'
</code></pre></div></p>
<p>When enabled, the ktlint rule checking is disabled for all code surrounded by the formatter tags.</p>
diff --git a/dev-snapshot/rules/experimental/index.html b/dev-snapshot/rules/experimental/index.html
index 3dd2b66..ad477be 100644
--- a/dev-snapshot/rules/experimental/index.html
+++ b/dev-snapshot/rules/experimental/index.html
@@ -1701,10 +1701,6 @@
<a id="__codelineno-23-3" name="__codelineno-23-3" href="#__codelineno-23-3"></a><span class="cm"> */</span>
<a id="__codelineno-23-4" name="__codelineno-23-4" href="#__codelineno-23-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="c1">// Some comment</span>
<a id="__codelineno-23-5" name="__codelineno-23-5" href="#__codelineno-23-5"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* no-op */</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-23-6" name="__codelineno-23-6" href="#__codelineno-23-6"></a>
-<a id="__codelineno-23-7" name="__codelineno-23-7" href="#__codelineno-23-7"></a><span class="cm">/* ktlint-disable foo-rule-id bar-rule-id */</span>
-<a id="__codelineno-23-8" name="__codelineno-23-8" href="#__codelineno-23-8"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
-<a id="__codelineno-23-9" name="__codelineno-23-9" href="#__codelineno-23-9"></a><span class="cm">/* ktlint-enable foo-rule-id bar-rule-id */</span>
</code></pre></div>
</div>
<div class="tabbed-block">
diff --git a/dev-snapshot/rules/standard/index.html b/dev-snapshot/rules/standard/index.html
index 018a58c..dbda392 100644
--- a/dev-snapshot/rules/standard/index.html
+++ b/dev-snapshot/rules/standard/index.html
@@ -622,6 +622,13 @@
</li>
<li class="md-nav__item">
+ <a href="#ktlint-suppression-rule" class="md-nav__link">
+ Ktlint-suppression rule
+ </a>
+
+</li>
+
+ <li class="md-nav__item">
<a href="#max-line-length" class="md-nav__link">
Max line length
</a>
@@ -1357,6 +1364,13 @@
</li>
<li class="md-nav__item">
+ <a href="#ktlint-suppression-rule" class="md-nav__link">
+ Ktlint-suppression rule
+ </a>
+
+</li>
+
+ <li class="md-nav__item">
<a href="#max-line-length" class="md-nav__link">
Max line length
</a>
@@ -1974,33 +1988,79 @@
<p>This rule handles indentation for many different language constructs which can not be summarized with a few examples. See the <a href="https://github.com/pinterest/ktlint/blob/master/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/IndentationRuleTest.kt">unit tests</a> for more details.</p>
</div>
<p>Rule id: <code>indent</code> (<code>standard</code> rule set)</p>
-<h2 id="max-line-length">Max line length<a class="headerlink" href="#max-line-length" title="Permanent link">¶</a></h2>
-<p>Ensures that lines do not exceed the given length of <code>.editorconfig</code> property <code>max_line_length</code> (see <a href="../configuration-ktlint/">EditorConfig</a> section for more). This rule does not apply in a number of situations. For example, in the case a line exceeds the maximum line length due to a comment that disables ktlint rules then that comment is being ignored when validating the length of the line. The <code>.editorconfig</code> property <code>ktlint_ignore_back_ticked_identifier</code> can be set to ignore identifiers which are enclosed in backticks, which for example is very useful when you want to allow longer names for unit tests.</p>
+<h2 id="ktlint-suppression-rule">Ktlint-suppression rule<a class="headerlink" href="#ktlint-suppression-rule" title="Permanent link">¶</a></h2>
+<p>The <code>ktlint-disable</code> and <code>ktlint-enable</code> directives are no longer supported as of ktlint version <code>0.50.0</code>. This rule migrates the directives to Suppress or SuppressWarnings annotations.</p>
+<p>Identifiers in the @Suppress and @SuppressWarnings annotations to suppress ktlint rules are checked for validity and autocorrected when possible. </p>
<div class="tabbed-set tabbed-alternate" data-tabs="9:2"><input checked="checked" id="__tabbed_9_1" name="__tabbed_9" type="radio" /><input id="__tabbed_9_2" name="__tabbed_9" type="radio" /><div class="tabbed-labels"><label for="__tabbed_9_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_9_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1" href="#__codelineno-17-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-17-2" name="__codelineno-17-2" href="#__codelineno-17-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-17-3" name="__codelineno-17-3" href="#__codelineno-17-3"></a><span class="c1">// Lines below are accepted although the max</span>
-<a id="__codelineno-17-4" name="__codelineno-17-4" href="#__codelineno-17-4"></a><span class="c1">// line length is exceeded.</span>
-<a id="__codelineno-17-5" name="__codelineno-17-5" href="#__codelineno-17-5"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.toooooooooooooooooooooooooooo.long</span>
-<a id="__codelineno-17-6" name="__codelineno-17-6" href="#__codelineno-17-6"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.tooooooooooooooooooooooooooooo.long</span>
-<a id="__codelineno-17-7" name="__codelineno-17-7" href="#__codelineno-17-7"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-17-8" name="__codelineno-17-8" href="#__codelineno-17-8"></a><span class="w"> </span><span class="s">"""</span>
-<a id="__codelineno-17-9" name="__codelineno-17-9" href="#__codelineno-17-9"></a><span class="s"> fooooooooooooooooooooooooooooooooooooooooo</span>
-<a id="__codelineno-17-10" name="__codelineno-17-10" href="#__codelineno-17-10"></a><span class="s"> """</span>
-<a id="__codelineno-17-11" name="__codelineno-17-11" href="#__codelineno-17-11"></a><span class="nd">@Test</span>
-<a id="__codelineno-17-12" name="__codelineno-17-12" href="#__codelineno-17-12"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">`Test description which is toooooooooooo long`</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-17-13" name="__codelineno-17-13" href="#__codelineno-17-13"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1" href="#__codelineno-17-1"></a><span class="nd">@file</span><span class="p">:</span><span class="n">Suppress</span><span class="p">(</span><span class="s">"ktlint:standard:no-wildcard-imports"</span><span class="p">)</span>
+<a id="__codelineno-17-2" name="__codelineno-17-2" href="#__codelineno-17-2"></a>
+<a id="__codelineno-17-3" name="__codelineno-17-3" href="#__codelineno-17-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-17-4" name="__codelineno-17-4" href="#__codelineno-17-4"></a><span class="w"> </span><span class="nd">@Suppress</span><span class="p">(</span><span class="s">"ktlint:standard:max-line-length"</span><span class="p">)</span>
+<a id="__codelineno-17-5" name="__codelineno-17-5" href="#__codelineno-17-5"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some longggggggggggggggggggg text"</span>
+<a id="__codelineno-17-6" name="__codelineno-17-6" href="#__codelineno-17-6"></a>
+<a id="__codelineno-17-7" name="__codelineno-17-7" href="#__codelineno-17-7"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-17-8" name="__codelineno-17-8" href="#__codelineno-17-8"></a><span class="w"> </span><span class="nd">@Suppress</span><span class="p">(</span><span class="s">"ktlint:standard:no-multi-spaces"</span><span class="p">)</span>
+<a id="__codelineno-17-9" name="__codelineno-17-9" href="#__codelineno-17-9"></a><span class="w"> </span><span class="n">listOf</span><span class="p">(</span>
+<a id="__codelineno-17-10" name="__codelineno-17-10" href="#__codelineno-17-10"></a><span class="w"> </span><span class="s">"1 One"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-17-11" name="__codelineno-17-11" href="#__codelineno-17-11"></a><span class="w"> </span><span class="s">"10 Ten"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-17-12" name="__codelineno-17-12" href="#__codelineno-17-12"></a><span class="w"> </span><span class="s">"100 Hundred"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-17-13" name="__codelineno-17-13" href="#__codelineno-17-13"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-17-14" name="__codelineno-17-14" href="#__codelineno-17-14"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-18-2" name="__codelineno-18-2" href="#__codelineno-18-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-18-3" name="__codelineno-18-3" href="#__codelineno-18-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"fooooooooooooooooooooo"</span>
-<a id="__codelineno-18-4" name="__codelineno-18-4" href="#__codelineno-18-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foooooooooooooo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foooooooooooooooooooo"</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-18-5" name="__codelineno-18-5" href="#__codelineno-18-5"></a><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooo</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-18-6" name="__codelineno-18-6" href="#__codelineno-18-6"></a><span class="w"> </span><span class="s">"foooooooooooooooooooooooooooooooooooooooo"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a><span class="cm">/* ktlint-disable standard:no-wildcard-imports */</span>
+<a id="__codelineno-18-2" name="__codelineno-18-2" href="#__codelineno-18-2"></a>
+<a id="__codelineno-18-3" name="__codelineno-18-3" href="#__codelineno-18-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-18-4" name="__codelineno-18-4" href="#__codelineno-18-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some longggggggggggggggggggg text"</span><span class="w"> </span><span class="c1">// ktlint-disable standard:max-line-length</span>
+<a id="__codelineno-18-5" name="__codelineno-18-5" href="#__codelineno-18-5"></a>
+<a id="__codelineno-18-6" name="__codelineno-18-6" href="#__codelineno-18-6"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-18-7" name="__codelineno-18-7" href="#__codelineno-18-7"></a><span class="w"> </span><span class="n">listOf</span><span class="p">(</span>
+<a id="__codelineno-18-8" name="__codelineno-18-8" href="#__codelineno-18-8"></a><span class="w"> </span><span class="cm">/* ktlint-disable standard:no-multi-spaces */</span>
+<a id="__codelineno-18-9" name="__codelineno-18-9" href="#__codelineno-18-9"></a><span class="w"> </span><span class="s">"1 One"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-18-10" name="__codelineno-18-10" href="#__codelineno-18-10"></a><span class="w"> </span><span class="s">"10 Ten"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-18-11" name="__codelineno-18-11" href="#__codelineno-18-11"></a><span class="w"> </span><span class="s">"100 Hundred"</span><span class="p">,</span><span class="w"> </span>
+<a id="__codelineno-18-12" name="__codelineno-18-12" href="#__codelineno-18-12"></a><span class="w"> </span><span class="cm">/* ktlint-enable standard:no-multi-spaces */</span>
+<a id="__codelineno-18-13" name="__codelineno-18-13" href="#__codelineno-18-13"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-18-14" name="__codelineno-18-14" href="#__codelineno-18-14"></a><span class="p">}</span>
+</code></pre></div>
+</div>
+</div>
+</div>
+<p>Rule id: <code>ktlint-suppression</code> (<code>standard</code> rule set)</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>This rule can not be disabled in the <code>.editorconfig</code>.</p>
+</div>
+<h2 id="max-line-length">Max line length<a class="headerlink" href="#max-line-length" title="Permanent link">¶</a></h2>
+<p>Ensures that lines do not exceed the given length of <code>.editorconfig</code> property <code>max_line_length</code> (see <a href="../configuration-ktlint/">EditorConfig</a> section for more). This rule does not apply in a number of situations. For example, in the case a line exceeds the maximum line length due to a comment that disables ktlint rules then that comment is being ignored when validating the length of the line. The <code>.editorconfig</code> property <code>ktlint_ignore_back_ticked_identifier</code> can be set to ignore identifiers which are enclosed in backticks, which for example is very useful when you want to allow longer names for unit tests.</p>
+<div class="tabbed-set tabbed-alternate" data-tabs="10:2"><input checked="checked" id="__tabbed_10_1" name="__tabbed_10" type="radio" /><input id="__tabbed_10_2" name="__tabbed_10" type="radio" /><div class="tabbed-labels"><label for="__tabbed_10_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_10_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-content">
+<div class="tabbed-block">
+<div class="highlight"><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-19-3" name="__codelineno-19-3" href="#__codelineno-19-3"></a><span class="c1">// Lines below are accepted although the max</span>
+<a id="__codelineno-19-4" name="__codelineno-19-4" href="#__codelineno-19-4"></a><span class="c1">// line length is exceeded.</span>
+<a id="__codelineno-19-5" name="__codelineno-19-5" href="#__codelineno-19-5"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.toooooooooooooooooooooooooooo.long</span>
+<a id="__codelineno-19-6" name="__codelineno-19-6" href="#__codelineno-19-6"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.tooooooooooooooooooooooooooooo.long</span>
+<a id="__codelineno-19-7" name="__codelineno-19-7" href="#__codelineno-19-7"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-19-8" name="__codelineno-19-8" href="#__codelineno-19-8"></a><span class="w"> </span><span class="s">"""</span>
+<a id="__codelineno-19-9" name="__codelineno-19-9" href="#__codelineno-19-9"></a><span class="s"> fooooooooooooooooooooooooooooooooooooooooo</span>
+<a id="__codelineno-19-10" name="__codelineno-19-10" href="#__codelineno-19-10"></a><span class="s"> """</span>
+<a id="__codelineno-19-11" name="__codelineno-19-11" href="#__codelineno-19-11"></a><span class="nd">@Test</span>
+<a id="__codelineno-19-12" name="__codelineno-19-12" href="#__codelineno-19-12"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">`Test description which is toooooooooooo long`</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-19-13" name="__codelineno-19-13" href="#__codelineno-19-13"></a><span class="p">}</span>
+</code></pre></div>
+</div>
+<div class="tabbed-block">
+<div class="highlight"><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1" href="#__codelineno-20-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-20-2" name="__codelineno-20-2" href="#__codelineno-20-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-20-3" name="__codelineno-20-3" href="#__codelineno-20-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"fooooooooooooooooooooo"</span>
+<a id="__codelineno-20-4" name="__codelineno-20-4" href="#__codelineno-20-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foooooooooooooo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foooooooooooooooooooo"</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-20-5" name="__codelineno-20-5" href="#__codelineno-20-5"></a><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooo</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-20-6" name="__codelineno-20-6" href="#__codelineno-20-6"></a><span class="w"> </span><span class="s">"foooooooooooooooooooooooooooooooooooooooo"</span>
</code></pre></div>
</div>
</div>
@@ -2008,22 +2068,22 @@
<p>Rule id: <code>max-line-length</code> (<code>standard</code> rule set)</p>
<h2 id="modifier-order">Modifier order<a class="headerlink" href="#modifier-order" title="Permanent link">¶</a></h2>
<p>Consistent order of modifiers</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="10:2"><input checked="checked" id="__tabbed_10_1" name="__tabbed_10" type="radio" /><input id="__tabbed_10_2" name="__tabbed_10" type="radio" /><div class="tabbed-labels"><label for="__tabbed_10_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_10_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="11:2"><input checked="checked" id="__tabbed_11_1" name="__tabbed_11" type="radio" /><input id="__tabbed_11_2" name="__tabbed_11" type="radio" /><div class="tabbed-labels"><label for="__tabbed_11_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_11_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
-<a id="__codelineno-19-3" name="__codelineno-19-3" href="#__codelineno-19-3"></a><span class="w"> </span><span class="kd">internal</span><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">):</span><span class="w"> </span><span class="kt">Any</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
-<a id="__codelineno-19-4" name="__codelineno-19-4" href="#__codelineno-19-4"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">lateinit</span><span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nv">lv</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-19-5" name="__codelineno-19-5" href="#__codelineno-19-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-21-2" name="__codelineno-21-2" href="#__codelineno-21-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
+<a id="__codelineno-21-3" name="__codelineno-21-3" href="#__codelineno-21-3"></a><span class="w"> </span><span class="kd">internal</span><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">):</span><span class="w"> </span><span class="kt">Any</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
+<a id="__codelineno-21-4" name="__codelineno-21-4" href="#__codelineno-21-4"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">lateinit</span><span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nv">lv</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-21-5" name="__codelineno-21-5" href="#__codelineno-21-5"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1" href="#__codelineno-20-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-20-2" name="__codelineno-20-2" href="#__codelineno-20-2"></a><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
-<a id="__codelineno-20-3" name="__codelineno-20-3" href="#__codelineno-20-3"></a><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">internal</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">):</span><span class="w"> </span><span class="kt">Any</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
-<a id="__codelineno-20-4" name="__codelineno-20-4" href="#__codelineno-20-4"></a><span class="w"> </span><span class="kd">lateinit</span><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nv">lv</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-20-5" name="__codelineno-20-5" href="#__codelineno-20-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-22-1" name="__codelineno-22-1" href="#__codelineno-22-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-22-2" name="__codelineno-22-2" href="#__codelineno-22-2"></a><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
+<a id="__codelineno-22-3" name="__codelineno-22-3" href="#__codelineno-22-3"></a><span class="w"> </span><span class="kd">open</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">internal</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">):</span><span class="w"> </span><span class="kt">Any</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
+<a id="__codelineno-22-4" name="__codelineno-22-4" href="#__codelineno-22-4"></a><span class="w"> </span><span class="kd">lateinit</span><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nv">lv</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-22-5" name="__codelineno-22-5" href="#__codelineno-22-5"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2031,23 +2091,23 @@
<p>Rule id: <code>modifier-order</code> (<code>standard</code> rule set)</p>
<h2 id="multiline-if-else">Multiline if-else<a class="headerlink" href="#multiline-if-else" title="Permanent link">¶</a></h2>
<p>Braces required for multiline if/else statements.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="11:2"><input checked="checked" id="__tabbed_11_1" name="__tabbed_11" type="radio" /><input id="__tabbed_11_2" name="__tabbed_11" type="radio" /><div class="tabbed-labels"><label for="__tabbed_11_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_11_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="12:2"><input checked="checked" id="__tabbed_12_1" name="__tabbed_12" type="radio" /><input id="__tabbed_12_2" name="__tabbed_12" type="radio" /><div class="tabbed-labels"><label for="__tabbed_12_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_12_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-21-2" name="__codelineno-21-2" href="#__codelineno-21-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-21-3" name="__codelineno-21-3" href="#__codelineno-21-3"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">0</span>
-<a id="__codelineno-21-4" name="__codelineno-21-4" href="#__codelineno-21-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-21-5" name="__codelineno-21-5" href="#__codelineno-21-5"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">1</span>
-<a id="__codelineno-21-6" name="__codelineno-21-6" href="#__codelineno-21-6"></a><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-23-1" name="__codelineno-23-1" href="#__codelineno-23-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-23-2" name="__codelineno-23-2" href="#__codelineno-23-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-23-3" name="__codelineno-23-3" href="#__codelineno-23-3"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">0</span>
+<a id="__codelineno-23-4" name="__codelineno-23-4" href="#__codelineno-23-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-23-5" name="__codelineno-23-5" href="#__codelineno-23-5"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">1</span>
+<a id="__codelineno-23-6" name="__codelineno-23-6" href="#__codelineno-23-6"></a><span class="w"> </span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-22-1" name="__codelineno-22-1" href="#__codelineno-22-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-22-2" name="__codelineno-22-2" href="#__codelineno-22-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span>
-<a id="__codelineno-22-3" name="__codelineno-22-3" href="#__codelineno-22-3"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">0</span>
-<a id="__codelineno-22-4" name="__codelineno-22-4" href="#__codelineno-22-4"></a><span class="w"> </span><span class="k">else</span>
-<a id="__codelineno-22-5" name="__codelineno-22-5" href="#__codelineno-22-5"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">1</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-24-1" name="__codelineno-24-1" href="#__codelineno-24-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-24-2" name="__codelineno-24-2" href="#__codelineno-24-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span>
+<a id="__codelineno-24-3" name="__codelineno-24-3" href="#__codelineno-24-3"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">0</span>
+<a id="__codelineno-24-4" name="__codelineno-24-4" href="#__codelineno-24-4"></a><span class="w"> </span><span class="k">else</span>
+<a id="__codelineno-24-5" name="__codelineno-24-5" href="#__codelineno-24-5"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="m">1</span>
</code></pre></div>
</div>
</div>
@@ -2055,121 +2115,121 @@
<p>Rule id: <code>multiline-if-else</code> (<code>standard</code> rule set)</p>
<h2 id="no-blank-lines-before">No blank lines before <code>}</code><a class="headerlink" href="#no-blank-lines-before" title="Permanent link">¶</a></h2>
<p>No blank lines before <code>}</code>.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="12:2"><input checked="checked" id="__tabbed_12_1" name="__tabbed_12" type="radio" /><input id="__tabbed_12_2" name="__tabbed_12" type="radio" /><div class="tabbed-labels"><label for="__tabbed_12_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_12_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="13:2"><input checked="checked" id="__tabbed_13_1" name="__tabbed_13" type="radio" /><input id="__tabbed_13_2" name="__tabbed_13" type="radio" /><div class="tabbed-labels"><label for="__tabbed_13_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_13_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-23-1" name="__codelineno-23-1" href="#__codelineno-23-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-23-2" name="__codelineno-23-2" href="#__codelineno-23-2"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-23-3" name="__codelineno-23-3" href="#__codelineno-23-3"></a><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-23-4" name="__codelineno-23-4" href="#__codelineno-23-4"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
-<a id="__codelineno-23-5" name="__codelineno-23-5" href="#__codelineno-23-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-25-1" name="__codelineno-25-1" href="#__codelineno-25-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-25-2" name="__codelineno-25-2" href="#__codelineno-25-2"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-25-3" name="__codelineno-25-3" href="#__codelineno-25-3"></a><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-25-4" name="__codelineno-25-4" href="#__codelineno-25-4"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
+<a id="__codelineno-25-5" name="__codelineno-25-5" href="#__codelineno-25-5"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-24-1" name="__codelineno-24-1" href="#__codelineno-24-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-24-2" name="__codelineno-24-2" href="#__codelineno-24-2"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-24-3" name="__codelineno-24-3" href="#__codelineno-24-3"></a>
-<a id="__codelineno-24-4" name="__codelineno-24-4" href="#__codelineno-24-4"></a><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-24-5" name="__codelineno-24-5" href="#__codelineno-24-5"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
-<a id="__codelineno-24-6" name="__codelineno-24-6" href="#__codelineno-24-6"></a>
-<a id="__codelineno-24-7" name="__codelineno-24-7" href="#__codelineno-24-7"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-26-1" name="__codelineno-26-1" href="#__codelineno-26-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-26-2" name="__codelineno-26-2" href="#__codelineno-26-2"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-26-3" name="__codelineno-26-3" href="#__codelineno-26-3"></a>
+<a id="__codelineno-26-4" name="__codelineno-26-4" href="#__codelineno-26-4"></a><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-26-5" name="__codelineno-26-5" href="#__codelineno-26-5"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
+<a id="__codelineno-26-6" name="__codelineno-26-6" href="#__codelineno-26-6"></a>
+<a id="__codelineno-26-7" name="__codelineno-26-7" href="#__codelineno-26-7"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
</div>
<p>Rule id: <code>no-blank-line-before-rbrace</code> (<code>standard</code> rule set)</p>
<h2 id="no-blank-lines-in-chained-method-calls">No blank lines in chained method calls<a class="headerlink" href="#no-blank-lines-in-chained-method-calls" title="Permanent link">¶</a></h2>
-<div class="tabbed-set tabbed-alternate" data-tabs="13:2"><input checked="checked" id="__tabbed_13_1" name="__tabbed_13" type="radio" /><input id="__tabbed_13_2" name="__tabbed_13" type="radio" /><div class="tabbed-labels"><label for="__tabbed_13_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_13_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="14:2"><input checked="checked" id="__tabbed_14_1" name="__tabbed_14" type="radio" /><input id="__tabbed_14_2" name="__tabbed_14" type="radio" /><div class="tabbed-labels"><label for="__tabbed_14_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_14_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-25-1" name="__codelineno-25-1" href="#__codelineno-25-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="n">inputText</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-25-2" name="__codelineno-25-2" href="#__codelineno-25-2"></a><span class="w"> </span><span class="n">inputText</span>
-<a id="__codelineno-25-3" name="__codelineno-25-3" href="#__codelineno-25-3"></a><span class="w"> </span><span class="p">.</span><span class="na">lowercase</span><span class="p">(</span><span class="n">Locale</span><span class="p">.</span><span class="na">getDefault</span><span class="p">())</span>
-<a id="__codelineno-25-4" name="__codelineno-25-4" href="#__codelineno-25-4"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-27-1" name="__codelineno-27-1" href="#__codelineno-27-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="n">inputText</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-27-2" name="__codelineno-27-2" href="#__codelineno-27-2"></a><span class="w"> </span><span class="n">inputText</span>
+<a id="__codelineno-27-3" name="__codelineno-27-3" href="#__codelineno-27-3"></a><span class="w"> </span><span class="p">.</span><span class="na">lowercase</span><span class="p">(</span><span class="n">Locale</span><span class="p">.</span><span class="na">getDefault</span><span class="p">())</span>
+<a id="__codelineno-27-4" name="__codelineno-27-4" href="#__codelineno-27-4"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-26-1" name="__codelineno-26-1" href="#__codelineno-26-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="n">inputText</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-26-2" name="__codelineno-26-2" href="#__codelineno-26-2"></a><span class="w"> </span><span class="n">inputText</span>
-<a id="__codelineno-26-3" name="__codelineno-26-3" href="#__codelineno-26-3"></a>
-<a id="__codelineno-26-4" name="__codelineno-26-4" href="#__codelineno-26-4"></a><span class="w"> </span><span class="p">.</span><span class="na">lowercase</span><span class="p">(</span><span class="n">Locale</span><span class="p">.</span><span class="na">getDefault</span><span class="p">())</span>
-<a id="__codelineno-26-5" name="__codelineno-26-5" href="#__codelineno-26-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-28-1" name="__codelineno-28-1" href="#__codelineno-28-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="n">inputText</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-28-2" name="__codelineno-28-2" href="#__codelineno-28-2"></a><span class="w"> </span><span class="n">inputText</span>
+<a id="__codelineno-28-3" name="__codelineno-28-3" href="#__codelineno-28-3"></a>
+<a id="__codelineno-28-4" name="__codelineno-28-4" href="#__codelineno-28-4"></a><span class="w"> </span><span class="p">.</span><span class="na">lowercase</span><span class="p">(</span><span class="n">Locale</span><span class="p">.</span><span class="na">getDefault</span><span class="p">())</span>
+<a id="__codelineno-28-5" name="__codelineno-28-5" href="#__codelineno-28-5"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
</div>
<p>Rule id: <code>no-blank-lines-in-chained-method-calls</code> (<code>standard</code> rule set)</p>
<h2 id="no-consecutive-blank-lines">No consecutive blank lines<a class="headerlink" href="#no-consecutive-blank-lines" title="Permanent link">¶</a></h2>
-<div class="tabbed-set tabbed-alternate" data-tabs="14:2"><input checked="checked" id="__tabbed_14_1" name="__tabbed_14" type="radio" /><input id="__tabbed_14_2" name="__tabbed_14" type="radio" /><div class="tabbed-labels"><label for="__tabbed_14_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_14_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="15:2"><input checked="checked" id="__tabbed_15_1" name="__tabbed_15" type="radio" /><input id="__tabbed_15_2" name="__tabbed_15" type="radio" /><div class="tabbed-labels"><label for="__tabbed_15_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_15_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-27-1" name="__codelineno-27-1" href="#__codelineno-27-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.test</span>
-<a id="__codelineno-27-2" name="__codelineno-27-2" href="#__codelineno-27-2"></a>
-<a id="__codelineno-27-3" name="__codelineno-27-3" href="#__codelineno-27-3"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.test.util</span>
-<a id="__codelineno-27-4" name="__codelineno-27-4" href="#__codelineno-27-4"></a>
-<a id="__codelineno-27-5" name="__codelineno-27-5" href="#__codelineno-27-5"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"a"</span>
-<a id="__codelineno-27-6" name="__codelineno-27-6" href="#__codelineno-27-6"></a>
-<a id="__codelineno-27-7" name="__codelineno-27-7" href="#__codelineno-27-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-27-8" name="__codelineno-27-8" href="#__codelineno-27-8"></a><span class="p">}</span>
-<a id="__codelineno-27-9" name="__codelineno-27-9" href="#__codelineno-27-9"></a>
-<a id="__codelineno-27-10" name="__codelineno-27-10" href="#__codelineno-27-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">c</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-29-1" name="__codelineno-29-1" href="#__codelineno-29-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.test</span>
+<a id="__codelineno-29-2" name="__codelineno-29-2" href="#__codelineno-29-2"></a>
+<a id="__codelineno-29-3" name="__codelineno-29-3" href="#__codelineno-29-3"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.test.util</span>
+<a id="__codelineno-29-4" name="__codelineno-29-4" href="#__codelineno-29-4"></a>
+<a id="__codelineno-29-5" name="__codelineno-29-5" href="#__codelineno-29-5"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"a"</span>
+<a id="__codelineno-29-6" name="__codelineno-29-6" href="#__codelineno-29-6"></a>
+<a id="__codelineno-29-7" name="__codelineno-29-7" href="#__codelineno-29-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-29-8" name="__codelineno-29-8" href="#__codelineno-29-8"></a><span class="p">}</span>
+<a id="__codelineno-29-9" name="__codelineno-29-9" href="#__codelineno-29-9"></a>
+<a id="__codelineno-29-10" name="__codelineno-29-10" href="#__codelineno-29-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">c</span><span class="p">()</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-28-1" name="__codelineno-28-1" href="#__codelineno-28-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.test</span>
-<a id="__codelineno-28-2" name="__codelineno-28-2" href="#__codelineno-28-2"></a>
-<a id="__codelineno-28-3" name="__codelineno-28-3" href="#__codelineno-28-3"></a>
-<a id="__codelineno-28-4" name="__codelineno-28-4" href="#__codelineno-28-4"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.test.util</span>
-<a id="__codelineno-28-5" name="__codelineno-28-5" href="#__codelineno-28-5"></a>
-<a id="__codelineno-28-6" name="__codelineno-28-6" href="#__codelineno-28-6"></a>
-<a id="__codelineno-28-7" name="__codelineno-28-7" href="#__codelineno-28-7"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"a"</span>
-<a id="__codelineno-28-8" name="__codelineno-28-8" href="#__codelineno-28-8"></a>
-<a id="__codelineno-28-9" name="__codelineno-28-9" href="#__codelineno-28-9"></a>
-<a id="__codelineno-28-10" name="__codelineno-28-10" href="#__codelineno-28-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-28-11" name="__codelineno-28-11" href="#__codelineno-28-11"></a><span class="p">}</span>
-<a id="__codelineno-28-12" name="__codelineno-28-12" href="#__codelineno-28-12"></a>
-<a id="__codelineno-28-13" name="__codelineno-28-13" href="#__codelineno-28-13"></a>
-<a id="__codelineno-28-14" name="__codelineno-28-14" href="#__codelineno-28-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">c</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-30-1" name="__codelineno-30-1" href="#__codelineno-30-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">com.test</span>
+<a id="__codelineno-30-2" name="__codelineno-30-2" href="#__codelineno-30-2"></a>
+<a id="__codelineno-30-3" name="__codelineno-30-3" href="#__codelineno-30-3"></a>
+<a id="__codelineno-30-4" name="__codelineno-30-4" href="#__codelineno-30-4"></a><span class="k">import</span><span class="w"> </span><span class="nn">com.test.util</span>
+<a id="__codelineno-30-5" name="__codelineno-30-5" href="#__codelineno-30-5"></a>
+<a id="__codelineno-30-6" name="__codelineno-30-6" href="#__codelineno-30-6"></a>
+<a id="__codelineno-30-7" name="__codelineno-30-7" href="#__codelineno-30-7"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"a"</span>
+<a id="__codelineno-30-8" name="__codelineno-30-8" href="#__codelineno-30-8"></a>
+<a id="__codelineno-30-9" name="__codelineno-30-9" href="#__codelineno-30-9"></a>
+<a id="__codelineno-30-10" name="__codelineno-30-10" href="#__codelineno-30-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-30-11" name="__codelineno-30-11" href="#__codelineno-30-11"></a><span class="p">}</span>
+<a id="__codelineno-30-12" name="__codelineno-30-12" href="#__codelineno-30-12"></a>
+<a id="__codelineno-30-13" name="__codelineno-30-13" href="#__codelineno-30-13"></a>
+<a id="__codelineno-30-14" name="__codelineno-30-14" href="#__codelineno-30-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">c</span><span class="p">()</span>
</code></pre></div>
</div>
</div>
</div>
<p>Rule id: <code>no-consecutive-blank-lines</code> (<code>standard</code> rule set)</p>
<h2 id="no-empty-class-bodies">No empty (<code>{}</code>) class bodies<a class="headerlink" href="#no-empty-class-bodies" title="Permanent link">¶</a></h2>
-<div class="tabbed-set tabbed-alternate" data-tabs="15:2"><input checked="checked" id="__tabbed_15_1" name="__tabbed_15" type="radio" /><input id="__tabbed_15_2" name="__tabbed_15" type="radio" /><div class="tabbed-labels"><label for="__tabbed_15_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_15_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="16:2"><input checked="checked" id="__tabbed_16_1" name="__tabbed_16" type="radio" /><input id="__tabbed_16_2" name="__tabbed_16" type="radio" /><div class="tabbed-labels"><label for="__tabbed_16_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_16_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-29-1" name="__codelineno-29-1" href="#__codelineno-29-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">C</span>
-<a id="__codelineno-29-2" name="__codelineno-29-2" href="#__codelineno-29-2"></a><span class="kd">data</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">DC</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span>
-<a id="__codelineno-29-3" name="__codelineno-29-3" href="#__codelineno-29-3"></a><span class="kd">interface</span><span class="w"> </span><span class="nc">I</span>
-<a id="__codelineno-29-4" name="__codelineno-29-4" href="#__codelineno-29-4"></a><span class="kd">object</span><span class="w"> </span><span class="nc">O</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-31-1" name="__codelineno-31-1" href="#__codelineno-31-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">C</span>
+<a id="__codelineno-31-2" name="__codelineno-31-2" href="#__codelineno-31-2"></a><span class="kd">data</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">DC</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span>
+<a id="__codelineno-31-3" name="__codelineno-31-3" href="#__codelineno-31-3"></a><span class="kd">interface</span><span class="w"> </span><span class="nc">I</span>
+<a id="__codelineno-31-4" name="__codelineno-31-4" href="#__codelineno-31-4"></a><span class="kd">object</span><span class="w"> </span><span class="nc">O</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-30-1" name="__codelineno-30-1" href="#__codelineno-30-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">C</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-30-2" name="__codelineno-30-2" href="#__codelineno-30-2"></a><span class="kd">data</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">DC</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-30-3" name="__codelineno-30-3" href="#__codelineno-30-3"></a><span class="kd">interface</span><span class="w"> </span><span class="nc">I</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-30-4" name="__codelineno-30-4" href="#__codelineno-30-4"></a><span class="p">}</span>
-<a id="__codelineno-30-5" name="__codelineno-30-5" href="#__codelineno-30-5"></a><span class="kd">object</span><span class="w"> </span><span class="nc">O</span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-32-1" name="__codelineno-32-1" href="#__codelineno-32-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">C</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-32-2" name="__codelineno-32-2" href="#__codelineno-32-2"></a><span class="kd">data</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">DC</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">v</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-32-3" name="__codelineno-32-3" href="#__codelineno-32-3"></a><span class="kd">interface</span><span class="w"> </span><span class="nc">I</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-32-4" name="__codelineno-32-4" href="#__codelineno-32-4"></a><span class="p">}</span>
+<a id="__codelineno-32-5" name="__codelineno-32-5" href="#__codelineno-32-5"></a><span class="kd">object</span><span class="w"> </span><span class="nc">O</span><span class="p">{}</span>
</code></pre></div>
</div>
</div>
</div>
<p>Rule id: <code>no-empty-class-body</code> (<code>standard</code> rule set)</p>
<h2 id="no-leading-empty-lines-in-method-blocks">No leading empty lines in method blocks<a class="headerlink" href="#no-leading-empty-lines-in-method-blocks" title="Permanent link">¶</a></h2>
-<div class="tabbed-set tabbed-alternate" data-tabs="16:2"><input checked="checked" id="__tabbed_16_1" name="__tabbed_16" type="radio" /><input id="__tabbed_16_2" name="__tabbed_16" type="radio" /><div class="tabbed-labels"><label for="__tabbed_16_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_16_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="17:2"><input checked="checked" id="__tabbed_17_1" name="__tabbed_17" type="radio" /><input id="__tabbed_17_2" name="__tabbed_17" type="radio" /><div class="tabbed-labels"><label for="__tabbed_17_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_17_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-31-1" name="__codelineno-31-1" href="#__codelineno-31-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-31-2" name="__codelineno-31-2" href="#__codelineno-31-2"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-31-3" name="__codelineno-31-3" href="#__codelineno-31-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-33-1" name="__codelineno-33-1" href="#__codelineno-33-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-33-2" name="__codelineno-33-2" href="#__codelineno-33-2"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-33-3" name="__codelineno-33-3" href="#__codelineno-33-3"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-32-1" name="__codelineno-32-1" href="#__codelineno-32-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-32-2" name="__codelineno-32-2" href="#__codelineno-32-2"></a>
-<a id="__codelineno-32-3" name="__codelineno-32-3" href="#__codelineno-32-3"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-32-4" name="__codelineno-32-4" href="#__codelineno-32-4"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-34-1" name="__codelineno-34-1" href="#__codelineno-34-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-34-2" name="__codelineno-34-2" href="#__codelineno-34-2"></a>
+<a id="__codelineno-34-3" name="__codelineno-34-3" href="#__codelineno-34-3"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-34-4" name="__codelineno-34-4" href="#__codelineno-34-4"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2177,27 +2237,27 @@
<p>Rule id: <code>no-empty-first-line-in-method-block</code> (<code>standard</code> rule set)</p>
<h2 id="no-line-break-after-else">No line break after else<a class="headerlink" href="#no-line-break-after-else" title="Permanent link">¶</a></h2>
<p>Disallows line breaks after the else keyword if that could lead to confusion, for example:</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="17:2"><input checked="checked" id="__tabbed_17_1" name="__tabbed_17" type="radio" /><input id="__tabbed_17_2" name="__tabbed_17" type="radio" /><div class="tabbed-labels"><label for="__tabbed_17_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_17_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="18:2"><input checked="checked" id="__tabbed_18_1" name="__tabbed_18" type="radio" /><input id="__tabbed_18_2" name="__tabbed_18" type="radio" /><div class="tabbed-labels"><label for="__tabbed_18_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_18_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-33-1" name="__codelineno-33-1" href="#__codelineno-33-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">funA</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-33-2" name="__codelineno-33-2" href="#__codelineno-33-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionA</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-33-3" name="__codelineno-33-3" href="#__codelineno-33-3"></a><span class="w"> </span><span class="n">doSomething</span><span class="p">()</span>
-<a id="__codelineno-33-4" name="__codelineno-33-4" href="#__codelineno-33-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionB</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-33-5" name="__codelineno-33-5" href="#__codelineno-33-5"></a><span class="w"> </span><span class="n">doAnotherThing</span><span class="p">()</span>
-<a id="__codelineno-33-6" name="__codelineno-33-6" href="#__codelineno-33-6"></a><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-33-7" name="__codelineno-33-7" href="#__codelineno-33-7"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-35-1" name="__codelineno-35-1" href="#__codelineno-35-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">funA</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-35-2" name="__codelineno-35-2" href="#__codelineno-35-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionA</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-35-3" name="__codelineno-35-3" href="#__codelineno-35-3"></a><span class="w"> </span><span class="n">doSomething</span><span class="p">()</span>
+<a id="__codelineno-35-4" name="__codelineno-35-4" href="#__codelineno-35-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionB</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-35-5" name="__codelineno-35-5" href="#__codelineno-35-5"></a><span class="w"> </span><span class="n">doAnotherThing</span><span class="p">()</span>
+<a id="__codelineno-35-6" name="__codelineno-35-6" href="#__codelineno-35-6"></a><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-35-7" name="__codelineno-35-7" href="#__codelineno-35-7"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-34-1" name="__codelineno-34-1" href="#__codelineno-34-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">funA</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-34-2" name="__codelineno-34-2" href="#__codelineno-34-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionA</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-34-3" name="__codelineno-34-3" href="#__codelineno-34-3"></a><span class="w"> </span><span class="n">doSomething</span><span class="p">()</span>
-<a id="__codelineno-34-4" name="__codelineno-34-4" href="#__codelineno-34-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span>
-<a id="__codelineno-34-5" name="__codelineno-34-5" href="#__codelineno-34-5"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionB</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-34-6" name="__codelineno-34-6" href="#__codelineno-34-6"></a><span class="w"> </span><span class="n">doAnotherThing</span><span class="p">()</span>
-<a id="__codelineno-34-7" name="__codelineno-34-7" href="#__codelineno-34-7"></a><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-34-8" name="__codelineno-34-8" href="#__codelineno-34-8"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-36-1" name="__codelineno-36-1" href="#__codelineno-36-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">funA</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-36-2" name="__codelineno-36-2" href="#__codelineno-36-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionA</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-36-3" name="__codelineno-36-3" href="#__codelineno-36-3"></a><span class="w"> </span><span class="n">doSomething</span><span class="p">()</span>
+<a id="__codelineno-36-4" name="__codelineno-36-4" href="#__codelineno-36-4"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span>
+<a id="__codelineno-36-5" name="__codelineno-36-5" href="#__codelineno-36-5"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">conditionB</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-36-6" name="__codelineno-36-6" href="#__codelineno-36-6"></a><span class="w"> </span><span class="n">doAnotherThing</span><span class="p">()</span>
+<a id="__codelineno-36-7" name="__codelineno-36-7" href="#__codelineno-36-7"></a><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-36-8" name="__codelineno-36-8" href="#__codelineno-36-8"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2205,16 +2265,16 @@
<p>Rule id: <code>no-line-break-after-else</code> (<code>standard</code> rule set)</p>
<h2 id="no-line-break-before-assignment">No line break before assignment<a class="headerlink" href="#no-line-break-before-assignment" title="Permanent link">¶</a></h2>
<p>When a line is broken at an assignment (<code>=</code>) operator the break comes after the symbol.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="18:2"><input checked="checked" id="__tabbed_18_1" name="__tabbed_18" type="radio" /><input id="__tabbed_18_2" name="__tabbed_18" type="radio" /><div class="tabbed-labels"><label for="__tabbed_18_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_18_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="19:2"><input checked="checked" id="__tabbed_19_1" name="__tabbed_19" type="radio" /><input id="__tabbed_19_2" name="__tabbed_19" type="radio" /><div class="tabbed-labels"><label for="__tabbed_19_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_19_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-35-1" name="__codelineno-35-1" href="#__codelineno-35-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">valA</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-35-2" name="__codelineno-35-2" href="#__codelineno-35-2"></a><span class="w"> </span><span class="s">""</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-37-1" name="__codelineno-37-1" href="#__codelineno-37-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">valA</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-37-2" name="__codelineno-37-2" href="#__codelineno-37-2"></a><span class="w"> </span><span class="s">""</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-36-1" name="__codelineno-36-1" href="#__codelineno-36-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">valA</span>
-<a id="__codelineno-36-2" name="__codelineno-36-2" href="#__codelineno-36-2"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-38-1" name="__codelineno-38-1" href="#__codelineno-38-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">valA</span>
+<a id="__codelineno-38-2" name="__codelineno-38-2" href="#__codelineno-38-2"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span>
</code></pre></div>
</div>
</div>
@@ -2222,18 +2282,18 @@
<p>Rule id: <code>no-line-break-before-assignment</code> (<code>standard</code> rule set)</p>
<h2 id="no-multi-spaces">No multi spaces<a class="headerlink" href="#no-multi-spaces" title="Permanent link">¶</a></h2>
<p>Except in indentation and in KDoc's it is not allowed to have multiple consecutive spaces.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="19:2"><input checked="checked" id="__tabbed_19_1" name="__tabbed_19" type="radio" /><input id="__tabbed_19_2" name="__tabbed_19" type="radio" /><div class="tabbed-labels"><label for="__tabbed_19_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_19_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="20:2"><input checked="checked" id="__tabbed_20_1" name="__tabbed_20" type="radio" /><input id="__tabbed_20_2" name="__tabbed_20" type="radio" /><div class="tabbed-labels"><label for="__tabbed_20_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_20_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-37-1" name="__codelineno-37-1" href="#__codelineno-37-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-37-2" name="__codelineno-37-2" href="#__codelineno-37-2"></a><span class="w"> </span><span class="n">x</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
-<a id="__codelineno-37-3" name="__codelineno-37-3" href="#__codelineno-37-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-39-1" name="__codelineno-39-1" href="#__codelineno-39-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-39-2" name="__codelineno-39-2" href="#__codelineno-39-2"></a><span class="w"> </span><span class="n">x</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<a id="__codelineno-39-3" name="__codelineno-39-3" href="#__codelineno-39-3"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-38-1" name="__codelineno-38-1" href="#__codelineno-38-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-38-2" name="__codelineno-38-2" href="#__codelineno-38-2"></a><span class="w"> </span><span class="n">x</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
-<a id="__codelineno-38-3" name="__codelineno-38-3" href="#__codelineno-38-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-40-1" name="__codelineno-40-1" href="#__codelineno-40-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-40-2" name="__codelineno-40-2" href="#__codelineno-40-2"></a><span class="w"> </span><span class="n">x</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<a id="__codelineno-40-3" name="__codelineno-40-3" href="#__codelineno-40-3"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2241,26 +2301,26 @@
<p>Rule id: <code>no-multi-spaces</code> (<code>standard</code> rule set)</p>
<h2 id="no-semicolons">No semicolons<a class="headerlink" href="#no-semicolons" title="Permanent link">¶</a></h2>
<p>No semicolons (unless used to separate multiple statements on the same line).</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="20:2"><input checked="checked" id="__tabbed_20_1" name="__tabbed_20" type="radio" /><input id="__tabbed_20_2" name="__tabbed_20" type="radio" /><div class="tabbed-labels"><label for="__tabbed_20_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_20_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="21:2"><input checked="checked" id="__tabbed_21_1" name="__tabbed_21" type="radio" /><input id="__tabbed_21_2" name="__tabbed_21" type="radio" /><div class="tabbed-labels"><label for="__tabbed_21_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_21_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-39-1" name="__codelineno-39-1" href="#__codelineno-39-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-39-2" name="__codelineno-39-2" href="#__codelineno-39-2"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-39-3" name="__codelineno-39-3" href="#__codelineno-39-3"></a>
-<a id="__codelineno-39-4" name="__codelineno-39-4" href="#__codelineno-39-4"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-39-5" name="__codelineno-39-5" href="#__codelineno-39-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-41-1" name="__codelineno-41-1" href="#__codelineno-41-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-41-2" name="__codelineno-41-2" href="#__codelineno-41-2"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-41-3" name="__codelineno-41-3" href="#__codelineno-41-3"></a>
+<a id="__codelineno-41-4" name="__codelineno-41-4" href="#__codelineno-41-4"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-41-5" name="__codelineno-41-5" href="#__codelineno-41-5"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-40-1" name="__codelineno-40-1" href="#__codelineno-40-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-40-2" name="__codelineno-40-2" href="#__codelineno-40-2"></a><span class="w"> </span><span class="p">;</span>
-<a id="__codelineno-40-3" name="__codelineno-40-3" href="#__codelineno-40-3"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-40-4" name="__codelineno-40-4" href="#__codelineno-40-4"></a><span class="w"> </span><span class="p">;</span>
-<a id="__codelineno-40-5" name="__codelineno-40-5" href="#__codelineno-40-5"></a>
-<a id="__codelineno-40-6" name="__codelineno-40-6" href="#__codelineno-40-6"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-40-7" name="__codelineno-40-7" href="#__codelineno-40-7"></a>
-<a id="__codelineno-40-8" name="__codelineno-40-8" href="#__codelineno-40-8"></a><span class="w"> </span><span class="p">;</span>
-<a id="__codelineno-40-9" name="__codelineno-40-9" href="#__codelineno-40-9"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-42-1" name="__codelineno-42-1" href="#__codelineno-42-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-42-2" name="__codelineno-42-2" href="#__codelineno-42-2"></a><span class="w"> </span><span class="p">;</span>
+<a id="__codelineno-42-3" name="__codelineno-42-3" href="#__codelineno-42-3"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-42-4" name="__codelineno-42-4" href="#__codelineno-42-4"></a><span class="w"> </span><span class="p">;</span>
+<a id="__codelineno-42-5" name="__codelineno-42-5" href="#__codelineno-42-5"></a>
+<a id="__codelineno-42-6" name="__codelineno-42-6" href="#__codelineno-42-6"></a><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-42-7" name="__codelineno-42-7" href="#__codelineno-42-7"></a>
+<a id="__codelineno-42-8" name="__codelineno-42-8" href="#__codelineno-42-8"></a><span class="w"> </span><span class="p">;</span>
+<a id="__codelineno-42-9" name="__codelineno-42-9" href="#__codelineno-42-9"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2271,14 +2331,14 @@
<h2 id="no-unit-as-return-type">No <code>Unit</code> as return type<a class="headerlink" href="#no-unit-as-return-type" title="Permanent link">¶</a></h2>
<p>The <code>Unit</code> type is not allowed as return type of a function.
returns (<code>fun fn {}</code> instead of <code>fun fn: Unit {}</code>)</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="21:2"><input checked="checked" id="__tabbed_21_1" name="__tabbed_21" type="radio" /><input id="__tabbed_21_2" name="__tabbed_21" type="radio" /><div class="tabbed-labels"><label for="__tabbed_21_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_21_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="22:2"><input checked="checked" id="__tabbed_22_1" name="__tabbed_22" type="radio" /><input id="__tabbed_22_2" name="__tabbed_22" type="radio" /><div class="tabbed-labels"><label for="__tabbed_22_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_22_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-41-1" name="__codelineno-41-1" href="#__codelineno-41-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fn</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-43-1" name="__codelineno-43-1" href="#__codelineno-43-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fn</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-42-1" name="__codelineno-42-1" href="#__codelineno-42-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fn</span><span class="p">():</span><span class="w"> </span><span class="kt">Unit</span><span class="w"> </span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-44-1" name="__codelineno-44-1" href="#__codelineno-44-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fn</span><span class="p">():</span><span class="w"> </span><span class="kt">Unit</span><span class="w"> </span><span class="p">{}</span>
</code></pre></div>
</div>
</div>
@@ -2292,15 +2352,15 @@
<p>Rule id: <code>no-unused-imports</code> (<code>standard</code> rule set)</p>
<h2 id="no-wildcard-imports">No wildcard imports<a class="headerlink" href="#no-wildcard-imports" title="Permanent link">¶</a></h2>
<p>No wildcard imports except imports listed in <code>.editorconfig</code> property <code>ij_kotlin_packages_to_use_import_on_demand</code>.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="22:2"><input checked="checked" id="__tabbed_22_1" name="__tabbed_22" type="radio" /><input id="__tabbed_22_2" name="__tabbed_22" type="radio" /><div class="tabbed-labels"><label for="__tabbed_22_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_22_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="23:2"><input checked="checked" id="__tabbed_23_1" name="__tabbed_23" type="radio" /><input id="__tabbed_23_2" name="__tabbed_23" type="radio" /><div class="tabbed-labels"><label for="__tabbed_23_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_23_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-43-1" name="__codelineno-43-1" href="#__codelineno-43-1"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.Bar</span>
-<a id="__codelineno-43-2" name="__codelineno-43-2" href="#__codelineno-43-2"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.Foo</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-45-1" name="__codelineno-45-1" href="#__codelineno-45-1"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.Bar</span>
+<a id="__codelineno-45-2" name="__codelineno-45-2" href="#__codelineno-45-2"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.Foo</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-44-1" name="__codelineno-44-1" href="#__codelineno-44-1"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.*</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-46-1" name="__codelineno-46-1" href="#__codelineno-46-1"></a><span class="k">import</span><span class="w"> </span><span class="nn">foobar.*</span>
</code></pre></div>
</div>
</div>
@@ -2308,25 +2368,25 @@
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>In case property <code>ij_kotlin_packages_to_use_import_on_demand</code> is not explicitly set, it allows wildcards imports like <code>java.util.*</code> by default to keep in sync with IntelliJ IDEA behavior. To disallow <em>all</em> wildcard imports, add property below to your <code>.editorconfig</code>:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-45-1" name="__codelineno-45-1" href="#__codelineno-45-1"></a>[*.{kt,kts}]
-<a id="__codelineno-45-2" name="__codelineno-45-2" href="#__codelineno-45-2"></a>ij_kotlin_packages_to_use_import_on_demand = unset
+<div class="highlight"><pre><span></span><code><a id="__codelineno-47-1" name="__codelineno-47-1" href="#__codelineno-47-1"></a>[*.{kt,kts}]
+<a id="__codelineno-47-2" name="__codelineno-47-2" href="#__codelineno-47-2"></a>ij_kotlin_packages_to_use_import_on_demand = unset
</code></pre></div></p>
</div>
<p>Rule id: <code>no-wildcard-imports</code> (<code>standard</code> rule set)</p>
<h2 id="package-name">Package name<a class="headerlink" href="#package-name" title="Permanent link">¶</a></h2>
<p>Validates that the package name matches the regular expression <code>[a-z][a-zA-Z\d]*(\.[a-z][a-zA-Z\d]*)*</code>.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="23:2"><input checked="checked" id="__tabbed_23_1" name="__tabbed_23" type="radio" /><input id="__tabbed_23_2" name="__tabbed_23" type="radio" /><div class="tabbed-labels"><label for="__tabbed_23_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_23_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="24:2"><input checked="checked" id="__tabbed_24_1" name="__tabbed_24" type="radio" /><input id="__tabbed_24_2" name="__tabbed_24" type="radio" /><div class="tabbed-labels"><label for="__tabbed_24_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_24_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-46-1" name="__codelineno-46-1" href="#__codelineno-46-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo</span>
-<a id="__codelineno-46-2" name="__codelineno-46-2" href="#__codelineno-46-2"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.bar</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-48-1" name="__codelineno-48-1" href="#__codelineno-48-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo</span>
+<a id="__codelineno-48-2" name="__codelineno-48-2" href="#__codelineno-48-2"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.bar</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-47-1" name="__codelineno-47-1" href="#__codelineno-47-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">Foo</span>
-<a id="__codelineno-47-2" name="__codelineno-47-2" href="#__codelineno-47-2"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.Foo</span>
-<a id="__codelineno-47-3" name="__codelineno-47-3" href="#__codelineno-47-3"></a><span class="k">package</span><span class="w"> </span><span class="nn">`foo</span><span class="w"> </span><span class="n">bar</span><span class="err">`</span>
-<a id="__codelineno-47-4" name="__codelineno-47-4" href="#__codelineno-47-4"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.`foo</span><span class="w"> </span><span class="n">bar</span><span class="err">`</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-49-1" name="__codelineno-49-1" href="#__codelineno-49-1"></a><span class="k">package</span><span class="w"> </span><span class="nn">Foo</span>
+<a id="__codelineno-49-2" name="__codelineno-49-2" href="#__codelineno-49-2"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.Foo</span>
+<a id="__codelineno-49-3" name="__codelineno-49-3" href="#__codelineno-49-3"></a><span class="k">package</span><span class="w"> </span><span class="nn">`foo</span><span class="w"> </span><span class="n">bar</span><span class="err">`</span>
+<a id="__codelineno-49-4" name="__codelineno-49-4" href="#__codelineno-49-4"></a><span class="k">package</span><span class="w"> </span><span class="nn">foo.`foo</span><span class="w"> </span><span class="n">bar</span><span class="err">`</span>
</code></pre></div>
</div>
</div>
@@ -2334,47 +2394,47 @@
<p>Rule id: <code>package-name</code> (<code>standard</code> rule set)</p>
<h2 id="parameter-list-wrapping">Parameter list wrapping<a class="headerlink" href="#parameter-list-wrapping" title="Permanent link">¶</a></h2>
<p>When class/function signature doesn't fit on a single line, each parameter must be on a separate line</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="24:3"><input checked="checked" id="__tabbed_24_1" name="__tabbed_24" type="radio" /><input id="__tabbed_24_2" name="__tabbed_24" type="radio" /><input id="__tabbed_24_3" name="__tabbed_24" type="radio" /><div class="tabbed-labels"><label for="__tabbed_24_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_24_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed (ktlint_official)</label><label for="__tabbed_24_3"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed (non ktlint_official)"</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="25:3"><input checked="checked" id="__tabbed_25_1" name="__tabbed_25" type="radio" /><input id="__tabbed_25_2" name="__tabbed_25" type="radio" /><input id="__tabbed_25_3" name="__tabbed_25" type="radio" /><div class="tabbed-labels"><label for="__tabbed_25_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_25_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed (ktlint_official)</label><label for="__tabbed_25_3"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed (non ktlint_official)"</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-48-1" name="__codelineno-48-1" href="#__codelineno-48-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span>
-<a id="__codelineno-48-2" name="__codelineno-48-2" href="#__codelineno-48-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-48-3" name="__codelineno-48-3" href="#__codelineno-48-3"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
-<a id="__codelineno-48-4" name="__codelineno-48-4" href="#__codelineno-48-4"></a><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
-<a id="__codelineno-48-5" name="__codelineno-48-5" href="#__codelineno-48-5"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-48-6" name="__codelineno-48-6" href="#__codelineno-48-6"></a><span class="p">)</span>
-<a id="__codelineno-48-7" name="__codelineno-48-7" href="#__codelineno-48-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span>
-<a id="__codelineno-48-8" name="__codelineno-48-8" href="#__codelineno-48-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-48-9" name="__codelineno-48-9" href="#__codelineno-48-9"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
-<a id="__codelineno-48-10" name="__codelineno-48-10" href="#__codelineno-48-10"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
-<a id="__codelineno-48-11" name="__codelineno-48-11" href="#__codelineno-48-11"></a><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
-<a id="__codelineno-48-12" name="__codelineno-48-12" href="#__codelineno-48-12"></a><span class="p">)</span>
-<a id="__codelineno-48-13" name="__codelineno-48-13" href="#__codelineno-48-13"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span>
-<a id="__codelineno-48-14" name="__codelineno-48-14" href="#__codelineno-48-14"></a><span class="w"> </span><span class="nd">@Bar</span><span class="w"> </span><span class="n">fooBar</span><span class="p">:</span><span class="w"> </span><span class="n">FooBar</span>
-<a id="__codelineno-48-15" name="__codelineno-48-15" href="#__codelineno-48-15"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-50-1" name="__codelineno-50-1" href="#__codelineno-50-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span>
+<a id="__codelineno-50-2" name="__codelineno-50-2" href="#__codelineno-50-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-50-3" name="__codelineno-50-3" href="#__codelineno-50-3"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
+<a id="__codelineno-50-4" name="__codelineno-50-4" href="#__codelineno-50-4"></a><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
+<a id="__codelineno-50-5" name="__codelineno-50-5" href="#__codelineno-50-5"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-50-6" name="__codelineno-50-6" href="#__codelineno-50-6"></a><span class="p">)</span>
+<a id="__codelineno-50-7" name="__codelineno-50-7" href="#__codelineno-50-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">)</span>
+<a id="__codelineno-50-8" name="__codelineno-50-8" href="#__codelineno-50-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-50-9" name="__codelineno-50-9" href="#__codelineno-50-9"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
+<a id="__codelineno-50-10" name="__codelineno-50-10" href="#__codelineno-50-10"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
+<a id="__codelineno-50-11" name="__codelineno-50-11" href="#__codelineno-50-11"></a><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
+<a id="__codelineno-50-12" name="__codelineno-50-12" href="#__codelineno-50-12"></a><span class="p">)</span>
+<a id="__codelineno-50-13" name="__codelineno-50-13" href="#__codelineno-50-13"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span>
+<a id="__codelineno-50-14" name="__codelineno-50-14" href="#__codelineno-50-14"></a><span class="w"> </span><span class="nd">@Bar</span><span class="w"> </span><span class="n">fooBar</span><span class="p">:</span><span class="w"> </span><span class="n">FooBar</span>
+<a id="__codelineno-50-15" name="__codelineno-50-15" href="#__codelineno-50-15"></a><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-49-1" name="__codelineno-49-1" href="#__codelineno-49-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-49-2" name="__codelineno-49-2" href="#__codelineno-49-2"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
-<a id="__codelineno-49-3" name="__codelineno-49-3" href="#__codelineno-49-3"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-49-4" name="__codelineno-49-4" href="#__codelineno-49-4"></a><span class="p">)</span>
-<a id="__codelineno-49-5" name="__codelineno-49-5" href="#__codelineno-49-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-49-6" name="__codelineno-49-6" href="#__codelineno-49-6"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
-<a id="__codelineno-49-7" name="__codelineno-49-7" href="#__codelineno-49-7"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
-<a id="__codelineno-49-8" name="__codelineno-49-8" href="#__codelineno-49-8"></a><span class="p">)</span>
-<a id="__codelineno-49-9" name="__codelineno-49-9" href="#__codelineno-49-9"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="nd">@Bar</span><span class="w"> </span><span class="n">fooBar</span><span class="p">:</span><span class="w"> </span><span class="n">FooBar</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-51-1" name="__codelineno-51-1" href="#__codelineno-51-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-51-2" name="__codelineno-51-2" href="#__codelineno-51-2"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
+<a id="__codelineno-51-3" name="__codelineno-51-3" href="#__codelineno-51-3"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-51-4" name="__codelineno-51-4" href="#__codelineno-51-4"></a><span class="p">)</span>
+<a id="__codelineno-51-5" name="__codelineno-51-5" href="#__codelineno-51-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-51-6" name="__codelineno-51-6" href="#__codelineno-51-6"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
+<a id="__codelineno-51-7" name="__codelineno-51-7" href="#__codelineno-51-7"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
+<a id="__codelineno-51-8" name="__codelineno-51-8" href="#__codelineno-51-8"></a><span class="p">)</span>
+<a id="__codelineno-51-9" name="__codelineno-51-9" href="#__codelineno-51-9"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="nd">@Bar</span><span class="w"> </span><span class="n">fooBar</span><span class="p">:</span><span class="w"> </span><span class="n">FooBar</span><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-50-1" name="__codelineno-50-1" href="#__codelineno-50-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-50-2" name="__codelineno-50-2" href="#__codelineno-50-2"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
-<a id="__codelineno-50-3" name="__codelineno-50-3" href="#__codelineno-50-3"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-50-4" name="__codelineno-50-4" href="#__codelineno-50-4"></a><span class="p">)</span>
-<a id="__codelineno-50-5" name="__codelineno-50-5" href="#__codelineno-50-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-50-6" name="__codelineno-50-6" href="#__codelineno-50-6"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
-<a id="__codelineno-50-7" name="__codelineno-50-7" href="#__codelineno-50-7"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
-<a id="__codelineno-50-8" name="__codelineno-50-8" href="#__codelineno-50-8"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-52-1" name="__codelineno-52-1" href="#__codelineno-52-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-52-2" name="__codelineno-52-2" href="#__codelineno-52-2"></a><span class="w"> </span><span class="n">paramA</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span><span class="w"> </span><span class="n">paramB</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">,</span>
+<a id="__codelineno-52-3" name="__codelineno-52-3" href="#__codelineno-52-3"></a><span class="w"> </span><span class="n">paramC</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-52-4" name="__codelineno-52-4" href="#__codelineno-52-4"></a><span class="p">)</span>
+<a id="__codelineno-52-5" name="__codelineno-52-5" href="#__codelineno-52-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-52-6" name="__codelineno-52-6" href="#__codelineno-52-6"></a><span class="w"> </span><span class="n">a</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span>
+<a id="__codelineno-52-7" name="__codelineno-52-7" href="#__codelineno-52-7"></a><span class="w"> </span><span class="n">b</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">Any</span>
+<a id="__codelineno-52-8" name="__codelineno-52-8" href="#__codelineno-52-8"></a><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -2382,43 +2442,43 @@
<p>Rule id: <code>parameter-list-wrapping</code> (<code>standard</code> rule set)</p>
<h2 id="parameter-wrapping">Parameter wrapping<a class="headerlink" href="#parameter-wrapping" title="Permanent link">¶</a></h2>
<p>When a function or class parameter doesn't fit on a single line, wrap the type or value to a separate line</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="25:3"><input checked="checked" id="__tabbed_25_1" name="__tabbed_25" type="radio" /><input id="__tabbed_25_2" name="__tabbed_25" type="radio" /><input id="__tabbed_25_3" name="__tabbed_25" type="radio" /><div class="tabbed-labels"><label for="__tabbed_25_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint (ktlint_official)</label><label for="__tabbed_25_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint (non ktlint_official)</label><label for="__tabbed_25_3"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="26:3"><input checked="checked" id="__tabbed_26_1" name="__tabbed_26" type="radio" /><input id="__tabbed_26_2" name="__tabbed_26" type="radio" /><input id="__tabbed_26_3" name="__tabbed_26" type="radio" /><div class="tabbed-labels"><label for="__tabbed_26_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint (ktlint_official)</label><label for="__tabbed_26_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint (non ktlint_official)</label><label for="__tabbed_26_3"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-51-1" name="__codelineno-51-1" href="#__codelineno-51-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-51-2" name="__codelineno-51-2" href="#__codelineno-51-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-51-3" name="__codelineno-51-3" href="#__codelineno-51-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-51-4" name="__codelineno-51-4" href="#__codelineno-51-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-51-5" name="__codelineno-51-5" href="#__codelineno-51-5"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-51-6" name="__codelineno-51-6" href="#__codelineno-51-6"></a><span class="p">)</span>
-<a id="__codelineno-51-7" name="__codelineno-51-7" href="#__codelineno-51-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-51-8" name="__codelineno-51-8" href="#__codelineno-51-8"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-51-9" name="__codelineno-51-9" href="#__codelineno-51-9"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-51-10" name="__codelineno-51-10" href="#__codelineno-51-10"></a><span class="p">)</span>
-</code></pre></div>
-</div>
-<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-52-1" name="__codelineno-52-1" href="#__codelineno-52-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-52-2" name="__codelineno-52-2" href="#__codelineno-52-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-52-3" name="__codelineno-52-3" href="#__codelineno-52-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-52-4" name="__codelineno-52-4" href="#__codelineno-52-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-52-5" name="__codelineno-52-5" href="#__codelineno-52-5"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-52-6" name="__codelineno-52-6" href="#__codelineno-52-6"></a><span class="p">)</span>
-<a id="__codelineno-52-7" name="__codelineno-52-7" href="#__codelineno-52-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-52-8" name="__codelineno-52-8" href="#__codelineno-52-8"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-52-9" name="__codelineno-52-9" href="#__codelineno-52-9"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-52-10" name="__codelineno-52-10" href="#__codelineno-52-10"></a><span class="p">)</span>
-</code></pre></div>
-</div>
-<div class="tabbed-block">
<div class="highlight"><pre><span></span><code><a id="__codelineno-53-1" name="__codelineno-53-1" href="#__codelineno-53-1"></a><span class="c1">// Assume that the last allowed character is</span>
<a id="__codelineno-53-2" name="__codelineno-53-2" href="#__codelineno-53-2"></a><span class="c1">// at the X character on the right X</span>
<a id="__codelineno-53-3" name="__codelineno-53-3" href="#__codelineno-53-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-53-4" name="__codelineno-53-4" href="#__codelineno-53-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-53-5" name="__codelineno-53-5" href="#__codelineno-53-5"></a><span class="p">)</span>
-<a id="__codelineno-53-6" name="__codelineno-53-6" href="#__codelineno-53-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-53-7" name="__codelineno-53-7" href="#__codelineno-53-7"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooooooTooLong</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-53-8" name="__codelineno-53-8" href="#__codelineno-53-8"></a><span class="p">)</span>
+<a id="__codelineno-53-4" name="__codelineno-53-4" href="#__codelineno-53-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-53-5" name="__codelineno-53-5" href="#__codelineno-53-5"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-53-6" name="__codelineno-53-6" href="#__codelineno-53-6"></a><span class="p">)</span>
+<a id="__codelineno-53-7" name="__codelineno-53-7" href="#__codelineno-53-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-53-8" name="__codelineno-53-8" href="#__codelineno-53-8"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-53-9" name="__codelineno-53-9" href="#__codelineno-53-9"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-53-10" name="__codelineno-53-10" href="#__codelineno-53-10"></a><span class="p">)</span>
+</code></pre></div>
+</div>
+<div class="tabbed-block">
+<div class="highlight"><pre><span></span><code><a id="__codelineno-54-1" name="__codelineno-54-1" href="#__codelineno-54-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-54-2" name="__codelineno-54-2" href="#__codelineno-54-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-54-3" name="__codelineno-54-3" href="#__codelineno-54-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
+<a id="__codelineno-54-4" name="__codelineno-54-4" href="#__codelineno-54-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-54-5" name="__codelineno-54-5" href="#__codelineno-54-5"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-54-6" name="__codelineno-54-6" href="#__codelineno-54-6"></a><span class="p">)</span>
+<a id="__codelineno-54-7" name="__codelineno-54-7" href="#__codelineno-54-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-54-8" name="__codelineno-54-8" href="#__codelineno-54-8"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-54-9" name="__codelineno-54-9" href="#__codelineno-54-9"></a><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-54-10" name="__codelineno-54-10" href="#__codelineno-54-10"></a><span class="p">)</span>
+</code></pre></div>
+</div>
+<div class="tabbed-block">
+<div class="highlight"><pre><span></span><code><a id="__codelineno-55-1" name="__codelineno-55-1" href="#__codelineno-55-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-55-2" name="__codelineno-55-2" href="#__codelineno-55-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-55-3" name="__codelineno-55-3" href="#__codelineno-55-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
+<a id="__codelineno-55-4" name="__codelineno-55-4" href="#__codelineno-55-4"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">fooooooooooooooooooooooooTooLong</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-55-5" name="__codelineno-55-5" href="#__codelineno-55-5"></a><span class="p">)</span>
+<a id="__codelineno-55-6" name="__codelineno-55-6" href="#__codelineno-55-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-55-7" name="__codelineno-55-7" href="#__codelineno-55-7"></a><span class="w"> </span><span class="n">fooooooooooooooooooooooooooooTooLong</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-55-8" name="__codelineno-55-8" href="#__codelineno-55-8"></a><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -2426,19 +2486,19 @@
<p>Rule id: <code>parameter-wrapping</code> (<code>standard</code> rule set)</p>
<h2 id="property-wrapping">Property wrapping<a class="headerlink" href="#property-wrapping" title="Permanent link">¶</a></h2>
<p>When a property doesn't fit on a single line, wrap the type or value to a separate line</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="26:2"><input checked="checked" id="__tabbed_26_1" name="__tabbed_26" type="radio" /><input id="__tabbed_26_2" name="__tabbed_26" type="radio" /><div class="tabbed-labels"><label for="__tabbed_26_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_26_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="27:2"><input checked="checked" id="__tabbed_27_1" name="__tabbed_27" type="radio" /><input id="__tabbed_27_2" name="__tabbed_27" type="radio" /><div class="tabbed-labels"><label for="__tabbed_27_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_27_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-54-1" name="__codelineno-54-1" href="#__codelineno-54-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-54-2" name="__codelineno-54-2" href="#__codelineno-54-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-54-3" name="__codelineno-54-3" href="#__codelineno-54-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span>
-<a id="__codelineno-54-4" name="__codelineno-54-4" href="#__codelineno-54-4"></a><span class="w"> </span><span class="kt">String</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-56-1" name="__codelineno-56-1" href="#__codelineno-56-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-56-2" name="__codelineno-56-2" href="#__codelineno-56-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-56-3" name="__codelineno-56-3" href="#__codelineno-56-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span>
+<a id="__codelineno-56-4" name="__codelineno-56-4" href="#__codelineno-56-4"></a><span class="w"> </span><span class="kt">String</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-55-1" name="__codelineno-55-1" href="#__codelineno-55-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-55-2" name="__codelineno-55-2" href="#__codelineno-55-2"></a><span class="c1">// at the X character on the right X</span>
-<a id="__codelineno-55-3" name="__codelineno-55-3" href="#__codelineno-55-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-57-1" name="__codelineno-57-1" href="#__codelineno-57-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-57-2" name="__codelineno-57-2" href="#__codelineno-57-2"></a><span class="c1">// at the X character on the right X</span>
+<a id="__codelineno-57-3" name="__codelineno-57-3" href="#__codelineno-57-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span>
</code></pre></div>
</div>
</div>
@@ -2446,14 +2506,14 @@
<p>Rule id: <code>property-wrapping</code> (<code>standard</code> rule set)</p>
<h2 id="string-template">String template<a class="headerlink" href="#string-template" title="Permanent link">¶</a></h2>
<p>Consistent string templates (<code>$v</code> instead of <code>${v}</code>, <code>${p.v}</code> instead of <code>${p.v.toString()}</code>)</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="27:2"><input checked="checked" id="__tabbed_27_1" name="__tabbed_27" type="radio" /><input id="__tabbed_27_2" name="__tabbed_27" type="radio" /><div class="tabbed-labels"><label for="__tabbed_27_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_27_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="28:2"><input checked="checked" id="__tabbed_28_1" name="__tabbed_28" type="radio" /><input id="__tabbed_28_2" name="__tabbed_28" type="radio" /><div class="tabbed-labels"><label for="__tabbed_28_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_28_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-56-1" name="__codelineno-56-1" href="#__codelineno-56-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"</span><span class="si">$</span><span class="n">foo</span><span class="s"> hello"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-58-1" name="__codelineno-58-1" href="#__codelineno-58-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"</span><span class="si">$</span><span class="n">foo</span><span class="s"> hello"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-57-1" name="__codelineno-57-1" href="#__codelineno-57-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"</span><span class="si">${</span><span class="n">foo</span><span class="si">}</span><span class="s"> hello"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-59-1" name="__codelineno-59-1" href="#__codelineno-59-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"</span><span class="si">${</span><span class="n">foo</span><span class="si">}</span><span class="s"> hello"</span>
</code></pre></div>
</div>
</div>
@@ -2465,22 +2525,22 @@
<p class="admonition-title">Important</p>
<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma_on_call_site</code> to configure the rule. When this property is enabled, KtLint <em>enforces</em> the usage of the trailing comma at call site while IntelliJ IDEA default formatter only <em>allows</em> to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values <em>consistent</em> formatting more than a per-situation decision.</p>
</div>
-<div class="tabbed-set tabbed-alternate" data-tabs="28:2"><input checked="checked" id="__tabbed_28_1" name="__tabbed_28" type="radio" /><input id="__tabbed_28_2" name="__tabbed_28" type="radio" /><div class="tabbed-labels"><label for="__tabbed_28_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_28_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="29:2"><input checked="checked" id="__tabbed_29_1" name="__tabbed_29" type="radio" /><input id="__tabbed_29_2" name="__tabbed_29" type="radio" /><div class="tabbed-labels"><label for="__tabbed_29_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_29_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-58-1" name="__codelineno-58-1" href="#__codelineno-58-1"></a><span class="n">FooWrapper</span><span class="p">(</span>
-<a id="__codelineno-58-2" name="__codelineno-58-2" href="#__codelineno-58-2"></a><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-58-3" name="__codelineno-58-3" href="#__codelineno-58-3"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
-<a id="__codelineno-58-4" name="__codelineno-58-4" href="#__codelineno-58-4"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
-<a id="__codelineno-58-5" name="__codelineno-58-5" href="#__codelineno-58-5"></a><span class="w"> </span><span class="p">),</span>
-<a id="__codelineno-58-6" name="__codelineno-58-6" href="#__codelineno-58-6"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-60-1" name="__codelineno-60-1" href="#__codelineno-60-1"></a><span class="n">FooWrapper</span><span class="p">(</span>
+<a id="__codelineno-60-2" name="__codelineno-60-2" href="#__codelineno-60-2"></a><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-60-3" name="__codelineno-60-3" href="#__codelineno-60-3"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
+<a id="__codelineno-60-4" name="__codelineno-60-4" href="#__codelineno-60-4"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
+<a id="__codelineno-60-5" name="__codelineno-60-5" href="#__codelineno-60-5"></a><span class="w"> </span><span class="p">),</span>
+<a id="__codelineno-60-6" name="__codelineno-60-6" href="#__codelineno-60-6"></a><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-59-1" name="__codelineno-59-1" href="#__codelineno-59-1"></a><span class="n">FooWrapper</span><span class="p">(</span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-59-2" name="__codelineno-59-2" href="#__codelineno-59-2"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
-<a id="__codelineno-59-3" name="__codelineno-59-3" href="#__codelineno-59-3"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
-<a id="__codelineno-59-4" name="__codelineno-59-4" href="#__codelineno-59-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it's weird to insert "," between unwrapped (continued) parenthesis</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-61-1" name="__codelineno-61-1" href="#__codelineno-61-1"></a><span class="n">FooWrapper</span><span class="p">(</span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-61-2" name="__codelineno-61-2" href="#__codelineno-61-2"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
+<a id="__codelineno-61-3" name="__codelineno-61-3" href="#__codelineno-61-3"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
+<a id="__codelineno-61-4" name="__codelineno-61-4" href="#__codelineno-61-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it's weird to insert "," between unwrapped (continued) parenthesis</span>
</code></pre></div>
</div>
</div>
@@ -2506,22 +2566,22 @@
<p class="admonition-title">Important</p>
<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma</code> to configure the rule. When this property is enabled, KtLint <em>enforces</em> the usage of the trailing comma at declaration site while IntelliJ IDEA default formatter only <em>allows</em> to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values <em>consistent</em> formatting more than a per-situation decision.</p>
</div>
-<div class="tabbed-set tabbed-alternate" data-tabs="29:2"><input checked="checked" id="__tabbed_29_1" name="__tabbed_29" type="radio" /><input id="__tabbed_29_2" name="__tabbed_29" type="radio" /><div class="tabbed-labels"><label for="__tabbed_29_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_29_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="30:2"><input checked="checked" id="__tabbed_30_1" name="__tabbed_30" type="radio" /><input id="__tabbed_30_2" name="__tabbed_30" type="radio" /><div class="tabbed-labels"><label for="__tabbed_30_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_30_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-60-1" name="__codelineno-60-1" href="#__codelineno-60-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span>
-<a id="__codelineno-60-2" name="__codelineno-60-2" href="#__codelineno-60-2"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-60-3" name="__codelineno-60-3" href="#__codelineno-60-3"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
-<a id="__codelineno-60-4" name="__codelineno-60-4" href="#__codelineno-60-4"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
-<a id="__codelineno-60-5" name="__codelineno-60-5" href="#__codelineno-60-5"></a><span class="w"> </span><span class="p">),</span>
-<a id="__codelineno-60-6" name="__codelineno-60-6" href="#__codelineno-60-6"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-62-1" name="__codelineno-62-1" href="#__codelineno-62-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span>
+<a id="__codelineno-62-2" name="__codelineno-62-2" href="#__codelineno-62-2"></a><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-62-3" name="__codelineno-62-3" href="#__codelineno-62-3"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
+<a id="__codelineno-62-4" name="__codelineno-62-4" href="#__codelineno-62-4"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
+<a id="__codelineno-62-5" name="__codelineno-62-5" href="#__codelineno-62-5"></a><span class="w"> </span><span class="p">),</span>
+<a id="__codelineno-62-6" name="__codelineno-62-6" href="#__codelineno-62-6"></a><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-61-1" name="__codelineno-61-1" href="#__codelineno-61-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-61-2" name="__codelineno-61-2" href="#__codelineno-61-2"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
-<a id="__codelineno-61-3" name="__codelineno-61-3" href="#__codelineno-61-3"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
-<a id="__codelineno-61-4" name="__codelineno-61-4" href="#__codelineno-61-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it's weird to insert "," between unwrapped (continued) parenthesis</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-63-1" name="__codelineno-63-1" href="#__codelineno-63-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-63-2" name="__codelineno-63-2" href="#__codelineno-63-2"></a><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">,</span>
+<a id="__codelineno-63-3" name="__codelineno-63-3" href="#__codelineno-63-3"></a><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">,</span>
+<a id="__codelineno-63-4" name="__codelineno-63-4" href="#__codelineno-63-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it's weird to insert "," between unwrapped (continued) parenthesis</span>
</code></pre></div>
</div>
</div>
@@ -2543,14 +2603,14 @@
<p>Rule id: <code>trailing-comma-on-declaration-site</code> (<code>standard</code> rule set)</p>
<h2 id="unnecessary-parenthesis-before-trailing-lambda">Unnecessary parenthesis before trailing lambda<a class="headerlink" href="#unnecessary-parenthesis-before-trailing-lambda" title="Permanent link">¶</a></h2>
<p>An empty parentheses block before a lambda is redundant.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="30:2"><input checked="checked" id="__tabbed_30_1" name="__tabbed_30" type="radio" /><input id="__tabbed_30_2" name="__tabbed_30" type="radio" /><div class="tabbed-labels"><label for="__tabbed_30_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_30_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="31:2"><input checked="checked" id="__tabbed_31_1" name="__tabbed_31" type="radio" /><input id="__tabbed_31_2" name="__tabbed_31" type="radio" /><div class="tabbed-labels"><label for="__tabbed_31_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_31_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-62-1" name="__codelineno-62-1" href="#__codelineno-62-1"></a><span class="s">"some-string"</span><span class="p">.</span><span class="na">count</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'-'</span><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-64-1" name="__codelineno-64-1" href="#__codelineno-64-1"></a><span class="s">"some-string"</span><span class="p">.</span><span class="na">count</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'-'</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-63-1" name="__codelineno-63-1" href="#__codelineno-63-1"></a><span class="s">"some-string"</span><span class="p">.</span><span class="na">count</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'-'</span><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-65-1" name="__codelineno-65-1" href="#__codelineno-65-1"></a><span class="s">"some-string"</span><span class="p">.</span><span class="na">count</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nb">it</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'-'</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2559,21 +2619,21 @@
<h2 id="wrapping">Wrapping<a class="headerlink" href="#wrapping" title="Permanent link">¶</a></h2>
<h3 id="wrapping_1">Wrapping<a class="headerlink" href="#wrapping_1" title="Permanent link">¶</a></h3>
<p>Inserts missing newlines (for example between parentheses of a multi-line function call).</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="31:2"><input checked="checked" id="__tabbed_31_1" name="__tabbed_31" type="radio" /><input id="__tabbed_31_2" name="__tabbed_31" type="radio" /><div class="tabbed-labels"><label for="__tabbed_31_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_31_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="32:2"><input checked="checked" id="__tabbed_32_1" name="__tabbed_32" type="radio" /><input id="__tabbed_32_2" name="__tabbed_32" type="radio" /><div class="tabbed-labels"><label for="__tabbed_32_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_32_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-64-1" name="__codelineno-64-1" href="#__codelineno-64-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">(</span>
-<a id="__codelineno-64-2" name="__codelineno-64-2" href="#__codelineno-64-2"></a><span class="w"> </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-64-3" name="__codelineno-64-3" href="#__codelineno-64-3"></a><span class="w"> </span><span class="n">b</span><span class="p">,</span>
-<a id="__codelineno-64-4" name="__codelineno-64-4" href="#__codelineno-64-4"></a><span class="w"> </span><span class="n">c</span>
-<a id="__codelineno-64-5" name="__codelineno-64-5" href="#__codelineno-64-5"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-66-1" name="__codelineno-66-1" href="#__codelineno-66-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">(</span>
+<a id="__codelineno-66-2" name="__codelineno-66-2" href="#__codelineno-66-2"></a><span class="w"> </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-66-3" name="__codelineno-66-3" href="#__codelineno-66-3"></a><span class="w"> </span><span class="n">b</span><span class="p">,</span>
+<a id="__codelineno-66-4" name="__codelineno-66-4" href="#__codelineno-66-4"></a><span class="w"> </span><span class="n">c</span>
+<a id="__codelineno-66-5" name="__codelineno-66-5" href="#__codelineno-66-5"></a><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-65-1" name="__codelineno-65-1" href="#__codelineno-65-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">(</span>
-<a id="__codelineno-65-2" name="__codelineno-65-2" href="#__codelineno-65-2"></a><span class="w"> </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-65-3" name="__codelineno-65-3" href="#__codelineno-65-3"></a><span class="w"> </span><span class="n">b</span><span class="p">,</span>
-<a id="__codelineno-65-4" name="__codelineno-65-4" href="#__codelineno-65-4"></a><span class="w"> </span><span class="n">c</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-67-1" name="__codelineno-67-1" href="#__codelineno-67-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">(</span>
+<a id="__codelineno-67-2" name="__codelineno-67-2" href="#__codelineno-67-2"></a><span class="w"> </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-67-3" name="__codelineno-67-3" href="#__codelineno-67-3"></a><span class="w"> </span><span class="n">b</span><span class="p">,</span>
+<a id="__codelineno-67-4" name="__codelineno-67-4" href="#__codelineno-67-4"></a><span class="w"> </span><span class="n">c</span><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -2581,21 +2641,21 @@
<p>Rule id: <code>wrapping</code> (<code>standard</code> rule set)</p>
<h3 id="comment-wrapping">Comment wrapping<a class="headerlink" href="#comment-wrapping" title="Permanent link">¶</a></h3>
<p>A block comment should start and end on a line that does not contain any other element.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="32:2"><input checked="checked" id="__tabbed_32_1" name="__tabbed_32" type="radio" /><input id="__tabbed_32_2" name="__tabbed_32" type="radio" /><div class="tabbed-labels"><label for="__tabbed_32_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_32_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="33:2"><input checked="checked" id="__tabbed_33_1" name="__tabbed_33" type="radio" /><input id="__tabbed_33_2" name="__tabbed_33" type="radio" /><div class="tabbed-labels"><label for="__tabbed_33_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_33_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-66-1" name="__codelineno-66-1" href="#__codelineno-66-1"></a><span class="cm">/* Some comment 1 */</span>
-<a id="__codelineno-66-2" name="__codelineno-66-2" href="#__codelineno-66-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
-<a id="__codelineno-66-3" name="__codelineno-66-3" href="#__codelineno-66-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="c1">// Some comment</span>
-<a id="__codelineno-66-4" name="__codelineno-66-4" href="#__codelineno-66-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* no-op */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-68-1" name="__codelineno-68-1" href="#__codelineno-68-1"></a><span class="cm">/* Some comment 1 */</span>
+<a id="__codelineno-68-2" name="__codelineno-68-2" href="#__codelineno-68-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
+<a id="__codelineno-68-3" name="__codelineno-68-3" href="#__codelineno-68-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="c1">// Some comment</span>
+<a id="__codelineno-68-4" name="__codelineno-68-4" href="#__codelineno-68-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* no-op */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-67-1" name="__codelineno-67-1" href="#__codelineno-67-1"></a><span class="cm">/* Some comment 1 */</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
-<a id="__codelineno-67-2" name="__codelineno-67-2" href="#__codelineno-67-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="cm">/* Block comment instead of end-of-line comment */</span>
-<a id="__codelineno-67-3" name="__codelineno-67-3" href="#__codelineno-67-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="cm">/* Some comment</span>
-<a id="__codelineno-67-4" name="__codelineno-67-4" href="#__codelineno-67-4"></a><span class="cm"> * with a newline</span>
-<a id="__codelineno-67-5" name="__codelineno-67-5" href="#__codelineno-67-5"></a><span class="cm"> */</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-69-1" name="__codelineno-69-1" href="#__codelineno-69-1"></a><span class="cm">/* Some comment 1 */</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
+<a id="__codelineno-69-2" name="__codelineno-69-2" href="#__codelineno-69-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="cm">/* Block comment instead of end-of-line comment */</span>
+<a id="__codelineno-69-3" name="__codelineno-69-3" href="#__codelineno-69-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span><span class="w"> </span><span class="cm">/* Some comment</span>
+<a id="__codelineno-69-4" name="__codelineno-69-4" href="#__codelineno-69-4"></a><span class="cm"> * with a newline</span>
+<a id="__codelineno-69-5" name="__codelineno-69-5" href="#__codelineno-69-5"></a><span class="cm"> */</span>
</code></pre></div>
</div>
</div>
@@ -2604,18 +2664,18 @@
<h2 id="spacing">Spacing<a class="headerlink" href="#spacing" title="Permanent link">¶</a></h2>
<h3 id="angle-bracket-spacing">Angle bracket spacing<a class="headerlink" href="#angle-bracket-spacing" title="Permanent link">¶</a></h3>
<p>No spaces around angle brackets when used for typing.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="33:2"><input checked="checked" id="__tabbed_33_1" name="__tabbed_33" type="radio" /><input id="__tabbed_33_2" name="__tabbed_33" type="radio" /><div class="tabbed-labels"><label for="__tabbed_33_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_33_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="34:2"><input checked="checked" id="__tabbed_34_1" name="__tabbed_34" type="radio" /><input id="__tabbed_34_2" name="__tabbed_34" type="radio" /><div class="tabbed-labels"><label for="__tabbed_34_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_34_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-68-1" name="__codelineno-68-1" href="#__codelineno-68-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
-<a id="__codelineno-68-2" name="__codelineno-68-2" href="#__codelineno-68-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
-<a id="__codelineno-68-3" name="__codelineno-68-3" href="#__codelineno-68-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">c</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-70-1" name="__codelineno-70-1" href="#__codelineno-70-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<a id="__codelineno-70-2" name="__codelineno-70-2" href="#__codelineno-70-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<a id="__codelineno-70-3" name="__codelineno-70-3" href="#__codelineno-70-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">c</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-69-1" name="__codelineno-69-1" href="#__codelineno-69-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="w"> </span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
-<a id="__codelineno-69-2" name="__codelineno-69-2" href="#__codelineno-69-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
-<a id="__codelineno-69-3" name="__codelineno-69-3" href="#__codelineno-69-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">c</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-71-1" name="__codelineno-71-1" href="#__codelineno-71-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">a</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="w"> </span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<a id="__codelineno-71-2" name="__codelineno-71-2" href="#__codelineno-71-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
+<a id="__codelineno-71-3" name="__codelineno-71-3" href="#__codelineno-71-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">c</span><span class="p">:</span><span class="w"> </span><span class="n">Map</span><span class="w"> </span><span class="o"><</span><span class="kt">Int</span><span class="p">,</span><span class="w"> </span><span class="kt">String</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mapOf</span><span class="p">()</span>
</code></pre></div>
</div>
</div>
@@ -2623,31 +2683,31 @@
<p>Rule id: <code>spacing-around-angle-brackets</code> (<code>standard</code> rule set)</p>
<h3 id="annotation-spacing">Annotation spacing<a class="headerlink" href="#annotation-spacing" title="Permanent link">¶</a></h3>
<p>Annotations should be separated by a single line break.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="34:2"><input checked="checked" id="__tabbed_34_1" name="__tabbed_34" type="radio" /><input id="__tabbed_34_2" name="__tabbed_34" type="radio" /><div class="tabbed-labels"><label for="__tabbed_34_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_34_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="35:2"><input checked="checked" id="__tabbed_35_1" name="__tabbed_35" type="radio" /><input id="__tabbed_35_2" name="__tabbed_35" type="radio" /><div class="tabbed-labels"><label for="__tabbed_35_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_35_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-70-1" name="__codelineno-70-1" href="#__codelineno-70-1"></a><span class="nd">@JvmField</span>
-<a id="__codelineno-70-2" name="__codelineno-70-2" href="#__codelineno-70-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-70-3" name="__codelineno-70-3" href="#__codelineno-70-3"></a>
-<a id="__codelineno-70-4" name="__codelineno-70-4" href="#__codelineno-70-4"></a><span class="cm">/**</span>
-<a id="__codelineno-70-5" name="__codelineno-70-5" href="#__codelineno-70-5"></a><span class="cm"> * block comment</span>
-<a id="__codelineno-70-6" name="__codelineno-70-6" href="#__codelineno-70-6"></a><span class="cm"> */</span>
-<a id="__codelineno-70-7" name="__codelineno-70-7" href="#__codelineno-70-7"></a><span class="nd">@Foo</span><span class="w"> </span><span class="nd">@Bar</span>
-<a id="__codelineno-70-8" name="__codelineno-70-8" href="#__codelineno-70-8"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-70-9" name="__codelineno-70-9" href="#__codelineno-70-9"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-72-1" name="__codelineno-72-1" href="#__codelineno-72-1"></a><span class="nd">@JvmField</span>
+<a id="__codelineno-72-2" name="__codelineno-72-2" href="#__codelineno-72-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-72-3" name="__codelineno-72-3" href="#__codelineno-72-3"></a>
+<a id="__codelineno-72-4" name="__codelineno-72-4" href="#__codelineno-72-4"></a><span class="cm">/**</span>
+<a id="__codelineno-72-5" name="__codelineno-72-5" href="#__codelineno-72-5"></a><span class="cm"> * block comment</span>
+<a id="__codelineno-72-6" name="__codelineno-72-6" href="#__codelineno-72-6"></a><span class="cm"> */</span>
+<a id="__codelineno-72-7" name="__codelineno-72-7" href="#__codelineno-72-7"></a><span class="nd">@Foo</span><span class="w"> </span><span class="nd">@Bar</span>
+<a id="__codelineno-72-8" name="__codelineno-72-8" href="#__codelineno-72-8"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-72-9" name="__codelineno-72-9" href="#__codelineno-72-9"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-71-1" name="__codelineno-71-1" href="#__codelineno-71-1"></a><span class="nd">@JvmField</span>
-<a id="__codelineno-71-2" name="__codelineno-71-2" href="#__codelineno-71-2"></a>
-<a id="__codelineno-71-3" name="__codelineno-71-3" href="#__codelineno-71-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-71-4" name="__codelineno-71-4" href="#__codelineno-71-4"></a>
-<a id="__codelineno-71-5" name="__codelineno-71-5" href="#__codelineno-71-5"></a><span class="nd">@Foo</span><span class="w"> </span><span class="nd">@Bar</span>
-<a id="__codelineno-71-6" name="__codelineno-71-6" href="#__codelineno-71-6"></a><span class="cm">/**</span>
-<a id="__codelineno-71-7" name="__codelineno-71-7" href="#__codelineno-71-7"></a><span class="cm"> * block comment</span>
-<a id="__codelineno-71-8" name="__codelineno-71-8" href="#__codelineno-71-8"></a><span class="cm"> */</span>
-<a id="__codelineno-71-9" name="__codelineno-71-9" href="#__codelineno-71-9"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-71-10" name="__codelineno-71-10" href="#__codelineno-71-10"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-73-1" name="__codelineno-73-1" href="#__codelineno-73-1"></a><span class="nd">@JvmField</span>
+<a id="__codelineno-73-2" name="__codelineno-73-2" href="#__codelineno-73-2"></a>
+<a id="__codelineno-73-3" name="__codelineno-73-3" href="#__codelineno-73-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-73-4" name="__codelineno-73-4" href="#__codelineno-73-4"></a>
+<a id="__codelineno-73-5" name="__codelineno-73-5" href="#__codelineno-73-5"></a><span class="nd">@Foo</span><span class="w"> </span><span class="nd">@Bar</span>
+<a id="__codelineno-73-6" name="__codelineno-73-6" href="#__codelineno-73-6"></a><span class="cm">/**</span>
+<a id="__codelineno-73-7" name="__codelineno-73-7" href="#__codelineno-73-7"></a><span class="cm"> * block comment</span>
+<a id="__codelineno-73-8" name="__codelineno-73-8" href="#__codelineno-73-8"></a><span class="cm"> */</span>
+<a id="__codelineno-73-9" name="__codelineno-73-9" href="#__codelineno-73-9"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-73-10" name="__codelineno-73-10" href="#__codelineno-73-10"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2655,19 +2715,19 @@
<p>Rule id: <code>annotation-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="blank-line-between-declarations-with-annotations">Blank line between declarations with annotations<a class="headerlink" href="#blank-line-between-declarations-with-annotations" title="Permanent link">¶</a></h3>
<p>Declarations with annotations should be separated by a blank line.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="35:2"><input checked="checked" id="__tabbed_35_1" name="__tabbed_35" type="radio" /><input id="__tabbed_35_2" name="__tabbed_35" type="radio" /><div class="tabbed-labels"><label for="__tabbed_35_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_35_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="36:2"><input checked="checked" id="__tabbed_36_1" name="__tabbed_36" type="radio" /><input id="__tabbed_36_2" name="__tabbed_36" type="radio" /><div class="tabbed-labels"><label for="__tabbed_36_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_36_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-72-1" name="__codelineno-72-1" href="#__codelineno-72-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span>
-<a id="__codelineno-72-2" name="__codelineno-72-2" href="#__codelineno-72-2"></a>
-<a id="__codelineno-72-3" name="__codelineno-72-3" href="#__codelineno-72-3"></a><span class="nd">@Bar</span>
-<a id="__codelineno-72-4" name="__codelineno-72-4" href="#__codelineno-72-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-74-1" name="__codelineno-74-1" href="#__codelineno-74-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span>
+<a id="__codelineno-74-2" name="__codelineno-74-2" href="#__codelineno-74-2"></a>
+<a id="__codelineno-74-3" name="__codelineno-74-3" href="#__codelineno-74-3"></a><span class="nd">@Bar</span>
+<a id="__codelineno-74-4" name="__codelineno-74-4" href="#__codelineno-74-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-73-1" name="__codelineno-73-1" href="#__codelineno-73-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span>
-<a id="__codelineno-73-2" name="__codelineno-73-2" href="#__codelineno-73-2"></a><span class="nd">@Bar</span>
-<a id="__codelineno-73-3" name="__codelineno-73-3" href="#__codelineno-73-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-75-1" name="__codelineno-75-1" href="#__codelineno-75-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">a</span><span class="p">()</span>
+<a id="__codelineno-75-2" name="__codelineno-75-2" href="#__codelineno-75-2"></a><span class="nd">@Bar</span>
+<a id="__codelineno-75-3" name="__codelineno-75-3" href="#__codelineno-75-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">b</span><span class="p">()</span>
</code></pre></div>
</div>
</div>
@@ -2675,25 +2735,25 @@
<p>Rule id: <code>spacing-between-declarations-with-annotations</code> (<code>standard</code> rule set)</p>
<h3 id="blank-line-between-declaration-with-comments">Blank line between declaration with comments<a class="headerlink" href="#blank-line-between-declaration-with-comments" title="Permanent link">¶</a></h3>
<p>Declarations with comments should be separated by a blank line.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="36:2"><input checked="checked" id="__tabbed_36_1" name="__tabbed_36" type="radio" /><input id="__tabbed_36_2" name="__tabbed_36" type="radio" /><div class="tabbed-labels"><label for="__tabbed_36_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_36_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="37:2"><input checked="checked" id="__tabbed_37_1" name="__tabbed_37" type="radio" /><input id="__tabbed_37_2" name="__tabbed_37" type="radio" /><div class="tabbed-labels"><label for="__tabbed_37_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_37_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-74-1" name="__codelineno-74-1" href="#__codelineno-74-1"></a><span class="c1">// some comment 1</span>
-<a id="__codelineno-74-2" name="__codelineno-74-2" href="#__codelineno-74-2"></a><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-74-3" name="__codelineno-74-3" href="#__codelineno-74-3"></a>
-<a id="__codelineno-74-4" name="__codelineno-74-4" href="#__codelineno-74-4"></a><span class="cm">/*</span>
-<a id="__codelineno-74-5" name="__codelineno-74-5" href="#__codelineno-74-5"></a><span class="cm"> * some comment 2</span>
-<a id="__codelineno-74-6" name="__codelineno-74-6" href="#__codelineno-74-6"></a><span class="cm"> */</span>
-<a id="__codelineno-74-7" name="__codelineno-74-7" href="#__codelineno-74-7"></a><span class="n">foo</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-76-1" name="__codelineno-76-1" href="#__codelineno-76-1"></a><span class="c1">// some comment 1</span>
+<a id="__codelineno-76-2" name="__codelineno-76-2" href="#__codelineno-76-2"></a><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-76-3" name="__codelineno-76-3" href="#__codelineno-76-3"></a>
+<a id="__codelineno-76-4" name="__codelineno-76-4" href="#__codelineno-76-4"></a><span class="cm">/*</span>
+<a id="__codelineno-76-5" name="__codelineno-76-5" href="#__codelineno-76-5"></a><span class="cm"> * some comment 2</span>
+<a id="__codelineno-76-6" name="__codelineno-76-6" href="#__codelineno-76-6"></a><span class="cm"> */</span>
+<a id="__codelineno-76-7" name="__codelineno-76-7" href="#__codelineno-76-7"></a><span class="n">foo</span><span class="p">()</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-75-1" name="__codelineno-75-1" href="#__codelineno-75-1"></a><span class="c1">// some comment 1</span>
-<a id="__codelineno-75-2" name="__codelineno-75-2" href="#__codelineno-75-2"></a><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-75-3" name="__codelineno-75-3" href="#__codelineno-75-3"></a><span class="cm">/*</span>
-<a id="__codelineno-75-4" name="__codelineno-75-4" href="#__codelineno-75-4"></a><span class="cm"> * some comment 2</span>
-<a id="__codelineno-75-5" name="__codelineno-75-5" href="#__codelineno-75-5"></a><span class="cm"> */</span>
-<a id="__codelineno-75-6" name="__codelineno-75-6" href="#__codelineno-75-6"></a><span class="n">foo</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-77-1" name="__codelineno-77-1" href="#__codelineno-77-1"></a><span class="c1">// some comment 1</span>
+<a id="__codelineno-77-2" name="__codelineno-77-2" href="#__codelineno-77-2"></a><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-77-3" name="__codelineno-77-3" href="#__codelineno-77-3"></a><span class="cm">/*</span>
+<a id="__codelineno-77-4" name="__codelineno-77-4" href="#__codelineno-77-4"></a><span class="cm"> * some comment 2</span>
+<a id="__codelineno-77-5" name="__codelineno-77-5" href="#__codelineno-77-5"></a><span class="cm"> */</span>
+<a id="__codelineno-77-6" name="__codelineno-77-6" href="#__codelineno-77-6"></a><span class="n">foo</span><span class="p">()</span>
</code></pre></div>
</div>
</div>
@@ -2701,16 +2761,16 @@
<p>Rule id: <code>spacing-between-declarations-with-comments</code> (<code>standard</code> rule set)</p>
<h3 id="colon-spacing">Colon spacing<a class="headerlink" href="#colon-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around colon.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="37:2"><input checked="checked" id="__tabbed_37_1" name="__tabbed_37" type="radio" /><input id="__tabbed_37_2" name="__tabbed_37" type="radio" /><div class="tabbed-labels"><label for="__tabbed_37_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_37_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="38:2"><input checked="checked" id="__tabbed_38_1" name="__tabbed_38" type="radio" /><input id="__tabbed_38_2" name="__tabbed_38" type="radio" /><div class="tabbed-labels"><label for="__tabbed_38_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_38_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-76-1" name="__codelineno-76-1" href="#__codelineno-76-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B</span>
-<a id="__codelineno-76-2" name="__codelineno-76-2" href="#__codelineno-76-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B2</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-78-1" name="__codelineno-78-1" href="#__codelineno-78-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B</span>
+<a id="__codelineno-78-2" name="__codelineno-78-2" href="#__codelineno-78-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B2</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-77-1" name="__codelineno-77-1" href="#__codelineno-77-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="p">:</span><span class="n">B</span>
-<a id="__codelineno-77-2" name="__codelineno-77-2" href="#__codelineno-77-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B2</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-79-1" name="__codelineno-79-1" href="#__codelineno-79-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A</span><span class="p">:</span><span class="n">B</span>
+<a id="__codelineno-79-2" name="__codelineno-79-2" href="#__codelineno-79-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">A2</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">B2</span>
</code></pre></div>
</div>
</div>
@@ -2718,16 +2778,16 @@
<p>Rule id: <code>colon-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="comma-spacing">Comma spacing<a class="headerlink" href="#comma-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around comma.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="38:2"><input checked="checked" id="__tabbed_38_1" name="__tabbed_38" type="radio" /><input id="__tabbed_38_2" name="__tabbed_38" type="radio" /><div class="tabbed-labels"><label for="__tabbed_38_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_38_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="39:2"><input checked="checked" id="__tabbed_39_1" name="__tabbed_39" type="radio" /><input id="__tabbed_39_2" name="__tabbed_39" type="radio" /><div class="tabbed-labels"><label for="__tabbed_39_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_39_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-78-1" name="__codelineno-78-1" href="#__codelineno-78-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
-<a id="__codelineno-78-2" name="__codelineno-78-2" href="#__codelineno-78-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-80-1" name="__codelineno-80-1" href="#__codelineno-80-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<a id="__codelineno-80-2" name="__codelineno-80-2" href="#__codelineno-80-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-79-1" name="__codelineno-79-1" href="#__codelineno-79-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">,</span><span class="m">3</span><span class="p">)</span>
-<a id="__codelineno-79-2" name="__codelineno-79-2" href="#__codelineno-79-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="m">3</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-81-1" name="__codelineno-81-1" href="#__codelineno-81-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">,</span><span class="m">3</span><span class="p">)</span>
+<a id="__codelineno-81-2" name="__codelineno-81-2" href="#__codelineno-81-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="m">3</span><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -2735,32 +2795,32 @@
<p>Rule id: <code>comma-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="comment-spacing">Comment spacing<a class="headerlink" href="#comment-spacing" title="Permanent link">¶</a></h3>
<p>The end of line comment sign <code>//</code> should be preceded and followed by exactly a space.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="39:2"><input checked="checked" id="__tabbed_39_1" name="__tabbed_39" type="radio" /><input id="__tabbed_39_2" name="__tabbed_39" type="radio" /><div class="tabbed-labels"><label for="__tabbed_39_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_39_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="40:2"><input checked="checked" id="__tabbed_40_1" name="__tabbed_40" type="radio" /><input id="__tabbed_40_2" name="__tabbed_40" type="radio" /><div class="tabbed-labels"><label for="__tabbed_40_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_40_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-80-1" name="__codelineno-80-1" href="#__codelineno-80-1"></a><span class="c1">// comment</span>
-<a id="__codelineno-80-2" name="__codelineno-80-2" href="#__codelineno-80-2"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
-<a id="__codelineno-80-3" name="__codelineno-80-3" href="#__codelineno-80-3"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
-<a id="__codelineno-80-4" name="__codelineno-80-4" href="#__codelineno-80-4"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
-<a id="__codelineno-80-5" name="__codelineno-80-5" href="#__codelineno-80-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-80-6" name="__codelineno-80-6" href="#__codelineno-80-6"></a><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="w"> </span><span class="c1">// 123</span>
-<a id="__codelineno-80-7" name="__codelineno-80-7" href="#__codelineno-80-7"></a><span class="w"> </span><span class="s">"test"</span>
-<a id="__codelineno-80-8" name="__codelineno-80-8" href="#__codelineno-80-8"></a><span class="w"> </span><span class="p">)</span>
-<a id="__codelineno-80-9" name="__codelineno-80-9" href="#__codelineno-80-9"></a><span class="p">}</span>
-<a id="__codelineno-80-10" name="__codelineno-80-10" href="#__codelineno-80-10"></a><span class="w"> </span><span class="c1">// comment</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-82-1" name="__codelineno-82-1" href="#__codelineno-82-1"></a><span class="c1">// comment</span>
+<a id="__codelineno-82-2" name="__codelineno-82-2" href="#__codelineno-82-2"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
+<a id="__codelineno-82-3" name="__codelineno-82-3" href="#__codelineno-82-3"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
+<a id="__codelineno-82-4" name="__codelineno-82-4" href="#__codelineno-82-4"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">// comment</span>
+<a id="__codelineno-82-5" name="__codelineno-82-5" href="#__codelineno-82-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-82-6" name="__codelineno-82-6" href="#__codelineno-82-6"></a><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="w"> </span><span class="c1">// 123</span>
+<a id="__codelineno-82-7" name="__codelineno-82-7" href="#__codelineno-82-7"></a><span class="w"> </span><span class="s">"test"</span>
+<a id="__codelineno-82-8" name="__codelineno-82-8" href="#__codelineno-82-8"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-82-9" name="__codelineno-82-9" href="#__codelineno-82-9"></a><span class="p">}</span>
+<a id="__codelineno-82-10" name="__codelineno-82-10" href="#__codelineno-82-10"></a><span class="w"> </span><span class="c1">// comment</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-81-1" name="__codelineno-81-1" href="#__codelineno-81-1"></a><span class="c1">//comment</span>
-<a id="__codelineno-81-2" name="__codelineno-81-2" href="#__codelineno-81-2"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="c1">// comment</span>
-<a id="__codelineno-81-3" name="__codelineno-81-3" href="#__codelineno-81-3"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">//comment</span>
-<a id="__codelineno-81-4" name="__codelineno-81-4" href="#__codelineno-81-4"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="c1">//comment</span>
-<a id="__codelineno-81-5" name="__codelineno-81-5" href="#__codelineno-81-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-81-6" name="__codelineno-81-6" href="#__codelineno-81-6"></a><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="c1">//123</span>
-<a id="__codelineno-81-7" name="__codelineno-81-7" href="#__codelineno-81-7"></a><span class="w"> </span><span class="s">"test"</span>
-<a id="__codelineno-81-8" name="__codelineno-81-8" href="#__codelineno-81-8"></a><span class="w"> </span><span class="p">)</span>
-<a id="__codelineno-81-9" name="__codelineno-81-9" href="#__codelineno-81-9"></a><span class="p">}</span>
-<a id="__codelineno-81-10" name="__codelineno-81-10" href="#__codelineno-81-10"></a><span class="w"> </span><span class="c1">//comment</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-83-1" name="__codelineno-83-1" href="#__codelineno-83-1"></a><span class="c1">//comment</span>
+<a id="__codelineno-83-2" name="__codelineno-83-2" href="#__codelineno-83-2"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="c1">// comment</span>
+<a id="__codelineno-83-3" name="__codelineno-83-3" href="#__codelineno-83-3"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="c1">//comment</span>
+<a id="__codelineno-83-4" name="__codelineno-83-4" href="#__codelineno-83-4"></a><span class="kd">var</span><span class="w"> </span><span class="nv">debugging</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="c1">//comment</span>
+<a id="__codelineno-83-5" name="__codelineno-83-5" href="#__codelineno-83-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-83-6" name="__codelineno-83-6" href="#__codelineno-83-6"></a><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="c1">//123</span>
+<a id="__codelineno-83-7" name="__codelineno-83-7" href="#__codelineno-83-7"></a><span class="w"> </span><span class="s">"test"</span>
+<a id="__codelineno-83-8" name="__codelineno-83-8" href="#__codelineno-83-8"></a><span class="w"> </span><span class="p">)</span>
+<a id="__codelineno-83-9" name="__codelineno-83-9" href="#__codelineno-83-9"></a><span class="p">}</span>
+<a id="__codelineno-83-10" name="__codelineno-83-10" href="#__codelineno-83-10"></a><span class="w"> </span><span class="c1">//comment</span>
</code></pre></div>
</div>
</div>
@@ -2768,14 +2828,14 @@
<p>Rule id: <code>comment-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="curly-spacing">Curly spacing<a class="headerlink" href="#curly-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around curly braces.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="40:2"><input checked="checked" id="__tabbed_40_1" name="__tabbed_40" type="radio" /><input id="__tabbed_40_2" name="__tabbed_40" type="radio" /><div class="tabbed-labels"><label for="__tabbed_40_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_40_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="41:2"><input checked="checked" id="__tabbed_41_1" name="__tabbed_41" type="radio" /><input id="__tabbed_41_2" name="__tabbed_41" type="radio" /><div class="tabbed-labels"><label for="__tabbed_41_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_41_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-82-1" name="__codelineno-82-1" href="#__codelineno-82-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-84-1" name="__codelineno-84-1" href="#__codelineno-84-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-83-1" name="__codelineno-83-1" href="#__codelineno-83-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">){</span><span class="m">0</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="m">1</span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-85-1" name="__codelineno-85-1" href="#__codelineno-85-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">){</span><span class="m">0</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="m">1</span><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2783,14 +2843,14 @@
<p>Rule id: <code>curly-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="dot-spacing">Dot spacing<a class="headerlink" href="#dot-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around dots.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="41:2"><input checked="checked" id="__tabbed_41_1" name="__tabbed_41" type="radio" /><input id="__tabbed_41_2" name="__tabbed_41" type="radio" /><div class="tabbed-labels"><label for="__tabbed_41_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_41_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="42:2"><input checked="checked" id="__tabbed_42_1" name="__tabbed_42" type="radio" /><input id="__tabbed_42_2" name="__tabbed_42" type="radio" /><div class="tabbed-labels"><label for="__tabbed_42_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_42_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-84-1" name="__codelineno-84-1" href="#__codelineno-84-1"></a><span class="kd">fun</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-86-1" name="__codelineno-86-1" href="#__codelineno-86-1"></a><span class="kd">fun</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-85-1" name="__codelineno-85-1" href="#__codelineno-85-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="w"> </span><span class="p">.</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-87-1" name="__codelineno-87-1" href="#__codelineno-87-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="w"> </span><span class="p">.</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
</code></pre></div>
</div>
</div>
@@ -2798,18 +2858,18 @@
<p>Rule id: <code>dot-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="double-colon-spacing">Double colon spacing<a class="headerlink" href="#double-colon-spacing" title="Permanent link">¶</a></h3>
<p>No spaces around <code>::</code>.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="42:2"><input checked="checked" id="__tabbed_42_1" name="__tabbed_42" type="radio" /><input id="__tabbed_42_2" name="__tabbed_42" type="radio" /><div class="tabbed-labels"><label for="__tabbed_42_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_42_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="43:2"><input checked="checked" id="__tabbed_43_1" name="__tabbed_43" type="radio" /><input id="__tabbed_43_2" name="__tabbed_43" type="radio" /><div class="tabbed-labels"><label for="__tabbed_43_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_43_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-86-1" name="__codelineno-86-1" href="#__codelineno-86-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span><span class="kd">class</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-88-1" name="__codelineno-88-1" href="#__codelineno-88-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span><span class="kd">class</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-87-1" name="__codelineno-87-1" href="#__codelineno-87-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="o">::</span><span class="kd">class</span>
-<a id="__codelineno-87-2" name="__codelineno-87-2" href="#__codelineno-87-2"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span><span class="w"> </span><span class="kd">class</span>
-<a id="__codelineno-87-3" name="__codelineno-87-3" href="#__codelineno-87-3"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="o">::</span><span class="w"> </span><span class="kd">class</span>
-<a id="__codelineno-87-4" name="__codelineno-87-4" href="#__codelineno-87-4"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span>
-<a id="__codelineno-87-5" name="__codelineno-87-5" href="#__codelineno-87-5"></a><span class="w"> </span><span class="kd">class</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-89-1" name="__codelineno-89-1" href="#__codelineno-89-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="o">::</span><span class="kd">class</span>
+<a id="__codelineno-89-2" name="__codelineno-89-2" href="#__codelineno-89-2"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span><span class="w"> </span><span class="kd">class</span>
+<a id="__codelineno-89-3" name="__codelineno-89-3" href="#__codelineno-89-3"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="o">::</span><span class="w"> </span><span class="kd">class</span>
+<a id="__codelineno-89-4" name="__codelineno-89-4" href="#__codelineno-89-4"></a><span class="nc">val</span><span class="w"> </span><span class="n">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Foo</span><span class="o">::</span>
+<a id="__codelineno-89-5" name="__codelineno-89-5" href="#__codelineno-89-5"></a><span class="w"> </span><span class="kd">class</span>
</code></pre></div>
</div>
</div>
@@ -2817,18 +2877,18 @@
<p>Rule id: <code>double-colon-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="function-return-type-spacing">Function return type spacing<a class="headerlink" href="#function-return-type-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around the function return type.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="43:2"><input checked="checked" id="__tabbed_43_1" name="__tabbed_43" type="radio" /><input id="__tabbed_43_2" name="__tabbed_43" type="radio" /><div class="tabbed-labels"><label for="__tabbed_43_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_43_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="44:2"><input checked="checked" id="__tabbed_44_1" name="__tabbed_44" type="radio" /><input id="__tabbed_44_2" name="__tabbed_44" type="radio" /><div class="tabbed-labels"><label for="__tabbed_44_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_44_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-88-1" name="__codelineno-88-1" href="#__codelineno-88-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-90-1" name="__codelineno-90-1" href="#__codelineno-90-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-89-1" name="__codelineno-89-1" href="#__codelineno-89-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-89-2" name="__codelineno-89-2" href="#__codelineno-89-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-89-3" name="__codelineno-89-3" href="#__codelineno-89-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">():</span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-89-4" name="__codelineno-89-4" href="#__codelineno-89-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo4</span><span class="p">():</span>
-<a id="__codelineno-89-5" name="__codelineno-89-5" href="#__codelineno-89-5"></a><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-91-1" name="__codelineno-91-1" href="#__codelineno-91-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-91-2" name="__codelineno-91-2" href="#__codelineno-91-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-91-3" name="__codelineno-91-3" href="#__codelineno-91-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">():</span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-91-4" name="__codelineno-91-4" href="#__codelineno-91-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo4</span><span class="p">():</span>
+<a id="__codelineno-91-5" name="__codelineno-91-5" href="#__codelineno-91-5"></a><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
</div>
@@ -2836,38 +2896,38 @@
<p>Rule id: <code>function-return-type-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="function-start-of-body-spacing">Function start of body spacing<a class="headerlink" href="#function-start-of-body-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing before start of function body.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="44:2"><input checked="checked" id="__tabbed_44_1" name="__tabbed_44" type="radio" /><input id="__tabbed_44_2" name="__tabbed_44" type="radio" /><div class="tabbed-labels"><label for="__tabbed_44_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_44_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="45:2"><input checked="checked" id="__tabbed_45_1" name="__tabbed_45" type="radio" /><input id="__tabbed_45_2" name="__tabbed_45" type="radio" /><div class="tabbed-labels"><label for="__tabbed_45_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_45_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-90-1" name="__codelineno-90-1" href="#__codelineno-90-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-90-2" name="__codelineno-90-2" href="#__codelineno-90-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">()</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-90-3" name="__codelineno-90-3" href="#__codelineno-90-3"></a><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-90-4" name="__codelineno-90-4" href="#__codelineno-90-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-90-5" name="__codelineno-90-5" href="#__codelineno-90-5"></a><span class="w"> </span><span class="c1">// do something</span>
-<a id="__codelineno-90-6" name="__codelineno-90-6" href="#__codelineno-90-6"></a><span class="p">}</span>
-<a id="__codelineno-90-7" name="__codelineno-90-7" href="#__codelineno-90-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar1</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-90-8" name="__codelineno-90-8" href="#__codelineno-90-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-90-9" name="__codelineno-90-9" href="#__codelineno-90-9"></a><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-90-10" name="__codelineno-90-10" href="#__codelineno-90-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar3</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-90-11" name="__codelineno-90-11" href="#__codelineno-90-11"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-90-12" name="__codelineno-90-12" href="#__codelineno-90-12"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-92-1" name="__codelineno-92-1" href="#__codelineno-92-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-92-2" name="__codelineno-92-2" href="#__codelineno-92-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">()</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-92-3" name="__codelineno-92-3" href="#__codelineno-92-3"></a><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-92-4" name="__codelineno-92-4" href="#__codelineno-92-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-92-5" name="__codelineno-92-5" href="#__codelineno-92-5"></a><span class="w"> </span><span class="c1">// do something</span>
+<a id="__codelineno-92-6" name="__codelineno-92-6" href="#__codelineno-92-6"></a><span class="p">}</span>
+<a id="__codelineno-92-7" name="__codelineno-92-7" href="#__codelineno-92-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar1</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-92-8" name="__codelineno-92-8" href="#__codelineno-92-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-92-9" name="__codelineno-92-9" href="#__codelineno-92-9"></a><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-92-10" name="__codelineno-92-10" href="#__codelineno-92-10"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar3</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-92-11" name="__codelineno-92-11" href="#__codelineno-92-11"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-92-12" name="__codelineno-92-12" href="#__codelineno-92-12"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-91-1" name="__codelineno-91-1" href="#__codelineno-91-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-91-2" name="__codelineno-91-2" href="#__codelineno-91-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">()</span>
-<a id="__codelineno-91-3" name="__codelineno-91-3" href="#__codelineno-91-3"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-91-4" name="__codelineno-91-4" href="#__codelineno-91-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">()</span>
-<a id="__codelineno-91-5" name="__codelineno-91-5" href="#__codelineno-91-5"></a><span class="p">{</span>
-<a id="__codelineno-91-6" name="__codelineno-91-6" href="#__codelineno-91-6"></a><span class="w"> </span><span class="c1">// do something</span>
-<a id="__codelineno-91-7" name="__codelineno-91-7" href="#__codelineno-91-7"></a><span class="p">}</span>
-<a id="__codelineno-91-8" name="__codelineno-91-8" href="#__codelineno-91-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar1</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-91-9" name="__codelineno-91-9" href="#__codelineno-91-9"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-91-10" name="__codelineno-91-10" href="#__codelineno-91-10"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-91-11" name="__codelineno-91-11" href="#__codelineno-91-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar3</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span>
-<a id="__codelineno-91-12" name="__codelineno-91-12" href="#__codelineno-91-12"></a><span class="p">{</span>
-<a id="__codelineno-91-13" name="__codelineno-91-13" href="#__codelineno-91-13"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-91-14" name="__codelineno-91-14" href="#__codelineno-91-14"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-93-1" name="__codelineno-93-1" href="#__codelineno-93-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">()</span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-93-2" name="__codelineno-93-2" href="#__codelineno-93-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">()</span>
+<a id="__codelineno-93-3" name="__codelineno-93-3" href="#__codelineno-93-3"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-93-4" name="__codelineno-93-4" href="#__codelineno-93-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">()</span>
+<a id="__codelineno-93-5" name="__codelineno-93-5" href="#__codelineno-93-5"></a><span class="p">{</span>
+<a id="__codelineno-93-6" name="__codelineno-93-6" href="#__codelineno-93-6"></a><span class="w"> </span><span class="c1">// do something</span>
+<a id="__codelineno-93-7" name="__codelineno-93-7" href="#__codelineno-93-7"></a><span class="p">}</span>
+<a id="__codelineno-93-8" name="__codelineno-93-8" href="#__codelineno-93-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar1</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-93-9" name="__codelineno-93-9" href="#__codelineno-93-9"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar2</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-93-10" name="__codelineno-93-10" href="#__codelineno-93-10"></a><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-93-11" name="__codelineno-93-11" href="#__codelineno-93-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar3</span><span class="p">():</span><span class="w"> </span><span class="kt">String</span>
+<a id="__codelineno-93-12" name="__codelineno-93-12" href="#__codelineno-93-12"></a><span class="p">{</span>
+<a id="__codelineno-93-13" name="__codelineno-93-13" href="#__codelineno-93-13"></a><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-93-14" name="__codelineno-93-14" href="#__codelineno-93-14"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2875,19 +2935,19 @@
<p>Rule id: <code>function-start-of-body-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="function-type-reference-spacing">Function type reference spacing<a class="headerlink" href="#function-type-reference-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing in the type reference before a function.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="45:2"><input checked="checked" id="__tabbed_45_1" name="__tabbed_45" type="radio" /><input id="__tabbed_45_2" name="__tabbed_45" type="radio" /><div class="tabbed-labels"><label for="__tabbed_45_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_45_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="46:2"><input checked="checked" id="__tabbed_46_1" name="__tabbed_46" type="radio" /><input id="__tabbed_46_2" name="__tabbed_46" type="radio" /><div class="tabbed-labels"><label for="__tabbed_46_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_46_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-92-1" name="__codelineno-92-1" href="#__codelineno-92-1"></a><span class="kd">fun</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-94-1" name="__codelineno-94-1" href="#__codelineno-94-1"></a><span class="kd">fun</span><span class="w"> </span><span class="n">String</span><span class="p">.</span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-93-1" name="__codelineno-93-1" href="#__codelineno-93-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-93-2" name="__codelineno-93-2" href="#__codelineno-93-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span>
-<a id="__codelineno-93-3" name="__codelineno-93-3" href="#__codelineno-93-3"></a><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-93-4" name="__codelineno-93-4" href="#__codelineno-93-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="o">?</span><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-93-5" name="__codelineno-93-5" href="#__codelineno-93-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="o">?</span>
-<a id="__codelineno-93-6" name="__codelineno-93-6" href="#__codelineno-93-6"></a><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-95-1" name="__codelineno-95-1" href="#__codelineno-95-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-95-2" name="__codelineno-95-2" href="#__codelineno-95-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span>
+<a id="__codelineno-95-3" name="__codelineno-95-3" href="#__codelineno-95-3"></a><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-95-4" name="__codelineno-95-4" href="#__codelineno-95-4"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="o">?</span><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-95-5" name="__codelineno-95-5" href="#__codelineno-95-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">String</span><span class="o">?</span>
+<a id="__codelineno-95-6" name="__codelineno-95-6" href="#__codelineno-95-6"></a><span class="w"> </span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
</div>
@@ -2895,16 +2955,16 @@
<p>Rule id: <code>function-type-reference-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="fun-keyword-spacing">Fun keyword spacing<a class="headerlink" href="#fun-keyword-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing after the fun keyword.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="46:2"><input checked="checked" id="__tabbed_46_1" name="__tabbed_46" type="radio" /><input id="__tabbed_46_2" name="__tabbed_46" type="radio" /><div class="tabbed-labels"><label for="__tabbed_46_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_46_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="47:2"><input checked="checked" id="__tabbed_47_1" name="__tabbed_47" type="radio" /><input id="__tabbed_47_2" name="__tabbed_47" type="radio" /><div class="tabbed-labels"><label for="__tabbed_47_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_47_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-94-1" name="__codelineno-94-1" href="#__codelineno-94-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-96-1" name="__codelineno-96-1" href="#__codelineno-96-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-95-1" name="__codelineno-95-1" href="#__codelineno-95-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
-<a id="__codelineno-95-2" name="__codelineno-95-2" href="#__codelineno-95-2"></a><span class="kd">fun</span>
-<a id="__codelineno-95-3" name="__codelineno-95-3" href="#__codelineno-95-3"></a><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-97-1" name="__codelineno-97-1" href="#__codelineno-97-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
+<a id="__codelineno-97-2" name="__codelineno-97-2" href="#__codelineno-97-2"></a><span class="kd">fun</span>
+<a id="__codelineno-97-3" name="__codelineno-97-3" href="#__codelineno-97-3"></a><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some-result"</span>
</code></pre></div>
</div>
</div>
@@ -2912,18 +2972,18 @@
<p>Rule id: <code>fun-keyword-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="kdoc-wrapping">Kdoc wrapping<a class="headerlink" href="#kdoc-wrapping" title="Permanent link">¶</a></h3>
<p>A KDoc comment should start and end on a line that does not contain any other element.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="47:2"><input checked="checked" id="__tabbed_47_1" name="__tabbed_47" type="radio" /><input id="__tabbed_47_2" name="__tabbed_47" type="radio" /><div class="tabbed-labels"><label for="__tabbed_47_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_47_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="48:2"><input checked="checked" id="__tabbed_48_1" name="__tabbed_48" type="radio" /><input id="__tabbed_48_2" name="__tabbed_48" type="radio" /><div class="tabbed-labels"><label for="__tabbed_48_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_48_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-96-1" name="__codelineno-96-1" href="#__codelineno-96-1"></a><span class="cm">/** Some KDoc comment 1 */</span>
-<a id="__codelineno-96-2" name="__codelineno-96-2" href="#__codelineno-96-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-98-1" name="__codelineno-98-1" href="#__codelineno-98-1"></a><span class="cm">/** Some KDoc comment 1 */</span>
+<a id="__codelineno-98-2" name="__codelineno-98-2" href="#__codelineno-98-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-97-1" name="__codelineno-97-1" href="#__codelineno-97-1"></a><span class="cm">/** Some KDoc comment 1 */</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
-<a id="__codelineno-97-2" name="__codelineno-97-2" href="#__codelineno-97-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo2"</span><span class="w"> </span><span class="cm">/** Some KDoc comment</span>
-<a id="__codelineno-97-3" name="__codelineno-97-3" href="#__codelineno-97-3"></a><span class="cm"> * with a newline</span>
-<a id="__codelineno-97-4" name="__codelineno-97-4" href="#__codelineno-97-4"></a><span class="cm"> */</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-99-1" name="__codelineno-99-1" href="#__codelineno-99-1"></a><span class="cm">/** Some KDoc comment 1 */</span><span class="w"> </span><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo1"</span>
+<a id="__codelineno-99-2" name="__codelineno-99-2" href="#__codelineno-99-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo2"</span><span class="w"> </span><span class="cm">/** Some KDoc comment</span>
+<a id="__codelineno-99-3" name="__codelineno-99-3" href="#__codelineno-99-3"></a><span class="cm"> * with a newline</span>
+<a id="__codelineno-99-4" name="__codelineno-99-4" href="#__codelineno-99-4"></a><span class="cm"> */</span>
</code></pre></div>
</div>
</div>
@@ -2931,18 +2991,18 @@
<p>Rule id: <code>kdoc-wrapping</code> (<code>standard</code> rule set)</p>
<h3 id="keyword-spacing">Keyword spacing<a class="headerlink" href="#keyword-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around keywords.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="48:2"><input checked="checked" id="__tabbed_48_1" name="__tabbed_48" type="radio" /><input id="__tabbed_48_2" name="__tabbed_48" type="radio" /><div class="tabbed-labels"><label for="__tabbed_48_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_48_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="49:2"><input checked="checked" id="__tabbed_49_1" name="__tabbed_49" type="radio" /><input id="__tabbed_49_2" name="__tabbed_49" type="radio" /><div class="tabbed-labels"><label for="__tabbed_49_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_49_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-98-1" name="__codelineno-98-1" href="#__codelineno-98-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-98-2" name="__codelineno-98-2" href="#__codelineno-98-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-98-3" name="__codelineno-98-3" href="#__codelineno-98-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-100-1" name="__codelineno-100-1" href="#__codelineno-100-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-100-2" name="__codelineno-100-2" href="#__codelineno-100-2"></a><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-100-3" name="__codelineno-100-3" href="#__codelineno-100-3"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-99-1" name="__codelineno-99-1" href="#__codelineno-99-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-99-2" name="__codelineno-99-2" href="#__codelineno-99-2"></a><span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="kc">true</span><span class="p">){}</span>
-<a id="__codelineno-99-3" name="__codelineno-99-3" href="#__codelineno-99-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-101-1" name="__codelineno-101-1" href="#__codelineno-101-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-101-2" name="__codelineno-101-2" href="#__codelineno-101-2"></a><span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="kc">true</span><span class="p">){}</span>
+<a id="__codelineno-101-3" name="__codelineno-101-3" href="#__codelineno-101-3"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2950,25 +3010,25 @@
<p>Rule id: <code>keyword-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="modifier-list-spacing">Modifier list spacing<a class="headerlink" href="#modifier-list-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing between modifiers in and after the last modifier in a modifier list.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="49:2"><input checked="checked" id="__tabbed_49_1" name="__tabbed_49" type="radio" /><input id="__tabbed_49_2" name="__tabbed_49" type="radio" /><div class="tabbed-labels"><label for="__tabbed_49_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_49_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="50:2"><input checked="checked" id="__tabbed_50_1" name="__tabbed_50" type="radio" /><input id="__tabbed_50_2" name="__tabbed_50" type="radio" /><div class="tabbed-labels"><label for="__tabbed_50_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_50_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-100-1" name="__codelineno-100-1" href="#__codelineno-100-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-100-2" name="__codelineno-100-2" href="#__codelineno-100-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">abstract</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
-<a id="__codelineno-100-3" name="__codelineno-100-3" href="#__codelineno-100-3"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-102-1" name="__codelineno-102-1" href="#__codelineno-102-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-102-2" name="__codelineno-102-2" href="#__codelineno-102-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">abstract</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
+<a id="__codelineno-102-3" name="__codelineno-102-3" href="#__codelineno-102-3"></a><span class="p">}</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-101-1" name="__codelineno-101-1" href="#__codelineno-101-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-101-2" name="__codelineno-101-2" href="#__codelineno-101-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">abstract</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
-<a id="__codelineno-101-3" name="__codelineno-101-3" href="#__codelineno-101-3"></a><span class="p">}</span>
-<a id="__codelineno-101-4" name="__codelineno-101-4" href="#__codelineno-101-4"></a><span class="kd">abstract</span>
-<a id="__codelineno-101-5" name="__codelineno-101-5" href="#__codelineno-101-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-101-6" name="__codelineno-101-6" href="#__codelineno-101-6"></a><span class="w"> </span><span class="kd">protected</span>
-<a id="__codelineno-101-7" name="__codelineno-101-7" href="#__codelineno-101-7"></a><span class="w"> </span><span class="kd">abstract</span>
-<a id="__codelineno-101-8" name="__codelineno-101-8" href="#__codelineno-101-8"></a><span class="w"> </span><span class="kd">suspend</span>
-<a id="__codelineno-101-9" name="__codelineno-101-9" href="#__codelineno-101-9"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
-<a id="__codelineno-101-10" name="__codelineno-101-10" href="#__codelineno-101-10"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-103-1" name="__codelineno-103-1" href="#__codelineno-103-1"></a><span class="kd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-103-2" name="__codelineno-103-2" href="#__codelineno-103-2"></a><span class="w"> </span><span class="kd">protected</span><span class="w"> </span><span class="kd">abstract</span><span class="w"> </span><span class="kd">suspend</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
+<a id="__codelineno-103-3" name="__codelineno-103-3" href="#__codelineno-103-3"></a><span class="p">}</span>
+<a id="__codelineno-103-4" name="__codelineno-103-4" href="#__codelineno-103-4"></a><span class="kd">abstract</span>
+<a id="__codelineno-103-5" name="__codelineno-103-5" href="#__codelineno-103-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-103-6" name="__codelineno-103-6" href="#__codelineno-103-6"></a><span class="w"> </span><span class="kd">protected</span>
+<a id="__codelineno-103-7" name="__codelineno-103-7" href="#__codelineno-103-7"></a><span class="w"> </span><span class="kd">abstract</span>
+<a id="__codelineno-103-8" name="__codelineno-103-8" href="#__codelineno-103-8"></a><span class="w"> </span><span class="kd">suspend</span>
+<a id="__codelineno-103-9" name="__codelineno-103-9" href="#__codelineno-103-9"></a><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">execute</span><span class="p">()</span>
+<a id="__codelineno-103-10" name="__codelineno-103-10" href="#__codelineno-103-10"></a><span class="p">}</span>
</code></pre></div>
</div>
</div>
@@ -2976,16 +3036,16 @@
<p>Rule id: <code>modifier-list-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="nullable-type-spacing">Nullable type spacing<a class="headerlink" href="#nullable-type-spacing" title="Permanent link">¶</a></h3>
<p>No spaces in a nullable type.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="50:2"><input checked="checked" id="__tabbed_50_1" name="__tabbed_50" type="radio" /><input id="__tabbed_50_2" name="__tabbed_50" type="radio" /><div class="tabbed-labels"><label for="__tabbed_50_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_50_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="51:2"><input checked="checked" id="__tabbed_51_1" name="__tabbed_51" type="radio" /><input id="__tabbed_51_2" name="__tabbed_51" type="radio" /><div class="tabbed-labels"><label for="__tabbed_51_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_51_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-102-1" name="__codelineno-102-1" href="#__codelineno-102-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="kt">String?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span>
-<a id="__codelineno-102-2" name="__codelineno-102-2" href="#__codelineno-102-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">String?</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listOf</span><span class="p">(</span><span class="kc">null</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-104-1" name="__codelineno-104-1" href="#__codelineno-104-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="kt">String?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span>
+<a id="__codelineno-104-2" name="__codelineno-104-2" href="#__codelineno-104-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">String?</span><span class="o">></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listOf</span><span class="p">(</span><span class="kc">null</span><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-103-1" name="__codelineno-103-1" href="#__codelineno-103-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span>
-<a id="__codelineno-103-2" name="__codelineno-103-2" href="#__codelineno-103-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">String</span><span class="w"> </span><span class="o">?></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listOf</span><span class="p">(</span><span class="kc">null</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-105-1" name="__codelineno-105-1" href="#__codelineno-105-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span>
+<a id="__codelineno-105-2" name="__codelineno-105-2" href="#__codelineno-105-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo</span><span class="p">:</span><span class="w"> </span><span class="n">List</span><span class="o"><</span><span class="kt">String</span><span class="w"> </span><span class="o">?></span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listOf</span><span class="p">(</span><span class="kc">null</span><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -2993,20 +3053,20 @@
<p>Rule id: <code>nullable-type-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="operator-spacing">Operator spacing<a class="headerlink" href="#operator-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around operators.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="51:2"><input checked="checked" id="__tabbed_51_1" name="__tabbed_51" type="radio" /><input id="__tabbed_51_2" name="__tabbed_51" type="radio" /><div class="tabbed-labels"><label for="__tabbed_51_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_51_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="52:2"><input checked="checked" id="__tabbed_52_1" name="__tabbed_52" type="radio" /><input id="__tabbed_52_2" name="__tabbed_52" type="radio" /><div class="tabbed-labels"><label for="__tabbed_52_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_52_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-104-1" name="__codelineno-104-1" href="#__codelineno-104-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-104-2" name="__codelineno-104-2" href="#__codelineno-104-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-104-3" name="__codelineno-104-3" href="#__codelineno-104-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-104-4" name="__codelineno-104-4" href="#__codelineno-104-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">2</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-106-1" name="__codelineno-106-1" href="#__codelineno-106-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-106-2" name="__codelineno-106-2" href="#__codelineno-106-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-106-3" name="__codelineno-106-3" href="#__codelineno-106-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-106-4" name="__codelineno-106-4" href="#__codelineno-106-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">2</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-105-1" name="__codelineno-105-1" href="#__codelineno-105-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="o">+</span><span class="m">2</span>
-<a id="__codelineno-105-2" name="__codelineno-105-2" href="#__codelineno-105-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="o">-</span><span class="w"> </span><span class="m">2</span>
-<a id="__codelineno-105-3" name="__codelineno-105-3" href="#__codelineno-105-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">*</span><span class="m">2</span>
-<a id="__codelineno-105-4" name="__codelineno-105-4" href="#__codelineno-105-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">2</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-107-1" name="__codelineno-107-1" href="#__codelineno-107-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="o">+</span><span class="m">2</span>
+<a id="__codelineno-107-2" name="__codelineno-107-2" href="#__codelineno-107-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="o">-</span><span class="w"> </span><span class="m">2</span>
+<a id="__codelineno-107-3" name="__codelineno-107-3" href="#__codelineno-107-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">*</span><span class="m">2</span>
+<a id="__codelineno-107-4" name="__codelineno-107-4" href="#__codelineno-107-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">2</span>
</code></pre></div>
</div>
</div>
@@ -3014,20 +3074,20 @@
<p>Rule id: <code>op-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="parenthesis-spacing">Parenthesis spacing<a class="headerlink" href="#parenthesis-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around parenthesis.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="52:2"><input checked="checked" id="__tabbed_52_1" name="__tabbed_52" type="radio" /><input id="__tabbed_52_2" name="__tabbed_52" type="radio" /><div class="tabbed-labels"><label for="__tabbed_52_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_52_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="53:2"><input checked="checked" id="__tabbed_53_1" name="__tabbed_53" type="radio" /><input id="__tabbed_53_2" name="__tabbed_53" type="radio" /><div class="tabbed-labels"><label for="__tabbed_53_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_53_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-106-1" name="__codelineno-106-1" href="#__codelineno-106-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-106-2" name="__codelineno-106-2" href="#__codelineno-106-2"></a><span class="w"> </span><span class="k">constructor</span><span class="p">(</span><span class="n">string</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">super</span><span class="p">()</span>
-<a id="__codelineno-106-3" name="__codelineno-106-3" href="#__codelineno-106-3"></a><span class="p">}</span>
-<a id="__codelineno-106-4" name="__codelineno-106-4" href="#__codelineno-106-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">((</span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-108-1" name="__codelineno-108-1" href="#__codelineno-108-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-108-2" name="__codelineno-108-2" href="#__codelineno-108-2"></a><span class="w"> </span><span class="k">constructor</span><span class="p">(</span><span class="n">string</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">super</span><span class="p">()</span>
+<a id="__codelineno-108-3" name="__codelineno-108-3" href="#__codelineno-108-3"></a><span class="p">}</span>
+<a id="__codelineno-108-4" name="__codelineno-108-4" href="#__codelineno-108-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">((</span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-107-1" name="__codelineno-107-1" href="#__codelineno-107-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-107-2" name="__codelineno-107-2" href="#__codelineno-107-2"></a><span class="w"> </span><span class="k">constructor</span><span class="p">(</span><span class="n">string</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">super</span><span class="w"> </span><span class="p">()</span>
-<a id="__codelineno-107-3" name="__codelineno-107-3" href="#__codelineno-107-3"></a><span class="p">}</span>
-<a id="__codelineno-107-4" name="__codelineno-107-4" href="#__codelineno-107-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-109-1" name="__codelineno-109-1" href="#__codelineno-109-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-109-2" name="__codelineno-109-2" href="#__codelineno-109-2"></a><span class="w"> </span><span class="k">constructor</span><span class="p">(</span><span class="n">string</span><span class="p">:</span><span class="w"> </span><span class="kt">String</span><span class="p">)</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">super</span><span class="w"> </span><span class="p">()</span>
+<a id="__codelineno-109-3" name="__codelineno-109-3" href="#__codelineno-109-3"></a><span class="p">}</span>
+<a id="__codelineno-109-4" name="__codelineno-109-4" href="#__codelineno-109-4"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
</code></pre></div>
</div>
</div>
@@ -3035,18 +3095,18 @@
<p>Rule id: <code>paren-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="range-spacing">Range spacing<a class="headerlink" href="#range-spacing" title="Permanent link">¶</a></h3>
<p>Consistent spacing around range operators.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="53:2"><input checked="checked" id="__tabbed_53_1" name="__tabbed_53" type="radio" /><input id="__tabbed_53_2" name="__tabbed_53" type="radio" /><div class="tabbed-labels"><label for="__tabbed_53_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_53_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="54:2"><input checked="checked" id="__tabbed_54_1" name="__tabbed_54" type="radio" /><input id="__tabbed_54_2" name="__tabbed_54" type="radio" /><div class="tabbed-labels"><label for="__tabbed_54_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_54_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-108-1" name="__codelineno-108-1" href="#__codelineno-108-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
-<a id="__codelineno-108-2" name="__codelineno-108-2" href="#__codelineno-108-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
-<a id="__codelineno-108-3" name="__codelineno-108-3" href="#__codelineno-108-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-110-1" name="__codelineno-110-1" href="#__codelineno-110-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<a id="__codelineno-110-2" name="__codelineno-110-2" href="#__codelineno-110-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<a id="__codelineno-110-3" name="__codelineno-110-3" href="#__codelineno-110-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-109-1" name="__codelineno-109-1" href="#__codelineno-109-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
-<a id="__codelineno-109-2" name="__codelineno-109-2" href="#__codelineno-109-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
-<a id="__codelineno-109-3" name="__codelineno-109-3" href="#__codelineno-109-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">..</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-111-1" name="__codelineno-111-1" href="#__codelineno-111-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1.</span><span class="p">.</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<a id="__codelineno-111-2" name="__codelineno-111-2" href="#__codelineno-111-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">..</span><span class="w"> </span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
+<a id="__codelineno-111-3" name="__codelineno-111-3" href="#__codelineno-111-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="w"> </span><span class="p">..</span><span class="m">12</span><span class="w"> </span><span class="n">step</span><span class="w"> </span><span class="m">2</span><span class="p">).</span><span class="na">last</span>
</code></pre></div>
</div>
</div>
@@ -3054,14 +3114,14 @@
<p>Rule id: <code>range-spacing</code> (<code>standard</code> rule set)</p>
<h3 id="spacing-between-function-name-and-opening-parenthesis">Spacing between function name and opening parenthesis<a class="headerlink" href="#spacing-between-function-name-and-opening-parenthesis" title="Permanent link">¶</a></h3>
<p>Consistent spacing between function name and opening parenthesis.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="54:2"><input checked="checked" id="__tabbed_54_1" name="__tabbed_54" type="radio" /><input id="__tabbed_54_2" name="__tabbed_54" type="radio" /><div class="tabbed-labels"><label for="__tabbed_54_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_54_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="55:2"><input checked="checked" id="__tabbed_55_1" name="__tabbed_55" type="radio" /><input id="__tabbed_55_2" name="__tabbed_55" type="radio" /><div class="tabbed-labels"><label for="__tabbed_55_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_55_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-110-1" name="__codelineno-110-1" href="#__codelineno-110-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-112-1" name="__codelineno-112-1" href="#__codelineno-112-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-111-1" name="__codelineno-111-1" href="#__codelineno-111-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-113-1" name="__codelineno-113-1" href="#__codelineno-113-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"foo"</span>
</code></pre></div>
</div>
</div>
@@ -3069,19 +3129,19 @@
<p>Rule id: <code>spacing-between-function-name-and-opening-parenthesis</code> (<code>standard</code> rule set)</p>
<h3 id="unary-operator-spacing">Unary operator spacing<a class="headerlink" href="#unary-operator-spacing" title="Permanent link">¶</a></h3>
<p>No spaces around unary operators.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="55:2"><input checked="checked" id="__tabbed_55_1" name="__tabbed_55" type="radio" /><input id="__tabbed_55_2" name="__tabbed_55" type="radio" /><div class="tabbed-labels"><label for="__tabbed_55_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_55_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="56:2"><input checked="checked" id="__tabbed_56_1" name="__tabbed_56" type="radio" /><input id="__tabbed_56_2" name="__tabbed_56" type="radio" /><div class="tabbed-labels"><label for="__tabbed_56_1"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12 21.35-1.45-1.32C5.4 15.36 2 12.27 2 8.5 2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 3.77-3.4 6.86-8.55 11.53L12 21.35Z"/></svg></span></a> Ktlint</label><label for="__tabbed_56_2"><a href="#"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.39 1.73 1.11 3l2.08 2.08C2.45 6 2 7.19 2 8.5c0 3.77 3.4 6.86 8.55 11.53L12 21.35l1.45-1.32c.87-.79 1.69-1.53 2.45-2.24L20 22l1.27-1.27m-9.17-2.18-.1.1-.11-.1C7.14 14.24 4 11.39 4 8.5c0-.76.22-1.44.61-2l9.89 9.87c-.76.69-1.55 1.41-2.4 2.18M8.3 5.1 6.33 3.13C6.7 3.05 7.1 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.41 22 8.5c0 2.34-1.31 4.42-3.53 6.77l-1.41-1.41C18.91 11.88 20 10.2 20 8.5c0-2-1.5-3.5-3.5-3.5-1.4 0-2.76.83-3.39 2h-2.22c-.51-.94-1.5-1.66-2.59-1.9Z"/></svg></span></a> Disallowed</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-112-1" name="__codelineno-112-1" href="#__codelineno-112-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="o">++</span>
-<a id="__codelineno-112-2" name="__codelineno-112-2" href="#__codelineno-112-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="n">i</span>
-<a id="__codelineno-112-3" name="__codelineno-112-3" href="#__codelineno-112-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="n">i</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-114-1" name="__codelineno-114-1" href="#__codelineno-114-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="o">++</span>
+<a id="__codelineno-114-2" name="__codelineno-114-2" href="#__codelineno-114-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="n">i</span>
+<a id="__codelineno-114-3" name="__codelineno-114-3" href="#__codelineno-114-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="n">i</span>
</code></pre></div>
</div>
<div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-113-1" name="__codelineno-113-1" href="#__codelineno-113-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">++</span>
-<a id="__codelineno-113-2" name="__codelineno-113-2" href="#__codelineno-113-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="w"> </span><span class="n">i</span>
-<a id="__codelineno-113-3" name="__codelineno-113-3" href="#__codelineno-113-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span>
-<a id="__codelineno-113-4" name="__codelineno-113-4" href="#__codelineno-113-4"></a><span class="w"> </span><span class="n">i</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-115-1" name="__codelineno-115-1" href="#__codelineno-115-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">++</span>
+<a id="__codelineno-115-2" name="__codelineno-115-2" href="#__codelineno-115-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span><span class="w"> </span><span class="n">i</span>
+<a id="__codelineno-115-3" name="__codelineno-115-3" href="#__codelineno-115-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">i</span><span class="p">:</span><span class="w"> </span><span class="kt">Int</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">++</span>
+<a id="__codelineno-115-4" name="__codelineno-115-4" href="#__codelineno-115-4"></a><span class="w"> </span><span class="n">i</span>
</code></pre></div>
</div>
</div>
diff --git a/dev-snapshot/search/search_index.json b/dev-snapshot/search/search_index.json
index 7a79742..05bb5ee 100644
--- a/dev-snapshot/search/search_index.json
+++ b/dev-snapshot/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to Ktlint","text":"<p> Kotlin linter in spirit of feross/standard (JavaScript) and gofmt (Go). </p>"},{"location":"#features","title":"Features","text":"<ul> <li>No configuration required <code>ktlint</code> aims to capture the Kotlin coding conventions and Android Kotlin Style Guide. In some aspects <code>ktlint</code> is a bit more strict*.</li> <li>Rule sets <code>ktlint</code> offers a <code>standard</code> rule set. Next to this, it is easy to provide custom rule sets.</li> <li>.editorconfig Some rules do allow further configuration, but in all cases a reasonable default is set when not provided. <code>ktlint</code> primarily uses the .editorconfig file to read default <code>.editorconfig</code>, IntelliJ IDEA specific and Ktlint specific properties.</li> <li>Disable rules If need be, rules can be disabled easily*.</li> <li>Built-in formatter Most lint violations don't need to be fixed manually. <code>ktlint</code> has a built-in formatter which fixes violations when possible. Some violations can not be fixed in a deterministic way, and need manual action.</li> <li>Customizable output Several reporters are available out-of-the-box: <code>plain</code> (+ <code>plain?group_by_file</code>), <code>plain-summary</code>, <code>json</code>, <code>html</code> and <code>checkstyle</code>. It's also easy to create a custom reporter.</li> <li>Executable jar <code>ktlint</code> is released as a single executable jar with all dependencies included.</li> </ul>"},{"location":"#legal","title":"Legal","text":"<p>This project is not affiliated with nor endorsed by JetBrains. All code, unless specified otherwise, is licensed under the MIT license. Copyright \u00a9 2019 Pinterest, Inc. Copyright \u00a9 2016-2019 Stanley Shyiko.</p>"},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#why-should-i-use-ktlint","title":"Why should I use ktlint?","text":"<p>the short answer is Simplicity.</p> <p>Spending time on configuration (and maintenance down the road) of hundred-line long style config file(s) is counter-productive. Instead of wasting your energy on something that has no business value - focus on what really matters (not debating whether to use tabs or spaces).</p> <p>By using ktlint you put the importance of code clarity and community conventions over personal preferences. This makes things easier for people reading your code as well as frees you from having to document and explain what style potential contributor(s) have to follow.</p> <p>ktlint is a single binary with both linter & formatter included. All you need is to drop it in (no need to get overwhelmed while choosing among dozens of code style options).</p>"},{"location":"faq/#how-do-i-enable-or-disable-a-rule","title":"How do I enable or disable a rule?","text":"<p>An individual rule can be enabled or disabled with a rule property. The name of the rule property consists of the <code>ktlint_</code> prefix followed by the rule set id followed by a <code>_</code> and the rule id. Examples: <pre><code>ktlint_standard_final-newline = disabled # Disables the `final-newline` rule in the `standard` rule set provided by KtLint\nktlint_standard_some-experimental-rule = enabled # Enables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed.</p>"},{"location":"faq/#how-do-i-enable-or-disable-a-rule-set","title":"How do I enable or disable a rule set?","text":"<p>All rules in a rule set can be enabled or disabled with a rule set property. The name of the rule set property consists of the <code>ktlint_</code> prefix followed by the rule set id. Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>All rules from the <code>standard</code> and custom rule sets are enabled by default and can optionally be disabled in the <code>.editorconfig</code>. All <code>experimental</code> rules are disabled by default and can optionally be enabled in the <code>.editorconfig</code>.</p>"},{"location":"faq/#can-i-have-my-own-rules-on-top-of-ktlint","title":"Can I have my own rules on top of ktlint?","text":"<p>Absolutely, \"no configuration\" doesn't mean \"no extensibility\". You can add your own ruleset(s) to discover potential bugs, check for anti-patterns, etc.</p> <p>See adding a custom rule set for more information.</p>"},{"location":"faq/#how-do-i-suppress-errors-for-a-lineblockfile","title":"How do I suppress errors for a line/block/file?","text":"<p>Tip</p> <p>Suppressing a <code>ktlint</code> violation is meant primarily as an escape latch for the rare cases when ktlint is not able to produce the correct result. Please report any such instances using GitHub Issues).</p> <p>To disable a specific rule you'll need the rule identifier which is displayed at the end of the lint error.</p> <p>An error can be suppressed using:</p> <ul> <li>EOL comments</li> <li>Block comments</li> <li>@Suppress annotations</li> </ul> Suppress annotation EOL comments Block comments <pre><code>// Suppressing all rules for the entire file\n@file:Suppress(\"ktlint\")\n// Suppress a single rule (with id 'rule-id', defined in rule set with id 'rule-set-id') from the annotated construct\n@Suppress(\"ktlint:rule-set-id:rule-id\")\nclass Foo {}\n// Suppress multiple rules for the annotated construct\n@Suppress(\"ktlint:standard:no-wildcard-imports\", \"ktlint:custom-rule-set-id:custom-rule-id\")\nimport foo.*\n// Suppress all rules for the annotated construct\n@Suppress(\"ktlint\")\nimport foo.*\n</code></pre> <pre><code>// Suppress a single rule for the commented line\nimport foo.* // ktlint-disable standard_no-wildcard-imports\n// Suppress multiple rules for the commented line\nimport foo.* // ktlint-disable standard_no-wildcard-imports standard_other-rule-id\n// Suppress all rules for the commented line\nimport foo.* // ktlint-disable\n</code></pre> <pre><code>// Suppress a single rule for all code between the start and end tag\n/* ktlint-disable standard_no-wildcard-imports */\nimport foo.*\n/* ktlint-disable standard_no-wildcard-imports */\n// Suppress multiple rules for all code between the start and end tag\n/* ktlint-disable standard_no-wildcard-imports standard_no-wildcard-imports */\nimport foo.*\n/* ktlint-enable standard_no-wildcard-imports standard_no-wildcard-imports */\n// Suppress all rules for all code between the start and end tag\n/* ktlint-disable */\nimport foo.*\n/* ktlint-enable */\n</code></pre> <p>Important</p> <p>When using the block comments, the <code>ktlint-enable</code> directive needs to specify the exact same rule-id's and in the same order as the <code>ktlint-disable</code> directive.</p> <p>Warning</p> <p>From a consistency perspective seen, it might be best to not mix the (EOL/Block) comment style with the annotation style in the same project.</p>"},{"location":"faq/#how-do-i-globally-disable-a-rule-without-editorconfig","title":"How do I globally disable a rule without <code>.editorconfig</code>?","text":"<p>When using Ktlint CLI, you may pass a list of disabled rules via the <code>--disabled_rules</code> command line flag. The value is a comma separated list of rule id's that have to be disabled. The rule id must be fully qualified (e.g. must be prefixed with the rule set id). </p>"},{"location":"faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this","title":"Why is <code>.editorconfig</code> property <code>disabled_rules</code> deprecated and how do I resolve this?","text":"<p>The <code>.editorconfig</code> properties <code>disabled_rules</code> and <code>ktlint_disabled_rules</code> are deprecated as of KtLint version <code>0.48</code> and are removed in version <code>0.49</code>. Those properties contain a comma separated list of rules which are disabled. Using a comma separated list of values has some disadvantages.</p> <p>A big disadvantage is that it is not possible to override the property partially in an <code>.editorconfig</code> file in a subpackage. Another disadvantage is that it is not possible to express explicitly that a rule is enabled. Lastly, (qualified) rule ids can be 20 characters or longer, which makes a list with multiple entries hard to read.</p> <p>Starting with KtLint <code>0.48</code> entire rule sets and individual rules can be disabled / enabled with a separate property per rule (set). Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_standard_final-newline = enabled # Enables the `final-newline` rule in the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\nktlint_standard_some-experimental-rule = disabled # Disables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>All rules from the <code>standard</code> and custom rule sets are enabled by default and can optionally be disabled in the <code>.editorconfig</code>. All <code>experimental</code> rules are disabled by default and can optionally be enabled in the <code>.editorconfig</code>.</p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed. </p>"},{"location":"faq/#why-is-wildcard-import-javautil-not-reported-by-the-no-wildcard-imports-rule","title":"Why is wildcard import <code>java.util.*</code> not reported by the <code>no-wildcard-imports</code> rule?","text":"<p>The <code>no-wildcard-imports</code> rule forbids wildcard imports, except for imports defined in <code>.editorconfig</code> property <code>ij_kotlin_packages_to_use_import_on_demand</code>. If this property is not explicitly set, it allows wildcards imports like <code>java.util.*</code> by default to keep in sync with IntelliJ IDEA behavior.</p>"},{"location":"faq/#can-a-new-toggle-be-added-to-optionally-enabledisable-format-code-in-a-particular-way","title":"Can a new toggle be added to optionally (enable/disable) format code in a particular way?","text":"<p>Ktlint can be configured by enabling and disabling rules. Some rules can be configured in more details with additional <code>.editorconfig</code> properties. Regularly, a new configuration option is requested to modify behavior in existing rules.</p> <p>Ktlint is restrictive with adding additional configuration settings to customize behavior in rules. Each configuration option that Ktlint offers comes with complexity that has to be maintained by only a couple of maintainers. As of that, we cannot provide tens or even hundreds of such options.</p> <p>Less configuration options also means less discussions in teams about settings to use. Unfortunately this means that you cannot tweak Ktlint exactly to the format you prefer.</p> <p>Tip</p> <p>Any idea for a new configuration option is valuable. Please create an issue for it so that it can be considered to incorporate it in Ktlint.</p>"},{"location":"faq/#can-i-use-ktlint-to-directly-format-the-code-im-generating-with-kotlinpoet","title":"Can I use KtLint to directly format the code I'm generating with KotlinPoet?","text":"<p>Yes, it is possible to use KtLint to directly format the code generated with KotlinPoet. To do so, you must include the dependencies <code>com.pinterest.ktlint:ktlint-core</code> and <code>com.pinterest.ktlint:ktlint-ruleset-standard</code> in your Gradle/Maven project.</p> <p>Warning</p> <p>Do not include the dependency <code>com.pinterest:ktlint</code> as that would import the entire ktlint project including unwanted dependencies. Besides a much bigger artifact, it might also result in problems regarding logging.</p> <p>To format the output of KotlinPoet with KtLint, you can use the following snippet:</p> <p><pre><code>val ruleProviders = buildSet {\nServiceLoader\n.load(RuleSetProviderV2::class.java)\n.flatMapTo(this) { it.getRuleProviders() }\n}\nval ktLintRuleEngine = KtLintRuleEngine(\nruleProviders = ruleProviders,\neditorConfigDefaults = EditorConfigDefaults.load(EDITORCONFIG_PATH),\n)\nktLintRuleEngine.format(outputDir.toPath())\n</code></pre> Here, outputDir refers to the directory of the generated files by KotlinPoet, ktLintRuleEngine is an instance of KtLint rule engine.</p> <p>It is also possible to format file-by-file the output of KotlinPoet if you write your <code>FileSpec</code> to a <code>StringBuilder()</code>, instead of a <code>File</code>, and send the generated code as <code>String</code> to KtLint inside a <code>CodeSnippet</code>: <pre><code>kotlinFile.writeText(\nktLintRuleEngine.format(\nCode.CodeSnippet(\nstringBuilder.toString()\n)\n)\n)\n</code></pre></p>"},{"location":"faq/#are-formatter-tags-respected","title":"Are formatter tags respected?","text":"<p>As of version <code>0.49.x</code> the formatter tags of IntelliJ IDEA are respected. By default, those formatter tags are disabled. The formatter tags can be enabled with <code>.editorconfig</code> properties below: <pre><code>ij_formatter_tags_enabled = true # Defaults to 'false'\nij_formatter_off_tag = some-custom-off-tag # Defaults to '@formatter:off'\nij_formatter_on_tag = some-custom-on-tag # Defaults to '@formatter:on'\n</code></pre></p> <p>When enabled, the ktlint rule checking is disabled for all code surrounded by the formatter tags.</p>"},{"location":"readme/","title":"Build & test documentation on local machine","text":"<p>The documentation of ktlint is served with mkdocs-material. For full documentation visit mkdocs.org.</p> <p>To build and test documentation on your local development machine, follow steps below:</p>"},{"location":"readme/#setup","title":"Setup","text":"<ol> <li>In IntelliJ IDEA<ul> <li>Open <code>Preferences</code></li> <li>Search for <code>JSON Schema mappings</code></li> <li>Add new schema for url <code>https://squidfunk.github.io/mkdocs-material/schema.json</code> and add file <code>mkdocs.yml</code> for this url.</li> </ul> </li> <li>Pull docker image <pre><code>$ docker pull squidfunk/mkdocs-material\n</code></pre></li> </ol>"},{"location":"readme/#build-server","title":"Build server","text":"<p>The following steps build and host the documentation locally, updating automatically whenever a local file is changed.</p> <ol> <li>Start mkdocs server from root of project (e.g. from same directory where file mkdocs.yml is located) <pre><code>docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n</code></pre></li> <li>Visit page <code>http://0.0.0.0:8000/</code> in your browser.</li> <li>Edit the documentation and explicitly save the file. The mkdocs server refreshes its cached and the current page in the browser is automatically refreshed.</li> </ol>"},{"location":"readme/#build-once","title":"Build once","text":"<p>If you do not want to run a local server, or if you want to inspect the built files, you can run the following command from the project's main directory to build the documentation in the <code>site/</code> directory.</p> <pre><code>docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material build\n</code></pre>"},{"location":"api/badge/","title":"Badge","text":"<p>If you want to display a badge to show that your project is linted and formatted using <code>'ktlint</code> than you can add the badge:</p> Ktlint code style badge<pre><code>[](https://pinterest.github.io/ktlint/)\n</code></pre>"},{"location":"api/custom-integration/","title":"Custom integration","text":"<p>Warning</p> <p>This page is based on Ktlint <code>0.49.x</code> which has to be released. Most concepts are also applicable for <code>0.48.x</code>. </p>"},{"location":"api/custom-integration/#ktlint-rule-engine","title":"Ktlint Rule Engine","text":"<p>The <code>Ktlint Rule Engine</code> is the central entry point for custom integrations with the <code>Ktlint API</code>. See basic API Consumer for a basic example on how to invoke the <code>Ktlint Rule Engine</code>. This example also explains how the logging of the <code>Ktlint Rule Engine</code> can be configured to your needs.</p> <p>The <code>KtLintRuleEngine</code> instance only needs to be created once for the entire lifetime of your application. Reusing the same instance results in better performance due to caching. </p> Creating the KtLintRuleEngine<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n)\n</code></pre>"},{"location":"api/custom-integration/#rule-provider","title":"Rule provider","text":"<p>The <code>KtLintRuleEngine</code> must be configured with at least one <code>RuleProvider</code>. A <code>RuleProvider</code> is a lambda which upon request of the <code>KtLintRuleEngine</code> provides a new instance of a specific rule. You can either provide any of the standard rules provided by KtLint or with your own custom rules, or with a combination of both. Creating a set of RuleProviders<pre><code>val KTLINT_API_CONSUMER_RULE_PROVIDERS =\nsetOf(\n// Can provide custom rules\nRuleProvider { NoVarRule() },\n// but also reuse rules from KtLint rulesets\nRuleProvider { IndentationRule() },\n)\n</code></pre></p>"},{"location":"api/custom-integration/#editor-config-defaults-overrides","title":"Editor config: defaults & overrides","text":"<p>When linting and formatting files, the <code>KtlintRuleEngine</code> takes the <code>.editorconfig</code> file(s) into account which are found on the path to the file. A property which is specified in the <code>editorConfigOverride</code> property of the <code>KtLintRuleEngine</code> takes precedence above the value of that same property in the <code>.editorconfig</code> file. The <code>editorConfigDefaults</code> property of the <code>KtLintRuleEngine</code> can be used to specify the fallback values for properties in case that property is not defined in the <code>.editorconfig</code> file (or in the <code>editorConfigOverride</code> property).</p> Specifying the editorConfigOverride<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigOverride = EditorConfigOverride.from(\nINDENT_STYLE_PROPERTY to IndentConfig.IndentStyle.SPACE,\nINDENT_SIZE_PROPERTY to 4\n)\n)\n</code></pre> <p>The <code>editorConfigOverride</code> property takes an <code>EditorConfigProperty</code> as key. KtLint defines several such properties, but they can also be defined as part of a custom rule.</p> <p>The <code>editorConfigDefaults</code> property is more cumbersome to define as it is based directly on the data format of the <code>ec4j</code> library which is used for parsing the <code>.editorconfig</code> file.</p> <p>The defaults can be loaded from a path or a directory. If a path to a file is specified, the name of the file does not necessarily have to end with <code>.editorconfig</code>. If a path to a directory is specified, the directory should contain a file with name <code>.editorconfig</code>. Note that the <code>propertyTypes</code> have to be derived from the same collection of rule providers that are specified in the <code>ruleProviders</code> property of the <code>KtLintRuleEngine</code>. </p> <p>Specifying the editorConfigDefaults using an '.editorconfig' file<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigDefaults = EditorConfigDefaults.load(\npath = Paths.get(\"/some/path/to/editorconfig/file/or/directory\"),\npropertyTypes = KTLINT_API_CONSUMER_RULE_PROVIDERS.propertyTypes(),\n)\n)\n</code></pre> If you want to include all RuleProviders of the Ktlint project than you can easily retrieve the collection using <code>StandardRuleSetProvider().getRuleProviders()</code>.</p> <p>The <code>EditorConfigDefaults</code> property can also be specified programmatically as is shown below:</p> Specifying the editorConfigDefaults programmatically<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigDefaults = EditorConfigDefaults(\norg.ec4j.core.model.EditorConfig\n.builder()\n// .. add relevant properties\n.build()\n)\n)\n</code></pre>"},{"location":"api/custom-integration/#lint-format","title":"Lint & format","text":"<p>Once the <code>KtLintRuleEngine</code> has been defined, it is ready to be invoked for each file or code snippet that has to be linted or formatted. The the <code>lint</code> and <code>format</code> functions take a <code>Code</code> instance as parameter. Such an instance can either be created from a file Code from file<pre><code>val code = Code.fromFile(\nFile(\"/some/path/to/file\")\n)\n</code></pre> or a code snippet (set <code>script</code> to <code>true</code> to handle the snippet as Kotlin script): Code from snippet<pre><code>val code = Code.fromSnippet(\n\"\"\"\n val code = \"some-code\"\n \"\"\".trimIndent()\n)\n</code></pre></p> <p>The <code>lint</code> function is invoked with a lambda which is called each time a <code>LintError</code> is found and does not return a result. Specifying the editorConfigDefaults programmatically<pre><code>ktLintRuleEngine\n.lint(codeFile) { lintError ->\n// handle\n}\n</code></pre></p> <p>The <code>format</code> function is invoked with a lambda which is called each time a <code>LintError</code> is found and returns the formatted code as result. Note that the <code>LintError</code> should be inspected for errors that could not be autocorrected. Specifying the editorConfigDefaults programmatically<pre><code>val formattedCode =\nktLintRuleEngine\n.format(codeFile) { lintError ->\n// handle\n}\n</code></pre></p>"},{"location":"api/custom-integration/#logging","title":"Logging","text":"<p>Ktlint uses the <code>io.github.microutils:kotlin-logging</code> which is a <code>slf4j</code> wrapper. As API consumer you can choose which logging framework you want to use and configure that framework to your exact needs. The basic API Consumer contains an example with <code>org.slf4j:slf4j-simple</code> as logging provider and a customized configuration which shows logging at <code>DEBUG</code> level for all classes except one specific class which only displays logging at <code>WARN</code> level.</p>"},{"location":"api/custom-reporter/","title":"Custom reporter","text":""},{"location":"api/custom-reporter/#build-a-custom-reporter","title":"Build a custom reporter","text":"<p>Take a look at ktlint-cli-reporter-plain.</p> <p>In short, all you need to do is to implement a ReporterV2 and make it available by registering a custom ReporterProviderV2 using <code>META-INF/services/com.pinterest.ktlint.cli.reporter.core.api.ReporterProviderV2</code>. Pack all of that into a JAR and you're done.</p> <p>To load a custom (3rd party) reporter use <code>ktlint --reporter=name,artifact=/path/to/custom-ktlint-reporter.jar</code> (see <code>ktlint --help</code> for more).</p>"},{"location":"api/custom-reporter/#third-party-reporters","title":"Third party reporters","text":"<p>Known third-party reporters:</p> <ul> <li>kryanod/ktlint-junit-reporter reports ktlint output as an xml file in JUnit format so that the ktlint report can be made visible on the Merge Request page.</li> <li>musichin/ktlint-github-reporter uses GitHub workflow commands to set error messages for <code>ktlint</code> issues.</li> <li>tobi2k/ktlint-gitlab-reporter provides output in JSON format that can be parsed by GitLab automatically.</li> </ul>"},{"location":"api/custom-rule-set/","title":"Custom rule set","text":"<p>Tip</p> <p>See Writing your first ktlint rule by Niklas Baudy.</p> <p>In a nutshell: a \"rule set\" is a JAR containing one or more Rules. <code>ktlint</code> is relying on the ServiceLoader to discover all available \"RuleSet\"s on the classpath. As a ruleset author, all you need to do is to include a <code>META-INF/services/RuleSetProviderV3</code> file containing a fully qualified name of your RuleSetProviderV3 implementation.</p>"},{"location":"api/custom-rule-set/#ktlint-ruleset-template","title":"ktlint-ruleset-template","text":"<p>A complete sample project (with tests and build files) is included in this repo under the ktlint-ruleset-template directory (make sure to check NoVarRuleTest as it contains some useful information).</p> Building the ktlint-ruleset-template<pre><code>$ cd ktlint-ruleset-template/\n$ ../gradlew build\n</code></pre> Provide code sample that violates rule `custom:no-var<pre><code>$ echo 'var v = 0' > test.kt\n</code></pre> Running the ktlint-ruleset-template<pre><code>$ ktlint -R build/libs/ktlint-ruleset-template.jar --log-level=debug --relative test.kt\n\n18:13:21.026 [main] DEBUG com.pinterest.ktlint.internal.RuleSetsLoader - JAR ruleset provided with path \"/../ktlint/ktlint-ruleset-template/build/libs/ktlint-ruleset-template.jar\"\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"baseline\" id.\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"checkstyle\" id.\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"json\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"html\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"plain\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"sarif\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Initializing \"plain\" reporter with {verbose=false, color=false, color_name=DARK_GRAY}\n[DEBUG] Rule with id 'standard:max-line-length' should run after the rule with id 'trailing-comma'. However, the latter rule is not loaded and is allowed to be ignored. For best results, it is advised load the rule.\n[DEBUG] Rules will be executed in order below (unless disabled):\n - standard:filename, - standard:final-newline, - standard:chain-wrapping, - standard:colon-spacing, - standard:comma-spacing, - standard:comment-spacing, - standard:curly-spacing, - standard:dot-spacing, - standard:import-ordering, - standard:keyword-spacing, - standard:modifier-order, - standard:no-blank-line-before-rbrace, - standard:no-consecutive-blank-lines, - standard:no-empty-class-body, - standard:no-line-break-after-else, - standard:no-line-break-before-assignment, - standard:no-multi-spaces, - standard:no-semi, - standard:no-trailing-spaces, - standard:no-unit-return, - standard:no-unused-imports, - standard:no-wildcard-imports, - standard:op-spacing, - standard:parameter-list-wrapping, - standard:paren-spacing, - standard:range-spacing, - standard:string-template, - custom:no-var, - standard:indent, - standard:max-line-length\n`text test.kt:1:1: Unexpected var, use val instead (cannot be auto-corrected)`\n18:13:21.893 [main] DEBUG com.pinterest.ktlint.Main - 872ms / 1 file(s) / 1 error(s)\n</code></pre> <p>Tip</p> <p>Multiple custom rule sets can be loaded at the same time.</p>"},{"location":"api/custom-rule-set/#abstract-syntax-tree-ast","title":"Abstract Syntax Tree (AST)","text":"<p>While writing/debugging Rules it's often helpful to inspect the Abstract Syntax Tree (AST) of the code snippet that is to be linted / formatted. The Jetbrain PsiViewer plugin for IntelliJ IDEA is a convenient tool to inspect code as shown below:</p> <p></p>"},{"location":"api/overview/","title":"Overview","text":"<p>Ktlint has an open API with which you can integrate. </p> <p>The diagram below show the internal module structure of KtLint.</p> <p></p> <p>The <code>Ktlint Rule Engine</code> is by far the most important module. It is responsible for executing the linting and formatting of the source code. The Rule Engine itself does not contain any rules. Rules are provided by API Consumers.</p> <p>The <code>Ktlint CLI</code> is an API Consumer of the <code>Ktlint Rule Engine</code>. Together with the <code>Ktlint Ruleset Standard</code> and the <code>Ktlint Reporter</code> modules the CLI offers a standalone tool which can easily be run from the commandline. Also, the <code>Ktlint CLI</code> can easily be used with custom rulesets and/or reporters.</p> <p>The <code>Ktlint Ruleset Core</code> module contains the logic which is required by each API Consumer of the <code>Ktlint Rule Engine</code>, the <code>Ktlint Ruleset Standard</code> and custom rulesets. </p> <p>The module <code>Ktlint Test</code> provide functionalities like <code>assertThatRule</code> which is used to write unit tests in a fluent AssertJ look-a-like style and can also be used for testing of custom rules.</p> <p>The <code>Ktlint logger</code> module provides functionality for writing log messages. </p>"},{"location":"contributing/","title":"Index","text":""},{"location":"contributing/#contributing-guidelines","title":"Contributing guidelines","text":""},{"location":"contributing/code-of-conduct/","title":"Code of conduct","text":"<p>At Pinterest, we work hard to ensure that our work environment is welcoming and inclusive to as many people as possible. We are committed to creating this environment for everyone involved in our open source projects as well. We welcome all participants regardless of ability, age, ethnicity, identified gender, religion (or lack there of), sexual orientation and socioeconomic status.</p> <p>This code of conduct details our expectations for upholding these values.</p>"},{"location":"contributing/code-of-conduct/#good-behavior","title":"Good behavior","text":"<p>We expect members of our community to exhibit good behavior including (but of course not limited to):</p> <ul> <li>Using intentional and empathetic language.</li> <li>Focusing on resolving instead of escalating conflict.</li> <li>Providing constructive feedback.</li> </ul>"},{"location":"contributing/code-of-conduct/#unacceptable-behavior","title":"Unacceptable behavior","text":"<p>Some examples of unacceptable behavior (again, this is not an exhaustive list):</p> <ul> <li>Harassment, publicly or in private.</li> <li>Trolling.</li> <li>Sexual advances (this isn\u2019t the place for it).</li> <li>Publishing other\u2019s personal information.</li> <li>Any behavior which would be deemed unacceptable in a professional environment.</li> </ul>"},{"location":"contributing/code-of-conduct/#recourse","title":"Recourse","text":"<p>If you are witness to or the target of unacceptable behavior, it should be reported to Pinterest at opensource-policy@pinterest.com. All reporters will be kept confidential and an appropriate response for each incident will be evaluated.</p> <p>If the maintainers do not uphold and enforce this code of conduct in good faith, community leadership will hold them accountable.</p>"},{"location":"contributing/guidelines/","title":"Guidelines","text":"<p>First off, thanks for taking the time to contribute! This guide will answer some common questions about how this project works.</p> <p>While this is a Pinterest open source project, we welcome contributions from everyone. Regular outside contributors can become project maintainers.</p>"},{"location":"contributing/guidelines/#help","title":"Help","text":"<p>If you're having trouble using this project, please start by reading all documentation and searching for solutions in the existing open and closed issues.</p>"},{"location":"contributing/guidelines/#security","title":"Security","text":"<p>If you've found a security issue in one of our open source projects, please report it at Bugcrowd; you may even make some money!</p>"},{"location":"contributing/guidelines/#code-of-conduct","title":"Code of Conduct","text":"<p>Please be sure to read and understand our code of conduct. We work hard to ensure that our projects are welcoming and inclusive to as many people as possible.</p>"},{"location":"contributing/guidelines/#reporting-issues","title":"Reporting Issues","text":"<p>If you have a bug report, please provide as much information as possible so that we can help you out:</p> <ul> <li>Version of the project you're using.</li> <li>Code (or even better a sample project) which reproduce the issue.</li> <li>Steps which reproduce the issue.</li> <li>Stack traces for crashes.</li> <li>Any logs produced.</li> </ul>"},{"location":"contributing/guidelines/#making-changes","title":"Making Changes","text":"<p>Tip</p> <p><code>ktlint</code> only provides rules that enforce the Kotlin coding conventions or Android Kotlin style guide. If your change is more opinionated than please file an issue first so that it can be discussed amongst the community. Rules which are too opinionated might be better published as a custom rule set. </p> <ol> <li>Fork this repository to your own account</li> <li>Make your changes and verify that tests pass</li> <li>Commit your work and push to a new branch on your fork</li> <li>Submit a pull request</li> <li>Participate in the code review process by responding to feedback</li> </ol> <p>Once there is agreement that the code is in good shape, one of the project's maintainers will merge your contribution.</p> <p>To increase the chances that your pull request will be accepted:</p> <ul> <li>Follow the coding style</li> <li>Write tests for your changes</li> <li>Write a good commit message</li> <li>Provide context in the pull request description.</li> </ul> <p>New rules have to implement the <code>Rule.Experimental</code> interface so that the rule will only be run for user who have opted in to use experimental rules. Once the rule is stable, the marker interface <code>Rule.Experimental</code> can be removed.</p>"},{"location":"contributing/guidelines/#updating-dependencies","title":"Updating dependencies","text":"<p>This project has enabled Gradle dependencies verification. On adding/updating any dependency, ensure that you've added dependency provided checksum/signature to <code>gradle/verification-metadata.xml</code> file.</p>"},{"location":"contributing/guidelines/#using-kotlin-development-versions","title":"Using kotlin development versions","text":"<p>Add following flag - <code>-PkotlinDev</code> to enable kotlin development version.</p>"},{"location":"contributing/guidelines/#license","title":"License","text":"<p>By contributing to this project, you agree that your contributions will be licensed under its license.</p>"},{"location":"contributing/overview/","title":"Overview","text":"<p>Important</p> <p>Make sure to read the Contributing guideline and the code of conduct first.</p>"},{"location":"contributing/overview/#development","title":"Development","text":"<p>Development starts with cloning and building the project on your local machine:</p> <pre><code>git clone https://github.com/pinterest/ktlint && cd ktlint\n./gradlew tasks # shows how to build, test, run, etc. project\n</code></pre> <p>Tip</p> <p>To open and run <code>ktlint</code> in Intellij IDEA: </p> <ul> <li>File -> Open.... </li> <li>You'll also need to set the \"Project language level\" to 8 in \"Project Settings\" (File -> Project Structure... -> Project). </li> <li>To run <code>ktlint</code> - right-click on <code>ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt</code> -> Run.</li> </ul>"},{"location":"install/cli/","title":"Command line","text":"<p>Note</p> <p>If you don't plan to use <code>ktlint</code>'s command line interface then you can skip this section.</p>"},{"location":"install/cli/#download-and-verification","title":"Download and verification","text":""},{"location":"install/cli/#download-manually-from-github","title":"Download manually from github","text":"<p>All releases of <code>ktlint</code> can be downloaded from the releases page.</p>"},{"location":"install/cli/#download-using-curl","title":"Download using curl","text":"<p>A particular version of <code>ktlint</code> can be downloaded with next command which also changes the file to an executable in directory <code>/usr/local/bin</code>:</p> Download<pre><code>curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.49.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/\n</code></pre> <p>Curl not installed or behind proxy</p> <p>If you don't have curl installed - replace <code>curl -sL</code> with <code>wget -qO-</code>. If you are behind a proxy see - curl / wget manpage. Usually simple: <pre><code>http_proxy=http://proxy-server:port https_proxy=http://proxy-server:port curl -sL ...\n</code></pre></p>"},{"location":"install/cli/#verification-of-download","title":"Verification of download","text":"<p><code>ktlint.asc</code> contains PGP signature which you can verify with:</p> Verify releases 0.32.0 and above<pre><code>curl -sS https://keybase.io/ktlint/pgp_keys.asc | gpg --import && gpg --verify ktlint.asc\n</code></pre> Verify releases up through 0.31.0<pre><code>curl -sS https://keybase.io/shyiko/pgp_keys.asc | gpg --import && gpg --verify ktlint.asc\n</code></pre>"},{"location":"install/cli/#package-managers","title":"Package managers","text":"<p><code>ktlint</code> can be installed via several OS specific package managers.</p> <p>Install with brew on macOS or Homebrew on Linux <pre><code>brew install ktlint\n</code></pre></p> <p>Install with MacPorts <pre><code>port install ktlint\n</code></pre></p> <p>Install with SDKMAN! on macOS and Linux <pre><code>sdk install ktlint\n</code></pre></p> <p>On Arch Linux install package ktlint AUR.</p>"},{"location":"install/cli/#command-line-usage","title":"Command line usage","text":""},{"location":"install/cli/#rule-sets","title":"Rule set(s)","text":"<p>When no arguments are specified, the style of all Kotlin files (ending with '.kt' or '.kts') inside the current dir (recursively) are validated with the (non-experimental) rules from the standard ruleset. Hidden folders will be skipped.</p> Default validation with standard ruleset<pre><code>ktlint\n</code></pre> <p>To validate with the standard ruleset including the experimental rules run command below: </p> Validation with standard ruleset including the experimental rules<pre><code>ktlint --experimental\n</code></pre> <p>Note</p> <p>Instead of using this command line flag, it is advised to set <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> if you want the project always to be checked with the experimental rules.</p> <p>To validate with a custom ruleset run command below: </p> Validation with standard and a custom ruleset<pre><code>ktlint --ruleset=/path/to/custom-ruleset.jar\n# or\nktlint -R /path/to/custom-ruleset.jar\n</code></pre> <p>Note</p> <p>If the custom rule set contains rules that are marked as experimental, those rule will only be run when <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> is set (or command line parameter <code>--experimental</code> is specified).</p>"},{"location":"install/cli/#format-autocorrect","title":"Format (autocorrect)","text":"<p>Most style violations can be corrected automatically. Errors that can not be corrected, are printed to <code>stderr</code>.</p> Autocorrect style violations<pre><code>ktlint --format\n# or\nktlint -F\n</code></pre>"},{"location":"install/cli/#globs","title":"Globs","text":"<p>Globs can be used to specify more exactly what files and directories are to be validated. <code>ktlint</code> uses the <code>.gitignore</code> pattern style syntax for globs. Globs are processed from left to right. Prepend a glob with <code>!</code> to negate it. Hidden folders will be skipped.</p> Check only certain locations starting from the current directory<pre><code># Check all '.kt' files in 'src/' directory, but ignore files ending with 'Test.kt':\nktlint 'src/**/*.kt' '!src/**/*Test.kt'\n# Check all '.kt' files in 'src/' directory, but ignore 'generated' directory and its subdirectories:\nktlint 'src/**/*.kt' '!src/**/generated/**'\n</code></pre>"},{"location":"install/cli/#violation-reporting","title":"Violation reporting","text":"<p><code>ktlint</code> supports different type of reporters for lint violations. When not specified the <code>plain</code> reporter is used. Optionally the <code>plain</code> reporter can group the violations per file.</p> Style violation grouped by file<pre><code>$ ktlint --reporter=plain?group_by_file\n</code></pre> <p>When using <code>ktlint</code> on an existing project, the number of violations can be huge. To get more insights in which rules are causing the most violations, the <code>plain-summary</code> reporter can be used. Style violations counted per rule<pre><code>$ ktlint --reporter=plain-summary\n</code></pre></p> <p>Other built-in reporters are: <code>json</code>, <code>sarif</code>, <code>checkstyle</code>, and <code>html</code></p> <p>Style violations can be written to an output file which is convenient when multiple reporters are specified. In example below, the plain reporter is used to write to the console while the checkstyle reports is written to a file:</p> Multiple reporters<pre><code>ktlint --reporter=plain --reporter=checkstyle,output=ktlint-report-in-checkstyle-format.xml\n</code></pre> <p>If resolving all existing errors in a project is unwanted, it is possible to create a baseline and in following invocations compare violations against this baseline. Violations that are registered in the baseline, will be ignored silently. Remove the baseline file in case you want to reset it.</p> Check against a baseline file<pre><code>ktlint --baseline=ktlint-baseline.xml # Baseline is created when not existing\n</code></pre>"},{"location":"install/cli/#logging","title":"Logging","text":"<p>Logging information is written to <code>stdout</code>. The amount of logging can be influenced by setting the minimal log level using option <code>--log-level</code> or <code>-l</code> to one of values <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code>, or <code>none</code> to suppress all logging.</p> <p>By default, the <code>info</code> log level is used meaning that all log lines at level <code>info</code>, <code>warn</code> and <code>error</code> are shown while suppressing log lines at level <code>debug</code> or <code>trace</code>.</p>"},{"location":"install/cli/#rule-configuration-editorconfig","title":"Rule configuration (<code>.editorconfig</code>)","text":"<p>Some rules can be tweaked via the <code>editorconfig file</code>.</p> <p>A scaffold of the <code>.editorconfig file</code> can be generated with command below. Note: that the generated file only contains configuration settings which are actively used by the rules which are loaded:</p> Generate .editorconfig<pre><code>ktlint generateEditorConfig\n# or\nktlint --experimental generateEditorConfig\n# or\nktlint --experimental --ruleset=/path/to/custom-ruleset.jar generateEditorConfig\n</code></pre> <p>Normally this file is located in the root of your project directory. In case the file is located in a sub folder of the project, the settings of that file only applies to that subdirectory and its folders (recursively). Ktlint automatically detects and reads all <code>.editorconfig</code> files in your project.</p> <p>Use command below, to specify a default <code>editorconfig</code>. In case a property is not defined in any <code>.editorconfig</code> file on the path to the file, the value from the default file is used. The path may point to any valid file or directory. The path can be relative or absolute. Depending on your OS, the \"~\" at the beginning of a path is replaced by the user home directory.</p> Override '.editorconfig'<pre><code>ktlint --editorconfig=/path/to/.editorconfig\n</code></pre> <p>!!! warning \"Overrides '.editorconfig' in project directory\" in KtLint 0.46 and older When specifying this option using ktlint 0.46 or older, all <code>.editorconfig</code> files in the project directory are being ignored. Starting from KtLint 0.47 the properties in this file are used as fallback.</p>"},{"location":"install/cli/#stdin-stdout","title":"Stdin && stdout","text":"<p>With command below, the input is read from <code>stdin</code> and the violations are printed to <code>stderr</code>. Logging is written to <code>stdout</code>.</p> Lint from stdin<pre><code>ktlint --stdin\n</code></pre> <p>When combined with the <code>--format</code> option, the formatted code is written to <code>stdout</code> and the violations are printed to <code>stderr</code>:</p> Format from stdin and write to stdout<pre><code>ktlint --stdin -F\n</code></pre> <p>Tip</p> <p>Logging output printed to <code>stdout</code> can be suppressed by setting <code>--log-level=none</code> (see logging). Output printed to <code>stderr</code> can be suppressed in different ways. To ignore all error output, add <code>2> /dev/null</code> to the end of the command line. Otherwise, specify a reporter to write the error output to a file.</p>"},{"location":"install/cli/#git-hooks","title":"Git hooks","text":"<p>Predefined git hooks can be installed, to automatically validate lint errors before commit or push.</p> Install git pre-commit hook<pre><code>ktlint installGitPreCommitHook\n</code></pre> Install git pre-push hook<pre><code>ktlint installGitPrePushHook\n</code></pre>"},{"location":"install/cli/#miscellaneous-flags-and-commands","title":"Miscellaneous flags and commands","text":"<p><code>-a</code> or <code>--android</code>: Turn on Android Kotlin Style Guide compatibility. This flag is most likely to be removed in a future version. Use <code>.editorconfig ktlint_code_style</code>. </p> <p><code>--color</code> and <code>--color-name=<colorName></code>: Make output colorful and optionally set the color name to use.</p> <p><code>--disabled_rules=<disabledRules></code>: A comma-separated list of rules to globally disable. To disable the standard ktlint rule-set use <code>--disabled_rules=standard</code>. This flag is most likely to be removed in a future version. Use <code>.editorconfig disabled_rules</code>.</p> <p><code>-h</code> or <code>--help</code>: Prints help information.</p> <p><code>--limit=<limit></code>: Maximum number of errors to show (default: show all)</p> <p><code>--relative</code>: Print files relative to the working directory (e.g. dir/file.kt instead of /home/user/project/dir/file.kt)</p> <p><code>--patterns-from-stdin[=<delimiter>]</code>: Reads additional patterns from <code>stdin</code>, where the patterns are separated by <code><delimiter></code>. If <code>=<delimiter></code> is omitted, newline is used as fallback delimiter. If an empty string is given, the <code>NUL</code> byte is used as delimiter instead. If this option is given, then the default patterns are disabled. Options <code>--stdin</code> and <code>--patterns-from-stdin</code> are mutually exclusive, only one of them can be given at a time.</p> <p><code>-V</code> or <code>--version</code>: Prints version information and exit.</p>"},{"location":"install/cli/#microsoft-windows-users","title":"Microsoft Windows users","text":"<p>Microsoft Windows is not able to run the <code>ktlint</code> command directly. Ktlint can be run in following ways on Microsoft Windows:</p> <ol> <li>Use the <code>ktlint.bat</code> batch file provided as part of the release. Add the batch file to your <code>%PATH%</code> environment variable for easy access</li> <li>Run <code>ktlint</code> using Git Bash</li> <li>Run as <code>java -jar ktlint</code></li> </ol>"},{"location":"install/integrations/","title":"Integrations","text":""},{"location":"install/integrations/#maven-integration","title":"Maven integration","text":"<p>By adding the plugin definition below to the <code><plugins></code> section in the <code>pom.xml</code>:</p> <ul> <li>The <code>ktlint</code> task is bound to the Maven verify lifecycle and will be executed each time the <code>mvn verify</code> is executed. It can also be executed with command <code>mvn antrun:run@ktlint</code>.</li> <li>The <code>ktlint-format</code> task is not bound to any other maven lifecycle. It can be executed with command <code>mvn antrun:run@ktlint-format</code>.</li> </ul> <p>See cli usage for arguments that can be supplied to <code>ktlint</code>.</p> Adding plugin to pom.xml<pre><code>...\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-antrun-plugin</artifactId>\n<version>3.1.0</version>\n<executions>\n<execution>\n<id>ktlint</id>\n<phase>verify</phase>\n<configuration>\n<target name=\"ktlint\">\n<java taskname=\"ktlint\" dir=\"${basedir}\" fork=\"true\" failonerror=\"true\"\nclasspathref=\"maven.plugin.classpath\" classname=\"com.pinterest.ktlint.Main\">\n<!-- Note: the JVM arg below is only required when running ktlint with Java 16+ in format mode.\n <jvmarg value=\"--add-opens=java.base/java.lang=ALL-UNNAMED\"/>\n -->\n<!-- see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information -->\n<arg value=\"src/**/*.kt\"/>\n</java>\n</target>\n</configuration>\n<goals>\n<goal>run</goal>\n</goals>\n</execution>\n<execution>\n<id>ktlint-format</id>\n<configuration>\n<target name=\"ktlint\">\n<java taskname=\"ktlint\" dir=\"${basedir}\" fork=\"true\" failonerror=\"true\"\nclasspathref=\"maven.plugin.classpath\" classname=\"com.pinterest.ktlint.Main\">\n<!-- Note: the JVM args below is only required when running ktlint with Java 16+ in format mode -->\n<jvmarg value=\"--add-opens=java.base/java.lang=ALL-UNNAMED\"/>\n<!-- see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information -->\n<arg value=\"-F\"/>\n<arg value=\"src/**/*.kt\"/>\n</java>\n</target>\n</configuration>\n<goals>\n<goal>run</goal>\n</goals>\n</execution>\n</executions>\n<dependencies>\n<dependency>\n<groupId>com.pinterest</groupId>\n<artifactId>ktlint</artifactId>\n<version>0.49.1</version>\n</dependency>\n<!-- additional 3rd party ruleset(s) can be specified here -->\n</dependencies>\n</plugin>\n...\n</code></pre> <p>Tip</p> <p>If you want ktlint to run before code compilation takes place - change <code><phase>verify</phase></code> to <code><phase>validate</phase></code> (see Maven Build Lifecycle for more).</p> <p>ktlint-maven-plugin</p> <p>You might be interested to use the dedicated gantsign/ktlint-maven-plugin.</p>"},{"location":"install/integrations/#gradle-integration","title":"Gradle integration","text":""},{"location":"install/integrations/#jlleitschuhktlint-gradle","title":"jlleitschuh/ktlint-gradle","text":"<p>The jlleitschuh/ktlint-gradle Gradle plugin automatically creates check and format tasks for project Kotlin sources. It supports different kotlin plugins and Gradle build caching.</p>"},{"location":"install/integrations/#jeremymailenkotlinter-gradle","title":"jeremymailen/kotlinter-gradle","text":"<p>The jeremymailen/kotlinter-gradle Gradle plugin features incremental build support, file reports, and <code>*.kts</code> source support.</p>"},{"location":"install/integrations/#diffplugspotless","title":"diffplug/spotless","text":"<p>The diffplug/spotless Gradle plugin is a general-purpose formatting plugin which amongst many others also supports <code>ktlint</code>.</p>"},{"location":"install/integrations/#autostyleautostyle","title":"autostyle/autostyle","text":"<p>The autostyle/autostyle Gradle plugin is a general-purpose formatting plugin which amongst others also supports <code>ktlint</code>. </p>"},{"location":"install/integrations/#custom-gradle-integration","title":"Custom Gradle integration","text":""},{"location":"install/integrations/#custom-gradle-integration-with-groovy","title":"Custom Gradle integration with Groovy","text":"<p>Warning</p> <p>It is recommended to use one of the Gradle plugins mentioned before.</p> <p>The configuration below, defines following task:</p> <ul> <li>The <code>ktlintCheck</code> is bound to the Gradle check task. It can also be executed with command <code>./gradlew ktlintCheck</code>.</li> <li>The <code>ktlintFormat</code> task is not bound to any other task. It can be executed with command <code>./gradlew ktlintFormat</code>.</li> </ul> build.gradle<pre><code>// kotlin-gradle-plugin must be applied for configuration below to work\n// (see https://kotlinlang.org/docs/reference/using-gradle.html)\nplugins {\nid 'java'\n}\nrepositories {\nmavenCentral()\n}\nconfigurations {\nktlint\n}\ndependencies {\nktlint(\"com.pinterest:ktlint:0.49.1\") {\nattributes {\nattribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))\n}\n}\n// additional 3rd party ruleset(s) can be specified here\n// just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and \n// ktlint will pick them up\n}\ntasks.register(\"ktlintCheck\", JavaExec) {\ngroup = \"verification\"\ndescription = \"Check Kotlin code style.\"\nclasspath = configurations.ktlint\nmainClass = \"com.pinterest.ktlint.Main\"\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\ntasks.named(\"check\") {\ndependsOn tasks.named(\"ktlintCheck\")\n}\ntasks.register(\"ktlintFormat\", JavaExec) {\ngroup = \"formatting\"\ndescription = \"Fix Kotlin code style deviations.\"\nclasspath = configurations.ktlint\nmainClass = \"com.pinterest.ktlint.Main\"\njvmArgs \"--add-opens=java.base/java.lang=ALL-UNNAMED\"\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs \"-F\", \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\n</code></pre> <p>See Making your Gradle tasks incremental by Niklas Baudy on how to make tasks above incremental.</p>"},{"location":"install/integrations/#custom-gradle-integration-with-kotlin-dsl","title":"Custom Gradle integration with Kotlin DSL","text":"<p>Warning</p> <p>It is recommended to use one of the Gradle plugins mentioned before.</p> <p>The configuration below, defines following task:</p> <ul> <li>The <code>ktlintCheck</code> is bound to the Gradle check task. It can also be executed with command <code>./gradlew ktlintCheck</code>.</li> <li>The <code>ktlintFormat</code> task is not bound to any other task. It can be executed with command <code>./gradlew ktlintFormat</code>.</li> </ul> build.gradle.kts<pre><code>val ktlint by configurations.creating\ndependencies {\nktlint(\"com.pinterest:ktlint:0.49.1\") {\nattributes {\nattribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))\n}\n}\n// ktlint(project(\":custom-ktlint-ruleset\")) // in case of custom ruleset\n}\nval ktlintCheck by tasks.registering(JavaExec::class) {\ngroup = LifecycleBasePlugin.VERIFICATION_GROUP\ndescription = \"Check Kotlin code style\"\nclasspath = ktlint\nmainClass.set(\"com.pinterest.ktlint.Main\")\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs(\n\"**/src/**/*.kt\",\n\"**.kts\",\n\"!**/build/**\",\n)\n}\ntasks.check {\ndependsOn(ktlintCheck)\n}\ntasks.register<JavaExec>(\"ktlintFormat\") {\ngroup = LifecycleBasePlugin.VERIFICATION_GROUP\ndescription = \"Check Kotlin code style and format\"\nclasspath = ktlint\nmainClass.set(\"com.pinterest.ktlint.Main\")\njvmArgs(\"--add-opens=java.base/java.lang=ALL-UNNAMED\")\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs(\n\"-F\",\n\"**/src/**/*.kt\",\n\"**.kts\",\n\"!**/build/**\",\n)\n}\n</code></pre>"},{"location":"install/integrations/#gnu-emacs-integration","title":"GNU Emacs integration","text":"<p>See whirm/flycheck-kotlin.</p>"},{"location":"install/integrations/#vim-integration","title":"Vim integration","text":"<p>See w0rp/ale.</p>"},{"location":"install/integrations/#mega-linter-integration","title":"Mega-Linter integration","text":"<p>The Mega-Linter integrates 70+ linters in a single tool for CI, including ktlint activated out of the box</p>"},{"location":"install/integrations/#other-integration","title":"Other integration","text":"<p>Do you know any other integration with <code>ktlint</code> then please create a PR to add this integration to our documentation.</p>"},{"location":"install/overview/","title":"Overview","text":"<p>See command line interface or integrations for details on installing the latest release of <code>ktlint</code>.</p>"},{"location":"install/overview/#online-demo","title":"Online demo","text":"<p>See <code>ktlint</code> online if you want to try-out 'ktlint'. This online version compares rule sets provided by <code>ktlint</code> and <code>diktat</code> (a layer on top of <code>ktlint</code>). To contribute to or get more info about <code>ktlint</code> online, please visit the GitHub repository.</p>"},{"location":"install/snapshot-build/","title":"Snapshot build","text":""},{"location":"install/snapshot-build/#access-to-the-latest-master-snapshot","title":"Access to the latest <code>master</code> snapshot","text":"<p>Whenever a commit is added to the <code>master</code> branch a snapshot build is automatically uploaded to Sonatype's snapshots repository. If you are eager to try upcoming changes (that might or might not be included in the next stable release) you can do so by changing version of ktlint to <code><latest-version>-SNAPSHOT</code> + adding a repo:</p>"},{"location":"install/snapshot-build/#maven","title":"Maven","text":"<pre><code>...\n<repository>\n<id>sonatype-snapshots</id>\n<url>https://oss.sonatype.org/content/repositories/snapshots</url>\n<snapshots>\n<enabled>true</enabled>\n</snapshots>\n<releases>\n<enabled>false</enabled>\n</releases>\n</repository>\n...\n</code></pre>"},{"location":"install/snapshot-build/#gradle","title":"Gradle","text":"<pre><code>repositories {\nmaven {\nurl \"https://oss.sonatype.org/content/repositories/snapshots\"\n}\n}\n</code></pre>"},{"location":"install/snapshot-build/#kotlin-development-version-snapshot","title":"Kotlin development version snapshot","text":"<p>Additionally, project publishes snapshots build against latest kotlin development version. To use them, change version of ktlint to <code><latest-version>-kotlin-dev-SNAPSHOT</code>.</p>"},{"location":"rules/","title":"Index","text":"<p>= Rules</p>"},{"location":"rules/code-styles/","title":"Code styles","text":"<p>In ktlint <code>0.49</code> the new code style <code>ktlint_official</code> is introduced. This code style is work in progress but will become the default code style in the <code>1.0</code> release. Please try out the new code style and provide your feedback via the issue tracker.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre> <p>This <code>ktlint_official</code> code style combines the best elements from the Kotlin Coding conventions and Android's Kotlin styleguide. This code style also provides additional formatting on topics which are not (explicitly) mentioned in those conventions and style guide.</p> <p>Note</p> <p>Be aware that this code style in some cases formats code in a way which is not accepted by the default code formatters in IntelliJ IDEA and Android Studio. The formatters of those editors produce nicely formatted code in the vast majority of cases. But in a number of edge cases, the formatting contains bugs which are waiting to be fixed for several years. The new code style formats code in a way which is compatible with the default formatting of the editors whenever possible. When using this codestyle, it is best to disable (e.g. not use) code formatting in the editor.</p> <p>The existing code styles have been renamed to make more clear what the basis of the code style is.</p> <ul> <li> <p>The <code>official</code> code style has been renamed to <code>intellij_idea</code>. Code formatted with this code style aims to be compatible with default formatter of IntelliJ IDEA. This code style is based on Kotlin Coding conventions. If <code>.editorconfig</code> property <code>ktlint_code_style</code> has been set to <code>official</code> then do not forget to change the value of that property to <code>intellij_idea</code>. When not set, this is still the default code style of ktlint <code>0.49</code>. Be aware that the default code style will be changed to <code>ktlint_official</code> in the <code>1.0</code> release.</p> </li> <li> <p>Code style <code>android</code> has been renamed to <code>android_studio</code>. Code formatted with this code style aims to be compatible with default formatter of Android Studio. This code style is based on Android's Kotlin styleguide. If <code>.editorconfig</code> property <code>ktlint_code_style</code> has been set to <code>android</code> then do not forget to change the value of that property to <code>android_studio</code>.</p> </li> </ul>"},{"location":"rules/configuration-intellij-idea/","title":"IntelliJ IDEA configuration","text":"<p>Warning</p> <p><code>ktlint</code> strives to prevent code formatting conflicts with IntelliJ IDEA / Android Studio. We recommend using either IDE formatting or <code>ktlint</code> formatting. However, if you persist on using both, then please ensure that the formatting settings are aligned as described below. This reduces the chance that code which is formatted by ktlint conflicts with formatting by the IntelliJ IDEA built-in formatter.</p> <p>Note</p> <p>IntelliJ IDEA supports the kotlin coding conventions. As of version 0.47.x of ktlint, the support to overwrite some configuration files of IntelliJ IDEA has been dropped as it no longer fits the scope of the project. </p> <p>Steps:</p> <ol> <li>Go to your project directory</li> <li>Create or replace file <code>.idea/codeStyles/codeStyleConfig.xml</code> with content below: <pre><code><component name=\"ProjectCodeStyleConfiguration\">\n<state>\n<option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n</state>\n</component>\n</code></pre></li> <li>Create or replace file <code>.idea/codeStyles/Project.xml</code> with content below: <pre><code><component name=\"ProjectCodeStyleConfiguration\">\n<code_scheme name=\"Project\" version=\"173\">\n<JetCodeStyleSettings>\n<option name=\"PACKAGES_TO_USE_STAR_IMPORTS\">\n<value />\n</option>\n<option name=\"NAME_COUNT_TO_USE_STAR_IMPORT\" value=\"2147483647\" />\n<option name=\"NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS\" value=\"2147483647\" />\n<option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n</JetCodeStyleSettings>\n<codeStyleSettings language=\"kotlin\">\n<option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n</codeStyleSettings>\n</code_scheme>\n</component>\n</code></pre></li> </ol>"},{"location":"rules/configuration-ktlint/","title":"KtLint configuration","text":"<p>Ktlint uses a limited set of <code>.editorconfig</code> properties for additional configuration. A sensible default value is provided for each property when not explicitly defined. Properties can be overridden, provided they are specified under <code>[*.{kt,kts}]</code>. Ktlint uses some properties defined by .editorconfig, IntelliJ IDEA and custom properties.</p> <p>Danger</p> <p>Unfortunately IntelliJ IDEA has an autoformat issue regarding <code>.editorconfig</code>. Due to this error an additional space is added between glob statements, resulting in <code>[*{kt, kts}]</code> instead of <code>[*{kt,kts}]</code>. The <code>.editorconfig</code> library used by <code>ktlint</code> ignores sections after encountering a space in the list. As a result, the rule is not applied on all files as documented in the original ktlint issue.</p>"},{"location":"rules/configuration-ktlint/#code-style","title":"Code style","text":"<p>By default, the <code>intellij_idea</code> Kotlin code style is applied. Alternatively, the code style can be set to <code>ktlint_official</code> or <code>android</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre> <p>Note</p> <p>The default code style will be changed to <code>ktlint_official</code> in the <code>1.0</code> version of ktlint.</p>"},{"location":"rules/configuration-ktlint/#disabled-rules","title":"Disabled rules","text":"<p>Note</p> <p>Support of properties <code>disabled_rules</code> and <code>ktlint_disabled_rules</code> has been removed in KtLint <code>0.49</code>.</p> <p>Rule sets and individual rules can be disabled / enabled with a separate property per rule (set).</p> <p>All rules in a rule set can be enabled or disabled with a rule set property. The name of the rule set property consists of the <code>ktlint_</code> prefix followed by the rule set id. Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable all `experimental` rules from all rule sets provided by KtLint or other rule providers\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Rules that are marked as experimental will not be run, unless explicitly enabled: <pre><code>ktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\n</code></pre></p> <p>An individual rule can be enabled or disabled with a rule property. The name of the rule property consists of the <code>ktlint_</code> prefix followed by the rule set id followed by a <code>_</code> and the rule id. Examples: <pre><code>ktlint_standard_final-newline = disabled # Disables the `final-newline` rule provided by KtLint\nktlint_standard_some-experimental-rule = enabled # Enables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed.</p>"},{"location":"rules/configuration-ktlint/#final-newline","title":"Final newline","text":"<p>By default, a final newline is required at the end of the file.</p> <pre><code>[*.{kt,kts}]\ninsert_final_newline = true\n</code></pre> <p>This setting only takes effect when rule <code>final-newline</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#force-multiline-function-signature-based-on-number-of-parameters","title":"Force multiline function signature based on number of parameters","text":"<p>Setting <code>ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> forces a multiline function signature in case the function contains the specified minimum number of parameters even in case the function signature would fit on a single line. Use value <code>unset</code> (default) to disable this setting.</p> <p>Note</p> <p>By default, the <code>ktlint_official</code> code style wraps parameters of functions having at least 2 parameters. For other code styles, this setting is disabled by default. </p> <pre><code>[*.{kt,kts}]\nktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than=unset\n</code></pre> <p>This setting only takes effect when rule <code>function-signature</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#wrapping-the-expression-body-of-a-function","title":"Wrapping the expression body of a function","text":"<p>Setting <code>ktlint_function_signature_body_expression_wrapping</code> determines if and when the expression body of a function is wrapped to a new line. This setting can be set to value <code>default</code>, <code>multiline</code> or <code>always</code>. </p> <p>When set to <code>default</code>, the first line of a body expression is appended to the function signature as long as the max line length is not exceeded.</p> ktlint_function_signature_body_expression_wrapping=default (or when not set)<pre><code>// Given that the function signature has to be written as a single line function signature\nfun someFunction(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n// Given that the function signature has to be written as a multiline function signature\nfun someFunction(\na: Any,\nb: Any\n): String = \"some-result\"\n.uppercase()\n</code></pre> <p>When set to <code>multiline</code>, the body expression starts on a separate line in case it is a multiline expression. A single line body expression is wrapped only when it does not fit on the same line as the function signature.</p> ktlint_function_signature_body_expression_wrapping=multiline<pre><code>// Given a single line body expression and\n// a the function signature that has to be written as a single line function signature and\n// it does not exceed the max line length\nfun someFunction(a: Any, b: Any): String = \"some-result\".uppercase()\n// Given a single line body expression and\n// a the function signature that has to be written as a multiline function signature and\n// it does not exceed the max line length\nfun someFunction(\na: Any,\nb: Any\n): String = \"some-result\".uppercase()\n// Given a single line body expression then always wrap it to a separate line\nfun someFunction(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\nfun someFunction(\na: Any,\nb: Any\n): String =\n\"some-result\"\n.uppercase()\n</code></pre> <p>When set to <code>always</code> the body expression is always wrapped to a separate line.</p> ktlint_function_signature_body_expression_wrapping=always<pre><code>fun someFunction(a: Any, b: Any): String =\n\"some-result\".uppercase()\nfun functionWithAVeryLongName(\na: Any,\nb: Any\n): String =\n\"some-result\"\n.uppercase()\n</code></pre> <p>This setting only takes effect when rule <code>function-signature</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#ignore-identifiers-enclosed-in-backticks","title":"Ignore identifiers enclosed in backticks","text":"<p>By default, the identifiers enclosed in backticks are not ignored.</p> <p>According to Kotlin coding conventions it is acceptable to write method names in natural language. When using natural language, the description tends to be longer. This property allows lines containing an identifier between backticks to be longer than the maximum line length. (Since 0.41.0)</p> <pre><code>@Test\nfun `Given a test with a very loooooooooooooooooooooong test description`() {\n}\n</code></pre> <pre><code>[*.{kt,kts}]\nktlint_ignore_back_ticked_identifier = false\n</code></pre> <p>This setting only takes effect when rule <code>max-line-length</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#import-layouts","title":"Import layouts","text":"<p>By default, the same imports are allowed as in IntelliJ IDEA. The import path can be a full path, e.g. \"java.util.List.\" as well as wildcard path, e.g. \"kotlin.*\".</p> <p>The layout can be composed by the following symbols:</p> <ul> <li><code>*</code> - wildcard. There must be at least one entry of a single wildcard to match all other imports. Matches anything after a specified symbol/import as well.</li> <li><code>|</code> - blank line. Supports only single blank lines between imports. No blank line is allowed in the beginning or end of the layout.</li> <li><code>^</code> - alias import, e.g. \"^android.*\" will match all android alias imports, \"^\" will match all other alias imports.</li> </ul> <p>Examples: <pre><code>ij_kotlin_imports_layout=* # alphabetical with capital letters before lower case letters (e.g. Z before a), no blank lines\nij_kotlin_imports_layout=*,java.**,javax.**,kotlin.**,^ # default IntelliJ IDEA style, same as alphabetical, but with \"java\", \"javax\", \"kotlin\" and alias imports in the end of the imports list\nij_kotlin_imports_layout=android.**,|,^org.junit.**,kotlin.io.Closeable.*,|,*,^ # custom imports layout\n</code></pre></p> <p>Wildcard imports can be allowed for specific import paths (Comma-separated list, use \"**\" as wildcard for package and all subpackages). This setting overrides the no-wildcard-imports rule. This setting is best be used for allowing wildcard imports from libraries like Ktor where extension functions are used in a way that creates a lot of imports.</p> <pre><code>[*.{kt,kts}]\nij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**\n</code></pre> <p>This setting only takes effect when rule <code>no-wildcard-imports</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#indent-size-style","title":"Indent size & style","text":"<p>By default, indenting is done with 4 spaces per indent level. Code style <code>android_studio</code> uses a tab per indent level.</p> <pre><code>[*.{kt,kts}]\nindent_size = 4 # possible values: number (e.g. 2), \"unset\" (makes ktlint ignore indentation completely) \nindent_style = space # or \"tab\"\n</code></pre> <p>Those settings are used by multiple rules of which rule <code>indent</code> is the most important.</p>"},{"location":"rules/configuration-ktlint/#max-line-length","title":"Max line length","text":"<p>By default, the maximum line length is not set. The <code>android</code> code style sets the max line length to 100 (per Android Kotlin Style Guide).</p> <pre><code>[*.{kt,kts}]\nmax_line_length = off # Use \"off\" to ignore max line length or a positive number to set max line length\n</code></pre> <p>This setting is used by multiple rules of which rule <code>max-line-length</code> is the most important.</p>"},{"location":"rules/configuration-ktlint/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma_on_call_site</code> to enforce the usage of the trailing comma at call site when enabled. IntelliJ IDEA uses this property to allow the use of trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on call site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>Although the Kotlin coding conventions leaves it to the developer's discretion to use trailing commas on the call site, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Example: <pre><code>[*.{kt,kts}]\nij_kotlin_allow_trailing_comma_on_call_site = false\n</code></pre></p> <p>This setting only takes effect when rule <code>trailing-comma-on-call-site</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma</code> to enforce the usage of the trailing comma at declaration site when enabled. IntelliJ IDEA uses this property to allow the use of trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on declaration site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>The Kotlin coding conventions encourages the usage of trailing commas on the declaration site, but leaves it to the developer's discretion to use trailing commas on the call site. But next to this, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Example: <pre><code>[*.{kt,kts}]\nij_kotlin_allow_trailing_comma = false # Only used for declaration site \n</code></pre></p> <p>This setting only takes effect when rule <code>trailing-comma-on-declaration-site</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#overriding-editorconfig-properties-for-specific-directories","title":"Overriding Editorconfig properties for specific directories","text":"<p>You can override properties for specific directories inside your project: <pre><code>[*.{kt,kts}]\nktlint_standard_import-ordering = disabled\n[api/*.{kt,kts}]\nktlint_standard_indent = disabled\n</code></pre></p> <p>Note that the <code>import-ordering</code> rule is disabled for all packages including the <code>api</code> sub package. Next to this the <code>indent</code> rule is disabled for the <code>api</code> package and its sub packages.</p>"},{"location":"rules/dependencies/","title":"Dependencies","text":"<p>Preferably rules run independent of each other. In some case this is however not feasible. The diagram below shows the dependencies between the rules provided by KtLint.</p> <p></p>"},{"location":"rules/experimental/","title":"Experimental rules","text":"<p>Important</p> <p>Up and until Ktlint version <code>0.47</code>, experimental were located in a separate <code>experimental</code> rule set. As of Ktlint version <code>0.48</code>, each rule set can optionally define experimental rules.</p> <p>All experimental rules described below are part of the <code>standard</code> rule set of Ktlint. To enable all experimental rules (from all rule sets), set <code>editorconfig</code> property below: <pre><code>[*.{kt,kts}]\nktlint_experimental=enabled\n</code></pre> Also see enable/disable specific rules.</p>"},{"location":"rules/experimental/#binary-expression-wrapping","title":"Binary expression wrapping","text":"<p>Wraps binary expression at the operator reference whenever the binary expression does not fit on the line. In case the binary expression is nested, the expression is evaluated from outside to inside. If the left and right hand sides of the binary expression, after wrapping, fit on a single line then the inner binary expressions will not be wrapped. If one or both inner binary expression still do not fit on a single after wrapping of the outer binary expression, then each of those inner binary expressions will be wrapped.</p> Ktlint Disallowed <pre><code>fun foo() {\n// Assume that the last allowed character is\n// at the X character on the right X\nif ((leftHandSideExpression && rightHandSideExpression) ||\n(leftHandSideLongExpression &&\nrightHandSideLongExpression)) {\n// do something\n}\n}\n</code></pre> <pre><code>fun foo() {\n// Assume that the last allowed character is\n// at the X character on the right X\nif ((leftHandSideExpression && rightHandSideExpression) || (leftHandSideLongExpression && rightHandSideLongExpression)) {\n// do something\n}\n}\n</code></pre> <p>Rule id: <code>binary-expression-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#blank-line-before-declarations","title":"Blank line before declarations","text":"<p>Requires a blank line before any class or function declaration. No blank line is required between the class signature and the first declaration in the class. In a similar way, a blank line is required before any list of top level or class properties. No blank line is required before local properties or between consecutive properties.</p> Ktlint Disallowed <pre><code>const val foo1 = \"foo1\"\nclass FooBar {\nval foo2 = \"foo2\"\nval foo3 = \"foo3\"\nfun bar1() {\nval foo4 = \"foo4\"\nval foo5 = \"foo5\"\n}\nfun bar2() = \"bar\"\nval foo6 = \"foo3\"\nval foo7 = \"foo4\"\nenum class Foo {}\n}\n</code></pre> <pre><code>const val foo1 = \"foo1\"\nclass FooBar {\nval foo2 = \"foo2\"\nval foo3 = \"foo3\"\nfun bar1() {\nval foo4 = \"foo4\"\nval foo5 = \"foo5\"\n}\nfun bar2() = \"bar\"\nval foo6 = \"foo3\"\nval foo7 = \"foo4\"\nenum class Foo {}\n}\n</code></pre> <p>Rule id: <code>blank-line-before-declaration</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#discouraged-comment-location","title":"Discouraged comment location","text":"<p>Detect discouraged comment locations (no autocorrect).</p> <p>Note</p> <p>Kotlin allows comments to be placed almost everywhere. As this can lead to code which is hard to read, most of them will never be used in practice. Ideally each rule takes comments at all possible locations into account. Sometimes this is really hard and not worth the effort. By explicitly forbidding such comment locations, the development of those rules becomes a bit easier. </p> Disallowed <pre><code>fun <T> /* some comment */ foo(t: T) = \"some-result\"\nfun foo() {\nif (true)\n// some comment\nbar()\n}\n</code></pre> <p>Rule id: <code>discouraged-comment-location</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#disallow-empty-lines-at-start-of-class-body","title":"Disallow empty lines at start of class body","text":"<p>Detect blank lines at start of a class body.</p> Ktlint Disallowed <pre><code>class Foo {\nval foo = \"foo\"\n}\n</code></pre> <pre><code>class Foo {\nval foo = \"foo\"\n}\n</code></pre> <p>Rule id: <code>no-empty-first-line-in-class-body</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#disallow-consecutive-comments","title":"Disallow consecutive comments","text":"<p>Consecutive comments are disallowed in following cases: - Any mix of a consecutive kdoc, a block comment or an EOL comment unless separated by a blank line in between - Consecutive KDocs (even when separated by a blank line) - Consecutive block comments (even when separated by a blank line)</p> <p>Consecutive EOL comments are always allowed as they are often used instead of a block comment.</p> Ktlint Disallowed <pre><code>// An EOL comment\n// may be followed by another EOL comment\nval foo = \"foo\"\n// Different comment types (including KDoc) may be consecutive ..\n/*\n * ... but do need to be separated by a blank line ...\n */\n/**\n * ... but a KDoc can not be followed by an EOL or a block comment or another KDoc\n */\nfun bar() = \"bar\"\n</code></pre> <pre><code>/*\n * Block comments can not be consecutive ...\n */\n/*\n * ... even not when separated by a new line.\n */\nval bar = \"bar\" /**\n * A KDoc can not be followed by a block comment or an EOL comment or another KDOC\n */\n// ... even not when separated by a new line.\n</code></pre> <p>Rule id: <code>no-consecutive-comments</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#function-signature","title":"Function signature","text":"<p>Rewrites the function signature to a single line when possible (e.g. when not exceeding the <code>max_line_length</code> property) or a multiline signature otherwise. In case of function with a body expression, the body expression is placed on the same line as the function signature when not exceeding the <code>max_line_length</code> property. Optionally the function signature can be forced to be written as a multiline signature in case the function has more than a specified number of parameters (<code>.editorconfig</code> property <code>ktlint_function_signature_wrapping_rule_always_with_minimum_parameters</code>)</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nfun foooooooo(\na: Any,\nb: Any,\nc: Any\n): String {\n// body\n}\n// Assume that the last allowed character is\n// at the X character on the right X\nfun bar(a: Any, b: Any, c: Any): String {\n// body\n}\n// When wrapping of body is set to 'default'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n// When wrapping of body is set to 'multiline'\n// or 'always'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nfun foooooooo(a: Any, b: Any, c: Any): String {\n// body\n}\n// Assume that the last allowed character is\n// at the X character on the right X\nfun bar(\na: Any,\nb: Any,\nc: Any\n): String {\n// body\n}\n// When wrapping of body is set to 'default'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\n// When wrapping of body is set to 'multiline'\n// or 'always'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n</code></pre> <p>Rule id: <code>function-signature</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#if-else-bracing","title":"If else bracing","text":"<p>If at least one branch of an if-else statement or an if-else-if statement is wrapped between curly braces then all branches should be wrapped between braces.</p> Ktlint Disallowed <pre><code>fun foo(value: int) {\nif (value > 0) {\ndoSomething()\n} else if (value < 0) {\ndoSomethingElse()\n} else {\ndoSomethingElse2()\n}\n}\n</code></pre> <pre><code>fun foo(value: int) {\nif (value > 0)\ndoSomething()\nelse if (value < 0) {\ndoSomethingElse()\n} else\ndoSomethingElse2()\n}\n</code></pre> <p>Rule id: <code>if-else-bracing</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#if-else-wrapping","title":"If else wrapping","text":"<p>A single line if-statement should be kept simple. It may contain no more than one else-branch. The branches may not be wrapped in a block.</p> Ktlint Disallowed <pre><code>fun foobar() {\nif (true) foo()\nif (true) foo() else bar()\n}\n</code></pre> <pre><code>fun foobar() {\nif (true) if (false) foo() else bar()\nif (true) bar() else if (false) foo() else bar()\nif (true) { foo() } else bar()\nif (true) bar() else { if (false) foo() else bar() }\n}\n</code></pre> <p>Rule id: <code>if-else-wrapping</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#naming","title":"Naming","text":""},{"location":"rules/experimental/#function-naming","title":"Function naming","text":"<p>Enforce naming of function. </p> Ktlint Ktlint Test Disallowed <pre><code>fun foo() {}\nfun fooBar() {}\n</code></pre> <pre><code>@Test\nfun `Some name`() {}\n@Test\nfun do_something() {}\n</code></pre> <pre><code>fun Foo() {}\nfun Foo_Bar() {}\nfun `Some name`() {}\nfun do_something() {}\n</code></pre> <p>Note</p> <p>Functions in files which import a class from package <code>org.junit</code>, <code>org.testng</code> or <code>kotlin.test</code> are considered to be test functions. Functions in such classes are allowed to have underscores in the name. Or function names can be specified between backticks and do not need to adhere to the normal naming convention.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>FunctionName</code>.</p> <p>Rule id: <code>function-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#package-naming","title":"Package naming","text":"<p>Enforce naming of package.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>PackageName</code>.</p> Ktlint Disallowed <pre><code>package foo\npackage foo.foo\npackage foo_bar\npackage foo.foo_bar\n</code></pre> <pre><code>package Foo\npackage foo.Foo\npackage `foo bar`\npackage foo.`foo bar`\n</code></pre> <p>Rule id: <code>package-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#property-naming","title":"Property naming","text":"<p>Enforce naming of property.</p> Ktlint Disallowed <pre><code>val FOO_1 = Foo()\nval FOO_BAR_1 = \"FOO-BAR\"\nvar foo1: Foo = Foo()\nclass Bar {\nconst val FOO_2 = \"foo\"\nconst val FOO_BAR_2 = \"FOO-BAR\"\nval foo2 = \"foo\"\nval fooBar2 = \"foo-bar\"\n// Backing property\nprivate val _elementList = mutableListOf<Element>()\nval elementList: List<Element>\nget() = _elementList\n}\n</code></pre> <pre><code>val Foo1 = Foo()\nval FooBar1 = \"FOO-BAR\"\nvar FOO_1: Foo = Foo()\nclass Bar {\nconst val foo2 = \"foo\"\nconst val fooBar2 = \"FOO-BAR\"\nval FOO2 = \"foo\"\nval FOO_BAR_2 = \"foo-bar\"\n// Incomplete backing property as public property 'elementList1' is missing\nprivate val _elementList1 = mutableListOf<Element>()\n// Invalid backing property as '_elementList2' is not a private property\nval _elementList2 = mutableListOf<Element>()\nval elementList2: List<Element>\nget() = _elementList2\n}\n</code></pre> <p>Note</p> <p>Top level <code>val</code> properties and <code>const val</code> properties have to be written in screaming snake notation. Local <code>val</code> and <code>const val</code> are written in lower camel case.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>PropertyName</code>.</p> <p>Rule id: <code>property-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#no-empty-file","title":"No empty file","text":"<p>A kotlin (script) file should not be empty. It needs to contain at least one declaration. Files only contain a package and/or import statements are as of that disallowed.</p> <p>Rule id: <code>no-empty-file</code></p>"},{"location":"rules/experimental/#no-single-line-block-comments","title":"No single line block comments","text":"<p>A single line block comment should be replaced with an EOL comment when possible.</p> Ktlint Disallowed <pre><code>/*\n * Some comment\n */\nval foo = \"foo\" // Some comment\nval foo = { /* no-op */ }\n/* ktlint-disable foo-rule-id bar-rule-id */\nval foo = \"foo\"\n/* ktlint-enable foo-rule-id bar-rule-id */\n</code></pre> <pre><code>/* Some comment */\nval foo = \"foo\" /* Some comment */\n</code></pre> <p>Rule id: <code>no-single-line-block-comment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#spacing","title":"Spacing","text":""},{"location":"rules/experimental/#no-blank-lines-in-list","title":"No blank lines in list","text":"<p>Disallow blank lines to be used in lists before the first element, between elements, and after the last element.</p> <p>Super type</p> Ktlint Disallowed <pre><code>class FooBar:\nFoo,\nBar {\n// body\n}\n</code></pre> <pre><code>class FooBar:\nFoo,\nBar\n{\n// body\n}\n</code></pre> <p>Type argument list</p> Ktlint Disallowed <pre><code>val foobar: FooBar<\nFoo,\nBar,\n> = FooBar(Foo(), Bar())\n</code></pre> <pre><code>val foobar: FooBar<\nFoo,\nBar,\n> = FooBar(Foo(), Bar())\n</code></pre> <p>Type constraint list</p> Ktlint Disallowed <pre><code>class BiAdapter<C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2>(\nval adapter1: A1,\nval adapter2: A2\n) : RecyclerView.Adapter<C>()\nwhere A1 : RecyclerView.Adapter<V1>, A1 : ComposableAdapter.ViewTypeProvider,\nA2 : RecyclerView.Adapter<V2>, A2 : ComposableAdapter.ViewTypeProvider {\n// body\n}\n</code></pre> <pre><code>class BiAdapter<C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2>(\nval adapter1: A1,\nval adapter2: A2\n) : RecyclerView.Adapter<C>()\nwhere\nA1 : RecyclerView.Adapter<V1>, A1 : ComposableAdapter.ViewTypeProvider,\nA2 : RecyclerView.Adapter<V2>, A2 : ComposableAdapter.ViewTypeProvider\n{\n// body\n}\n</code></pre> <p>Type parameter list</p> Ktlint Disallowed <pre><code>fun <\nFoo,\nBar,\n> foobar()\n</code></pre> <pre><code>fun <\nFoo,\nBar,\n> foobar()\n</code></pre> <p>Value argument list</p> Ktlint Disallowed <pre><code>val foobar = foobar(\n\"foo\",\n\"bar\",\n)\n</code></pre> <pre><code>val foobar = foobar(\n\"foo\",\n\"bar\",\n)\n</code></pre> <p>Value parameter list</p> Ktlint Disallowed <pre><code>fun foobar(\nfoo: String,\nbar: String,\n)\n</code></pre> <pre><code>fun foobar(\nfoo: String,\nbar: String,\n)\n</code></pre> <p>Rule id: <code>no-blank-line-in-list</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#parameter-list-spacing","title":"Parameter list spacing","text":"<p>Consistent spacing inside the parameter list.</p> Ktlint Disallowed <pre><code>fun foo(a: Any ) = \"some-result\"\nfun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo( a : Any ) = \"some-result\"\nfun foo(\n) = \"some-result\"\n</code></pre> <p>Rule id: <code>parameter-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#string-template-indent","title":"String template indent","text":"<p>Enforce consistent string template indentation for multiline string templates which are post-fixed with <code>.trimIndent()</code>. The opening and closing <code>\"\"\"</code> are placed on separate lines and the indentation of the content of the template is aligned with the <code>\"\"\"</code>.</p> Ktlint Disallowed <pre><code>val foo =\n\"\"\"\n line1\n line2\n \"\"\".trimIndent()\nfun foo() {\n// The opening \"\"\" can not be wrapped to next line as that would result in a compilation error\nreturn \"\"\"\n line1\n line2\n \"\"\".trimIndent()\n}\n</code></pre> <pre><code>val foo = \"\"\"\n line1\n line2\n \"\"\".trimIndent()\nfun foo() {\nreturn \"\"\"\n line1\n line2\n \"\"\".trimIndent()\n}\n</code></pre> <p>Rule id: <code>string-template-indent</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#try-catch-finally-spacing","title":"Try catch finally spacing","text":"<p>Enforce consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p> Ktlint Disallowed <pre><code>fun foo() =\ntry {\n// do something\n} catch (exception: Exception) {\n// handle exception\n} finally {\n// clean up\n}\n</code></pre> <pre><code>fun foo1() = try { /* ... */ } catch (exception: Exception) { /* ... */ } finally { /* ... */ }\nfun foo2() = try {\n// do something\n}\ncatch (exception: Exception) {\n// handle exception\n}\nfinally {\n// clean up\n}\n</code></pre> <p>Rule id: <code>try-catch-finally-spacing</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#type-argument-list-spacing","title":"Type argument list spacing","text":"<p>Spacing before and after the angle brackets of a type argument list.</p> Ktlint Disallowed <pre><code>val res = ArrayList<LintError>()\nclass B<T> : A<T>() {\noverride fun x() = super<A>.x()\n}\n</code></pre> <pre><code>val res = ArrayList < LintError > ()\nclass B<T> : A< T >() {\noverride fun x() = super< A >.x()\n}\n</code></pre> <p>Rule id: <code>type-argument-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#type-parameter-list-spacing","title":"Type parameter list spacing","text":"<p>Spacing after a type parameter list in function and class declarations.</p> Ktlint Disallowed <pre><code>fun <T> foo1(t: T) = \"some-result\"\nfun <T> foo2(t: T) = \"some-result\"\nfun <T> foo3(t: T) = \"some-result\"\n</code></pre> <pre><code>fun<T> foo1(t: T) = \"some-result\"\nfun <T>foo2(t: T) = \"some-result\"\nfun<T>foo3(t: T) = \"some-result\"\n</code></pre> <p>Rule id: <code>type-parameter-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#wrapping","title":"Wrapping","text":""},{"location":"rules/experimental/#content-receiver-wrapping","title":"Content receiver wrapping","text":"<p>Wraps the content receiver list to a separate line regardless of maximum line length. If the maximum line length is configured and is exceeded, wrap the context receivers and if needed its projection types to separate lines.</p> Ktlint Disallowed <pre><code>// ALways wrap regardless of whether max line length is set\ncontext(Foo)\nfun fooBar()\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\nFooooooooooooooooooo1,\nFoooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line.\n// Also, wrap each of it projection types in case a context\n// receiver does not fit on a single line after it has been\n// wrapped.\ncontext(\nFoooooooooooooooo<\nFoo,\nBar\n>\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(Foo) fun fooBar()\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(Fooooooooooooooooooo1, Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line. Also, it should wrap each of it projection\n// type in case a context receiver does not fit on a single line \n// after it has been wrapped.\ncontext(Foooooooooooooooo<Foo, Bar>)\nfun fooBar()\n</code></pre> <p>Rule id: <code>context-receiver-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#enum-wrapping","title":"Enum wrapping","text":"<p>An enum should be a single line, or each enum entry has to be placed on a separate line. In case the enumeration contains enum entries and declarations those are to be separated by a blank line.</p> Ktlint Disallowed <pre><code>enum class Foo { A, B, C, D }\nenum class Foo {\nA,\nB,\nC,\nD,\n;\nfun foo() = \"foo\"\n}\n</code></pre> <pre><code>enum class Foo {\nA,\nB, C,\nD\n}\nenum class Foo {\nA;\nfun foo() = \"foo\"\n}\n</code></pre> <p>Rule id: <code>enum-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#multiline-expression-wrapping","title":"Multiline expression wrapping","text":"<p>Multiline expression on the right hand side of an expression are forced to start on a separate line. Expressions in return statement are excluded as that would result in a compilation error. </p> Ktlint Disallowed <pre><code>val foo =\nfoo(\nparameterName =\n\"The quick brown fox \"\n.plus(\"jumps \")\n.plus(\"over the lazy dog\"),\n)\n</code></pre> <pre><code>val foo = foo(\nparameterName = \"The quick brown fox \"\n.plus(\"jumps \")\n.plus(\"over the lazy dog\"),\n)\n</code></pre> <p>Rule id: <code>multiline-expression-wrapping</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#statement-wrapping","title":"Statement wrapping","text":"<p>A function, class/object body or other block body statement has to be placed on different line than the braces of the body block.</p> Ktlint Disallowed <pre><code>fun foo() {\nif (true) {\n// do something\n}\n}\nclass A {\nval a = 0\nval b = 1\n}\n</code></pre> <pre><code>fun foo() { if (true) {\n// do something\n}\n}\nclass A { val a = 0\nval b = 1 }\n</code></pre> <p>Rule id: <code>statement-wrapping</code></p>"},{"location":"rules/standard/","title":"Standard rules","text":""},{"location":"rules/standard/#annotation-formatting","title":"Annotation formatting","text":"<p>Multiple annotations should be on a separate line than the annotated declaration; annotations with parameters should each be on separate lines; annotations should be followed by a space</p> Ktlint Disallowed <pre><code>// A single annotation (without parameters) is allowed on same line as annotated construct\n@FunctionalInterface class FooBar {\n@JvmField var foo: String\n@Test fun bar() {}\n}\n// A class or function parameter may have a single annotation with parameter(s) on the same line\nclass Foo(@Path(\"fooId\") val fooId: String)\nclass Bar(\n@NotNull(\"fooId\") val fooId: String,\n@NotNull(\"bar\") bar: String\n)\n// Multiple annotations (without parameters) are allowed on the same line\n@Foo @Bar\nclass FooBar {\n@Foo @Bar\nvar foo: String\n@Foo @Bar\nfun bar() {}\n}\n// An array of annotations (without parameters) is allowed on same line as annotated construct\n@[Foo Bar] class FooBar2 {\n@[Foo Bar] var foo: String\n@[Foo Bar] fun bar() {}\n}\n</code></pre> <pre><code>// An annotation with parameter(s) is not allowed on same line as annotated construct\n@Suppress(\"Unused\") class FooBar {\n@Suppress(\"Unused\") var foo: String\n@Suppress(\"Unused\") fun bar() {}\n}\n// Multiple annotation on same line as annotated construct are not allowed\n@Foo @Bar class FooBar {\n@Foo @Bar var foo: String\n@Foo @Bar fun bar() {}\n}\n</code></pre> <p>Rule-id: <code>annotation</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#argument-list-wrapping","title":"Argument list wrapping","text":"<p>All arguments should be on the same line, or every argument should be on a separate line.</p> Ktlint Disallowed <pre><code>val x = f(\na,\nb,\nc\n)\n</code></pre> <pre><code>val x = f(\na,\nb, c\n)\n</code></pre> <p>Rule-id: <code>argument-list-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#block-comment-initial-star-alignment","title":"Block comment initial star alignment","text":"<p>Lines in a block comment which (exclusive the indentation) start with a <code>*</code> should have this <code>*</code> aligned with the <code>*</code> in the opening of the block comment.</p> Ktlint Disallowed <pre><code>/*\n * This comment is formatted well.\n */\n</code></pre> <pre><code>/*\n * This comment is not formatted well.\n */\n</code></pre> <p>Rule id: <code>block-comment-initial-star-alignment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#chain-wrapping","title":"Chain wrapping","text":"<p>When wrapping chained calls <code>.</code>, <code>?.</code> and <code>?:</code> should be placed on the next line</p> Ktlint Disallowed <pre><code>val foo = listOf(1, 2, 3)\n.filter { it > 2 }!!\n.takeIf { it.count() > 100 }\n?.sum()\nval foobar = foo()\n?: bar\n</code></pre> <pre><code>val foo = listOf(1, 2, 3).\nfilter { it > 2 }!!.\ntakeIf { it.count() > 100 }?.\nsum()\nval foobar = foo() ?:\nbar\n</code></pre> <p>Rule id: <code>chain-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#classobject-naming","title":"Class/object naming","text":"<p>Enforce naming of class.</p> Ktlint Ktlint JUnit Test Disallowed <pre><code>class Foo\nclass Foo1\n</code></pre> <pre><code>@Nested\ninner class `Some descriptive class name` {\n@Test\nfun `Some descriptive test name`() {\n// do something\n}\n}\n</code></pre> <pre><code>class foo\nclass Foo_Bar\nclass `Some class in the production code`\n</code></pre> <p>Note</p> <p>Functions in files which import a class from package <code>org.junit.jupiter.api</code> are considered to be test functions and are allowed to have a name specified between backticks and do not need to adhere to the normal naming convention. Although, the Kotlin coding conventions does not allow this explicitly for class identifiers, <code>ktlint</code> does allow it.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>ClassName</code>.</p> <p>Rule id: <code>class-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#enum-entry","title":"Enum entry","text":"<p>Enum entry names should be uppercase underscore-separated or upper camel-case separated.</p> Ktlint Disallowed <pre><code>enum class Bar {\nFOO,\nFoo,\nFOO_BAR,\nFooBar\n}\n</code></pre> <pre><code>enum class Bar {\nfoo,\nbAr,\nFoo_Bar,\n}\n</code></pre> <p>Rule id: <code>enum-entry-name-case</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#file-name","title":"File name","text":"<p>A file containing only one visible (e.g. non-private) class, and visible declarations related to that class only, should be named according to that element. The same applies if the file does not contain a visible class but exactly one type alias or one object declaration. Otherwise, the PascalCase notation should be used.</p> <p>Rule id: <code>filename</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#final-newline","title":"Final newline","text":"<p>Ensures consistent usage of a newline at the end of each file. </p> <p>This rule can be configured with <code>.editorconfig</code> property <code>insert_final_newline</code>.</p> <p>Rule id: <code>final-newline</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#import-ordering","title":"Import ordering","text":"<p>Ensures that imports are ordered consistently (see Import Layouts for configuration).</p> Ktlint Disallowed <pre><code>import com.bar.Bar\nimport com.foo.Foo\nimport org.foo.bar.FooBar\nimport java.util.concurrent.ConcurrentHashMap\n</code></pre> <pre><code>import com.bar.Bar\nimport java.util.concurrent.ConcurrentHashMap\nimport org.foo.bar.FooBar\nimport com.foo.Foo\n</code></pre> <p>Rule id: <code>import-ordering</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#indentation","title":"Indentation","text":"<p>Indentation formatting - respects <code>.editorconfig</code> <code>indent_size</code> with no continuation indent (see EditorConfig section for more).</p> Ktlint Disallowed <pre><code>fun main() {\nfoobar(\na,\nb,\nc\n)\n}\n</code></pre> <pre><code>fun main() {\nfoobar(\na,\nb,\nc\n)\n}\n</code></pre> <p>Note</p> <p>This rule handles indentation for many different language constructs which can not be summarized with a few examples. See the unit tests for more details.</p> <p>Rule id: <code>indent</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#max-line-length","title":"Max line length","text":"<p>Ensures that lines do not exceed the given length of <code>.editorconfig</code> property <code>max_line_length</code> (see EditorConfig section for more). This rule does not apply in a number of situations. For example, in the case a line exceeds the maximum line length due to a comment that disables ktlint rules then that comment is being ignored when validating the length of the line. The <code>.editorconfig</code> property <code>ktlint_ignore_back_ticked_identifier</code> can be set to ignore identifiers which are enclosed in backticks, which for example is very useful when you want to allow longer names for unit tests.</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\n// Lines below are accepted although the max\n// line length is exceeded.\npackage com.toooooooooooooooooooooooooooo.long\nimport com.tooooooooooooooooooooooooooooo.long\nval foo =\n\"\"\"\n fooooooooooooooooooooooooooooooooooooooooo\n \"\"\"\n@Test\nfun `Test description which is toooooooooooo long`() {\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval fooooooooooooooo = \"fooooooooooooooooooooo\"\nval foooooooooooooo = \"foooooooooooooooooooo\" // some comment\nval fooooooooooooo =\n\"foooooooooooooooooooooooooooooooooooooooo\"\n</code></pre> <p>Rule id: <code>max-line-length</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#modifier-order","title":"Modifier order","text":"<p>Consistent order of modifiers</p> Ktlint Disallowed <pre><code>abstract class A {\nprotected open val v = \"\"\ninternal open suspend fun f(v: Any): Any = \"\"\nprotected lateinit var lv: String\n}\n</code></pre> <pre><code>abstract class A {\nopen protected val v = \"\"\nopen suspend internal fun f(v: Any): Any = \"\"\nlateinit protected var lv: String\n}\n</code></pre> <p>Rule id: <code>modifier-order</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#multiline-if-else","title":"Multiline if-else","text":"<p>Braces required for multiline if/else statements.</p> Ktlint Disallowed <pre><code>val foo =\nif (true) {\nreturn 0\n} else {\nreturn 1\n}\n</code></pre> <pre><code>val foo =\nif (true)\nreturn 0\nelse\nreturn 1\n</code></pre> <p>Rule id: <code>multiline-if-else</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-blank-lines-before","title":"No blank lines before <code>}</code>","text":"<p>No blank lines before <code>}</code>.</p> Ktlint Disallowed <pre><code>fun main() {\nfun a() {\n}\nfun b()\n}\n</code></pre> <pre><code>fun main() {\nfun a() {\n}\nfun b()\n}\n</code></pre> <p>Rule id: <code>no-blank-line-before-rbrace</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-blank-lines-in-chained-method-calls","title":"No blank lines in chained method calls","text":"Ktlint Disallowed <pre><code>fun foo(inputText: String) {\ninputText\n.lowercase(Locale.getDefault())\n}\n</code></pre> <pre><code>fun foo(inputText: String) {\ninputText\n.lowercase(Locale.getDefault())\n}\n</code></pre> <p>Rule id: <code>no-blank-lines-in-chained-method-calls</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-consecutive-blank-lines","title":"No consecutive blank lines","text":"Ktlint Disallowed <pre><code>package com.test\nimport com.test.util\nval a = \"a\"\nfun b() {\n}\nfun c()\n</code></pre> <pre><code>package com.test\nimport com.test.util\nval a = \"a\"\nfun b() {\n}\nfun c()\n</code></pre> <p>Rule id: <code>no-consecutive-blank-lines</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-empty-class-bodies","title":"No empty (<code>{}</code>) class bodies","text":"Ktlint Disallowed <pre><code>class C\ndata class DC(val v: Any)\ninterface I\nobject O\n</code></pre> <pre><code>class C {}\ndata class DC(val v: Any) { }\ninterface I {\n}\nobject O{}\n</code></pre> <p>Rule id: <code>no-empty-class-body</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-leading-empty-lines-in-method-blocks","title":"No leading empty lines in method blocks","text":"Ktlint Disallowed <pre><code>fun bar() {\nval a = 2\n}\n</code></pre> <pre><code>fun bar() {\nval a = 2\n}\n</code></pre> <p>Rule id: <code>no-empty-first-line-in-method-block</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-line-break-after-else","title":"No line break after else","text":"<p>Disallows line breaks after the else keyword if that could lead to confusion, for example:</p> Ktlint Disallowed <pre><code>fun funA() {\nif (conditionA()) {\ndoSomething()\n} else if (conditionB()) {\ndoAnotherThing()\n}\n}\n</code></pre> <pre><code>fun funA() {\nif (conditionA()) {\ndoSomething()\n} else\nif (conditionB()) {\ndoAnotherThing()\n}\n}\n</code></pre> <p>Rule id: <code>no-line-break-after-else</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-line-break-before-assignment","title":"No line break before assignment","text":"<p>When a line is broken at an assignment (<code>=</code>) operator the break comes after the symbol.</p> Ktlint Disallowed <pre><code>val valA =\n\"\"\n</code></pre> <pre><code>val valA\n= \"\"\n</code></pre> <p>Rule id: <code>no-line-break-before-assignment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-multi-spaces","title":"No multi spaces","text":"<p>Except in indentation and in KDoc's it is not allowed to have multiple consecutive spaces.</p> Ktlint Disallowed <pre><code>fun main() {\nx(1, 3)\n}\n</code></pre> <pre><code>fun main() {\nx(1, 3)\n}\n</code></pre> <p>Rule id: <code>no-multi-spaces</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-semicolons","title":"No semicolons","text":"<p>No semicolons (unless used to separate multiple statements on the same line).</p> Ktlint Disallowed <pre><code>fun foo() {\nbar()\nbar()\n}\n</code></pre> <pre><code>fun foo() {\n;\nbar()\n;\nbar()\n;\n}\n</code></pre> <p>Rule id: <code>no-semi</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-trailing-whitespaces","title":"No trailing whitespaces","text":"<p>Rule id: <code>no-trailing-spaces</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-unit-as-return-type","title":"No <code>Unit</code> as return type","text":"<p>The <code>Unit</code> type is not allowed as return type of a function. returns (<code>fun fn {}</code> instead of <code>fun fn: Unit {}</code>)</p> Ktlint Disallowed <pre><code>fun fn() {}\n</code></pre> <pre><code>fun fn(): Unit {}\n</code></pre> <p>Rule id: <code>no-unit-return</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-unused-imports","title":"No unused imports","text":"<p>Warning</p> <p>This rule is not able to detect all unused imports as mentioned in this issue comment.</p> <p>Rule id: <code>no-unused-imports</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-wildcard-imports","title":"No wildcard imports","text":"<p>No wildcard imports except imports listed in <code>.editorconfig</code> property <code>ij_kotlin_packages_to_use_import_on_demand</code>.</p> Ktlint Disallowed <pre><code>import foobar.Bar\nimport foobar.Foo\n</code></pre> <pre><code>import foobar.*\n</code></pre> <p>Warning</p> <p>In case property <code>ij_kotlin_packages_to_use_import_on_demand</code> is not explicitly set, it allows wildcards imports like <code>java.util.*</code> by default to keep in sync with IntelliJ IDEA behavior. To disallow all wildcard imports, add property below to your <code>.editorconfig</code>: <pre><code>[*.{kt,kts}]\nij_kotlin_packages_to_use_import_on_demand = unset\n</code></pre></p> <p>Rule id: <code>no-wildcard-imports</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#package-name","title":"Package name","text":"<p>Validates that the package name matches the regular expression <code>[a-z][a-zA-Z\\d]*(\\.[a-z][a-zA-Z\\d]*)*</code>.</p> Ktlint Disallowed <pre><code>package foo\npackage foo.bar\n</code></pre> <pre><code>package Foo\npackage foo.Foo\npackage `foo bar`\npackage foo.`foo bar`\n</code></pre> <p>Rule id: <code>package-name</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parameter-list-wrapping","title":"Parameter list wrapping","text":"<p>When class/function signature doesn't fit on a single line, each parameter must be on a separate line</p> Ktlint Disallowed (ktlint_official) Disallowed (non ktlint_official)\" <pre><code>class ClassA(paramA: String, paramB: String, paramC: String)\nclass ClassA(\nparamA: String,\nparamB: String,\nparamC: String\n)\nfun f(a: Any, b: Any, c: Any)\nfun f(\na: Any,\nb: Any,\nc: Any\n)\nfun foo(\n@Bar fooBar: FooBar\n)\n</code></pre> <pre><code>class ClassA(\nparamA: String, paramB: String,\nparamC: String\n)\nfun f(\na: Any,\nb: Any, c: Any\n)\nfun foo(@Bar fooBar: FooBar)\n</code></pre> <pre><code>class ClassA(\nparamA: String, paramB: String,\nparamC: String\n)\nfun f(\na: Any,\nb: Any, c: Any\n)\n</code></pre> <p>Rule id: <code>parameter-list-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parameter-wrapping","title":"Parameter wrapping","text":"<p>When a function or class parameter doesn't fit on a single line, wrap the type or value to a separate line</p> Ktlint (ktlint_official) Ktlint (non ktlint_official) Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong:\nFoo,\n)\nfun bar(\nfooooooooooooooooooooooooTooLong:\nFoo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong:\nFoo,\n)\nfun bar(\nfooooooooooooooooooooooooTooLong:\nFoo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong: Foo,\n)\nfun bar(\nfooooooooooooooooooooooooooooTooLong: Foo,\n)\n</code></pre> <p>Rule id: <code>parameter-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#property-wrapping","title":"Property wrapping","text":"<p>When a property doesn't fit on a single line, wrap the type or value to a separate line</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval aVariableWithALooooooooooooongName:\nString\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval aVariableWithALooooooooooooongName: String\n</code></pre> <p>Rule id: <code>property-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#string-template","title":"String template","text":"<p>Consistent string templates (<code>$v</code> instead of <code>${v}</code>, <code>${p.v}</code> instead of <code>${p.v.toString()}</code>)</p> Ktlint Disallowed <pre><code>val foo = \"$foo hello\"\n</code></pre> <pre><code>val foo = \"${foo} hello\"\n</code></pre> <p>Rule id: <code>string-template</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>Consistent removal (default) or adding of trailing commas on call site.</p> <p>Important</p> <p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma_on_call_site</code> to configure the rule. When this property is enabled, KtLint enforces the usage of the trailing comma at call site while IntelliJ IDEA default formatter only allows to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> Ktlint Disallowed <pre><code>FooWrapper(\nFoo(\na = 3,\nb = 4,\n),\n)\n</code></pre> <pre><code>FooWrapper(Foo(\na = 3,\nb = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on call site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>Although the Kotlin coding conventions leaves it to the developer's discretion to use trailing commas on the call site, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Note</p> <p>Trailing comma on call site is automatically disabled if the Wrapping rule (or, before version <code>0.45.0</code>, the Indentation rule) is disabled or not loaded. Because it cannot provide proper formatting with unwrapped calls. (see dependencies).</p> <p>Rule id: <code>trailing-comma-on-call-site</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>Consistent removal (default) or adding of trailing commas on declaration site.</p> <p>Important</p> <p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma</code> to configure the rule. When this property is enabled, KtLint enforces the usage of the trailing comma at declaration site while IntelliJ IDEA default formatter only allows to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> Ktlint Disallowed <pre><code>class FooWrapper(\nval foo = Foo(\na = 3,\nb = 4,\n),\n)\n</code></pre> <pre><code>class FooWrapper(val foo = Foo(\na = 3,\nb = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on declaration site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>The Kotlin coding conventions encourages the usage of trailing commas on the declaration site, but leaves it to the developer's discretion to use trailing commas on the call site. But next to this, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Note</p> <p>Trailing comma on declaration site is automatically disabled if the Wrapping rule (or, before version <code>0.45.0</code>, the Indentation rule) is disabled or not loaded. Because it cannot provide proper formatting with unwrapped declarations. (see dependencies).</p> <p>Rule id: <code>trailing-comma-on-declaration-site</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#unnecessary-parenthesis-before-trailing-lambda","title":"Unnecessary parenthesis before trailing lambda","text":"<p>An empty parentheses block before a lambda is redundant.</p> Ktlint Disallowed <pre><code>\"some-string\".count { it == '-' }\n</code></pre> <pre><code>\"some-string\".count() { it == '-' }\n</code></pre> <p>Rule id: <code>unnecessary-parentheses-before-trailing-lambda</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#wrapping","title":"Wrapping","text":""},{"location":"rules/standard/#wrapping_1","title":"Wrapping","text":"<p>Inserts missing newlines (for example between parentheses of a multi-line function call).</p> Ktlint Disallowed <pre><code>val x = f(\na,\nb,\nc\n)\n</code></pre> <pre><code>val x = f(\na,\nb,\nc)\n</code></pre> <p>Rule id: <code>wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comment-wrapping","title":"Comment wrapping","text":"<p>A block comment should start and end on a line that does not contain any other element.</p> Ktlint Disallowed <pre><code>/* Some comment 1 */\nval foo1 = \"foo1\"\nval foo2 = \"foo\" // Some comment\nval foo3 = { /* no-op */ } </code></pre> <pre><code>/* Some comment 1 */ val foo1 = \"foo1\"\nval foo2 = \"foo\" /* Block comment instead of end-of-line comment */\nval foo3 = \"foo\" /* Some comment\n * with a newline\n */\n</code></pre> <p>Rule id: <code>comment-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#spacing","title":"Spacing","text":""},{"location":"rules/standard/#angle-bracket-spacing","title":"Angle bracket spacing","text":"<p>No spaces around angle brackets when used for typing.</p> Ktlint Disallowed <pre><code>val a: Map<Int, String> = mapOf()\nval b: Map<Int, String> = mapOf()\nval c: Map<Int, String> = mapOf()\n</code></pre> <pre><code>val a: Map< Int, String> = mapOf()\nval b: Map<Int, String > = mapOf()\nval c: Map <Int, String> = mapOf()\n</code></pre> <p>Rule id: <code>spacing-around-angle-brackets</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#annotation-spacing","title":"Annotation spacing","text":"<p>Annotations should be separated by a single line break.</p> Ktlint Disallowed <pre><code>@JvmField\nfun foo() {}\n/**\n * block comment\n */\n@Foo @Bar\nclass FooBar {\n}\n</code></pre> <pre><code>@JvmField\nfun foo() {}\n@Foo @Bar\n/**\n * block comment\n */\nclass FooBar {\n}\n</code></pre> <p>Rule id: <code>annotation-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#blank-line-between-declarations-with-annotations","title":"Blank line between declarations with annotations","text":"<p>Declarations with annotations should be separated by a blank line.</p> Ktlint Disallowed <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <p>Rule id: <code>spacing-between-declarations-with-annotations</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#blank-line-between-declaration-with-comments","title":"Blank line between declaration with comments","text":"<p>Declarations with comments should be separated by a blank line.</p> Ktlint Disallowed <pre><code>// some comment 1\nbar()\n/*\n * some comment 2\n */\nfoo()\n</code></pre> <pre><code>// some comment 1\nbar()\n/*\n * some comment 2\n */\nfoo()\n</code></pre> <p>Rule id: <code>spacing-between-declarations-with-comments</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#colon-spacing","title":"Colon spacing","text":"<p>Consistent spacing around colon.</p> Ktlint Disallowed <pre><code>class A : B\nclass A2 : B2\n</code></pre> <pre><code>class A:B\nclass A2 : B2\n</code></pre> <p>Rule id: <code>colon-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comma-spacing","title":"Comma spacing","text":"<p>Consistent spacing around comma.</p> Ktlint Disallowed <pre><code>val foo1 = Foo(1, 3)\nval foo2 = Foo(1, 3)\n</code></pre> <pre><code>val foo1 = Foo(1 ,3)\nval foo2 = Foo(1,3)\n</code></pre> <p>Rule id: <code>comma-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comment-spacing","title":"Comment spacing","text":"<p>The end of line comment sign <code>//</code> should be preceded and followed by exactly a space.</p> Ktlint Disallowed <pre><code>// comment\nvar debugging = false // comment\nvar debugging = false // comment\nvar debugging = false // comment\nfun main() {\nSystem.out.println( // 123\n\"test\"\n)\n}\n// comment\n</code></pre> <pre><code>//comment\nvar debugging = false// comment\nvar debugging = false //comment\nvar debugging = false//comment\nfun main() {\nSystem.out.println(//123\n\"test\"\n)\n}\n//comment\n</code></pre> <p>Rule id: <code>comment-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#curly-spacing","title":"Curly spacing","text":"<p>Consistent spacing around curly braces.</p> Ktlint Disallowed <pre><code>val foo = if (true) { 0 } else { 1 }\n</code></pre> <pre><code>val foo = if (true){0}else{1}\n</code></pre> <p>Rule id: <code>curly-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#dot-spacing","title":"Dot spacing","text":"<p>Consistent spacing around dots.</p> Ktlint Disallowed <pre><code>fun String.foo() = \"foo\"\n</code></pre> <pre><code>fun String . foo() = \"foo\"\n</code></pre> <p>Rule id: <code>dot-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#double-colon-spacing","title":"Double colon spacing","text":"<p>No spaces around <code>::</code>.</p> Ktlint Disallowed <pre><code>val foo = Foo::class\n</code></pre> <pre><code>val foo1 = Foo ::class\nval foo2 = Foo:: class\nval foo3 = Foo :: class\nval foo4 = Foo::\nclass\n</code></pre> <p>Rule id: <code>double-colon-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-return-type-spacing","title":"Function return type spacing","text":"<p>Consistent spacing around the function return type.</p> Ktlint Disallowed <pre><code>fun foo(): String = \"some-result\"\n</code></pre> <pre><code>fun foo1() : String = \"some-result\"\nfun foo2(): String = \"some-result\"\nfun foo3():String = \"some-result\"\nfun foo4():\nString = \"some-result\"\n</code></pre> <p>Rule id: <code>function-return-type-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-start-of-body-spacing","title":"Function start of body spacing","text":"<p>Consistent spacing before start of function body.</p> Ktlint Disallowed <pre><code>fun foo1() = \"some-result\"\nfun foo2() =\n\"some-result\"\nfun foo3() {\n// do something\n}\nfun bar1(): String = \"some-result\"\nfun bar2(): String =\n\"some-result\"\nfun bar3(): String {\nreturn \"some-result\"\n}\n</code></pre> <pre><code>fun foo1()= \"some-result\"\nfun foo2()\n= \"some-result\"\nfun foo3()\n{\n// do something\n}\nfun bar1(): String= \"some-result\"\nfun bar2(): String\n= \"some-result\"\nfun bar3(): String\n{\nreturn \"some-result\"\n}\n</code></pre> <p>Rule id: <code>function-start-of-body-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-type-reference-spacing","title":"Function type reference spacing","text":"<p>Consistent spacing in the type reference before a function.</p> Ktlint Disallowed <pre><code>fun String.foo() = \"some-result\"\n</code></pre> <pre><code>fun String .foo() = \"some-result\"\nfun String\n.foo() = \"some-result\"\nfun String? .foo() = \"some-result\"\nfun String?\n.foo() = \"some-result\"\n</code></pre> <p>Rule id: <code>function-type-reference-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#fun-keyword-spacing","title":"Fun keyword spacing","text":"<p>Consistent spacing after the fun keyword.</p> Ktlint Disallowed <pre><code>fun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo() = \"some-result\"\nfun\nfoo() = \"some-result\"\n</code></pre> <p>Rule id: <code>fun-keyword-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#kdoc-wrapping","title":"Kdoc wrapping","text":"<p>A KDoc comment should start and end on a line that does not contain any other element.</p> Ktlint Disallowed <pre><code>/** Some KDoc comment 1 */\nval foo1 = \"foo1\"\n</code></pre> <pre><code>/** Some KDoc comment 1 */ val foo1 = \"foo1\"\nval foo2 = \"foo2\" /** Some KDoc comment\n * with a newline\n */\n</code></pre> <p>Rule id: <code>kdoc-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#keyword-spacing","title":"Keyword spacing","text":"<p>Consistent spacing around keywords.</p> Ktlint Disallowed <pre><code>fun main() {\nif (true) {}\n}\n</code></pre> <pre><code>fun main() {\nif(true){}\n}\n</code></pre> <p>Rule id: <code>keyword-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#modifier-list-spacing","title":"Modifier list spacing","text":"<p>Consistent spacing between modifiers in and after the last modifier in a modifier list.</p> Ktlint Disallowed <pre><code>abstract class Foo {\nprotected abstract suspend fun execute()\n}\n</code></pre> <pre><code>abstract class Foo {\nprotected abstract suspend fun execute()\n}\nabstract\nclass Foo {\nprotected\nabstract\nsuspend\nfun execute()\n}\n</code></pre> <p>Rule id: <code>modifier-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#nullable-type-spacing","title":"Nullable type spacing","text":"<p>No spaces in a nullable type.</p> Ktlint Disallowed <pre><code>val foo: String? = null\nval foo: List<String?> = listOf(null)\n</code></pre> <pre><code>val foo: String ? = null\nval foo: List<String ?> = listOf(null)\n</code></pre> <p>Rule id: <code>nullable-type-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#operator-spacing","title":"Operator spacing","text":"<p>Consistent spacing around operators.</p> Ktlint Disallowed <pre><code>val foo1 = 1 + 2\nval foo2 = 1 - 2\nval foo3 = 1 * 2\nval foo4 = 1 / 2\n</code></pre> <pre><code>val foo1 = 1+2\nval foo2 = 1- 2\nval foo3 = 1 *2\nval foo4 = 1 / 2\n</code></pre> <p>Rule id: <code>op-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parenthesis-spacing","title":"Parenthesis spacing","text":"<p>Consistent spacing around parenthesis.</p> Ktlint Disallowed <pre><code>class Foo : Bar {\nconstructor(string: String) : super()\n}\nval foo1 = ((1 + 2) / 3)\n</code></pre> <pre><code>class Foo : Bar {\nconstructor(string: String) : super ()\n}\nval foo1 = ( (1 + 2 ) / 3)\n</code></pre> <p>Rule id: <code>paren-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#range-spacing","title":"Range spacing","text":"<p>Consistent spacing around range operators.</p> Ktlint Disallowed <pre><code>val foo1 = (1..12 step 2).last\nval foo2 = (1..12 step 2).last\nval foo3 = (1..12 step 2).last\n</code></pre> <pre><code>val foo1 = (1.. 12 step 2).last\nval foo2 = (1 .. 12 step 2).last\nval foo3 = (1 ..12 step 2).last\n</code></pre> <p>Rule id: <code>range-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#spacing-between-function-name-and-opening-parenthesis","title":"Spacing between function name and opening parenthesis","text":"<p>Consistent spacing between function name and opening parenthesis.</p> Ktlint Disallowed <pre><code>fun foo() = \"foo\"\n</code></pre> <pre><code>fun foo () = \"foo\"\n</code></pre> <p>Rule id: <code>spacing-between-function-name-and-opening-parenthesis</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#unary-operator-spacing","title":"Unary operator spacing","text":"<p>No spaces around unary operators.</p> Ktlint Disallowed <pre><code>fun foo1(i: Int) = i++\nfun foo2(i: Int) = ++i\nfun foo3(i: Int) = ++i\n</code></pre> <pre><code>fun foo1(i: Int) = i ++\nfun foo2(i: Int) = ++ i\nfun foo3(i: Int) = ++\ni\n</code></pre> <p>Rule id: <code>unary-op-spacing</code> (<code>standard</code> rule set)</p>"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to Ktlint","text":"<p> Kotlin linter in spirit of feross/standard (JavaScript) and gofmt (Go). </p>"},{"location":"#features","title":"Features","text":"<ul> <li>No configuration required <code>ktlint</code> aims to capture the Kotlin coding conventions and Android Kotlin Style Guide. In some aspects <code>ktlint</code> is a bit more strict*.</li> <li>Rule sets <code>ktlint</code> offers a <code>standard</code> rule set. Next to this, it is easy to provide custom rule sets.</li> <li>.editorconfig Some rules do allow further configuration, but in all cases a reasonable default is set when not provided. <code>ktlint</code> primarily uses the .editorconfig file to read default <code>.editorconfig</code>, IntelliJ IDEA specific and Ktlint specific properties.</li> <li>Disable rules If need be, rules can be disabled easily*.</li> <li>Built-in formatter Most lint violations don't need to be fixed manually. <code>ktlint</code> has a built-in formatter which fixes violations when possible. Some violations can not be fixed in a deterministic way, and need manual action.</li> <li>Customizable output Several reporters are available out-of-the-box: <code>plain</code> (+ <code>plain?group_by_file</code>), <code>plain-summary</code>, <code>json</code>, <code>html</code> and <code>checkstyle</code>. It's also easy to create a custom reporter.</li> <li>Executable jar <code>ktlint</code> is released as a single executable jar with all dependencies included.</li> </ul>"},{"location":"#legal","title":"Legal","text":"<p>This project is not affiliated with nor endorsed by JetBrains. All code, unless specified otherwise, is licensed under the MIT license. Copyright \u00a9 2019 Pinterest, Inc. Copyright \u00a9 2016-2019 Stanley Shyiko.</p>"},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#why-should-i-use-ktlint","title":"Why should I use ktlint?","text":"<p>the short answer is Simplicity.</p> <p>Spending time on configuration (and maintenance down the road) of hundred-line long style config file(s) is counter-productive. Instead of wasting your energy on something that has no business value - focus on what really matters (not debating whether to use tabs or spaces).</p> <p>By using ktlint you put the importance of code clarity and community conventions over personal preferences. This makes things easier for people reading your code as well as frees you from having to document and explain what style potential contributor(s) have to follow.</p> <p>ktlint is a single binary with both linter & formatter included. All you need is to drop it in (no need to get overwhelmed while choosing among dozens of code style options).</p>"},{"location":"faq/#how-do-i-enable-or-disable-a-rule","title":"How do I enable or disable a rule?","text":"<p>An individual rule can be enabled or disabled with a rule property. The name of the rule property consists of the <code>ktlint_</code> prefix followed by the rule set id followed by a <code>_</code> and the rule id. Examples: <pre><code>ktlint_standard_final-newline = disabled # Disables the `final-newline` rule in the `standard` rule set provided by KtLint\nktlint_standard_some-experimental-rule = enabled # Enables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed.</p>"},{"location":"faq/#how-do-i-enable-or-disable-a-rule-set","title":"How do I enable or disable a rule set?","text":"<p>All rules in a rule set can be enabled or disabled with a rule set property. The name of the rule set property consists of the <code>ktlint_</code> prefix followed by the rule set id. Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>All rules from the <code>standard</code> and custom rule sets are enabled by default and can optionally be disabled in the <code>.editorconfig</code>. All <code>experimental</code> rules are disabled by default and can optionally be enabled in the <code>.editorconfig</code>.</p>"},{"location":"faq/#can-i-have-my-own-rules-on-top-of-ktlint","title":"Can I have my own rules on top of ktlint?","text":"<p>Absolutely, \"no configuration\" doesn't mean \"no extensibility\". You can add your own ruleset(s) to discover potential bugs, check for anti-patterns, etc.</p> <p>See adding a custom rule set for more information.</p>"},{"location":"faq/#how-do-i-suppress-errors-for-a-lineblockfile","title":"How do I suppress errors for a line/block/file?","text":"<p>Tip</p> <p>Suppressing a <code>ktlint</code> violation is meant primarily as an escape latch for the rare cases when ktlint is not able to produce the correct result. Please report any such instances using GitHub Issues).</p> <p>To disable a specific rule you'll need the fully qualified rule identifier. This identifier is displayed at the end of the lint error. In case your code was autocorrected, you need to revert the code and run the <code>lint</code> task instead of the <code>format</code> to find the rule identifier.</p> <p>As of Ktlint 0.50, an error can only be suppressed using @Suppress or @SuppressWarnings annotations</p> Allowed <pre><code>// Suppressing all rules for the entire file\n@file:Suppress(\"ktlint\")\n// Suppress a single rule (with id 'rule-id', defined in rule set with id 'rule-set-id') in the scope of the annotated construct\n@Suppress(\"ktlint:rule-set-id:rule-id\")\nclass Foo {}\n// Suppress multiple rules for the annotated construct\n@Suppress(\"ktlint:standard:no-wildcard-imports\", \"ktlint:custom-rule-set-id:custom-rule-id\")\nimport foo.*\n// Suppress all rules for the annotated construct\n@Suppress(\"ktlint\")\nimport foo.*\n</code></pre>"},{"location":"faq/#how-do-i-globally-disable-a-rule-without-editorconfig","title":"How do I globally disable a rule without <code>.editorconfig</code>?","text":"<p>When using Ktlint CLI, you may pass a list of disabled rules via the <code>--disabled_rules</code> command line flag. The value is a comma separated list of rule id's that have to be disabled. The rule id must be fully qualified (e.g. must be prefixed with the rule set id). </p>"},{"location":"faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this","title":"Why is <code>.editorconfig</code> property <code>disabled_rules</code> deprecated and how do I resolve this?","text":"<p>The <code>.editorconfig</code> properties <code>disabled_rules</code> and <code>ktlint_disabled_rules</code> are deprecated as of KtLint version <code>0.48</code> and are removed in version <code>0.49</code>. Those properties contain a comma separated list of rules which are disabled. Using a comma separated list of values has some disadvantages.</p> <p>A big disadvantage is that it is not possible to override the property partially in an <code>.editorconfig</code> file in a subpackage. Another disadvantage is that it is not possible to express explicitly that a rule is enabled. Lastly, (qualified) rule ids can be 20 characters or longer, which makes a list with multiple entries hard to read.</p> <p>Starting with KtLint <code>0.48</code> entire rule sets and individual rules can be disabled / enabled with a separate property per rule (set). Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_standard_final-newline = enabled # Enables the `final-newline` rule in the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\nktlint_standard_some-experimental-rule = disabled # Disables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>All rules from the <code>standard</code> and custom rule sets are enabled by default and can optionally be disabled in the <code>.editorconfig</code>. All <code>experimental</code> rules are disabled by default and can optionally be enabled in the <code>.editorconfig</code>.</p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed. </p>"},{"location":"faq/#why-is-wildcard-import-javautil-not-reported-by-the-no-wildcard-imports-rule","title":"Why is wildcard import <code>java.util.*</code> not reported by the <code>no-wildcard-imports</code> rule?","text":"<p>The <code>no-wildcard-imports</code> rule forbids wildcard imports, except for imports defined in <code>.editorconfig</code> property <code>ij_kotlin_packages_to_use_import_on_demand</code>. If this property is not explicitly set, it allows wildcards imports like <code>java.util.*</code> by default to keep in sync with IntelliJ IDEA behavior.</p>"},{"location":"faq/#can-a-new-toggle-be-added-to-optionally-enabledisable-format-code-in-a-particular-way","title":"Can a new toggle be added to optionally (enable/disable) format code in a particular way?","text":"<p>Ktlint can be configured by enabling and disabling rules. Some rules can be configured in more details with additional <code>.editorconfig</code> properties. Regularly, a new configuration option is requested to modify behavior in existing rules.</p> <p>Ktlint is restrictive with adding additional configuration settings to customize behavior in rules. Each configuration option that Ktlint offers comes with complexity that has to be maintained by only a couple of maintainers. As of that, we cannot provide tens or even hundreds of such options.</p> <p>Less configuration options also means less discussions in teams about settings to use. Unfortunately this means that you cannot tweak Ktlint exactly to the format you prefer.</p> <p>Tip</p> <p>Any idea for a new configuration option is valuable. Please create an issue for it so that it can be considered to incorporate it in Ktlint.</p>"},{"location":"faq/#can-i-use-ktlint-to-directly-format-the-code-im-generating-with-kotlinpoet","title":"Can I use KtLint to directly format the code I'm generating with KotlinPoet?","text":"<p>Yes, it is possible to use KtLint to directly format the code generated with KotlinPoet. To do so, you must include the dependencies <code>com.pinterest.ktlint:ktlint-core</code> and <code>com.pinterest.ktlint:ktlint-ruleset-standard</code> in your Gradle/Maven project.</p> <p>Warning</p> <p>Do not include the dependency <code>com.pinterest:ktlint</code> as that would import the entire ktlint project including unwanted dependencies. Besides a much bigger artifact, it might also result in problems regarding logging.</p> <p>To format the output of KotlinPoet with KtLint, you can use the following snippet:</p> <p><pre><code>val ruleProviders = buildSet {\nServiceLoader\n.load(RuleSetProviderV2::class.java)\n.flatMapTo(this) { it.getRuleProviders() }\n}\nval ktLintRuleEngine = KtLintRuleEngine(\nruleProviders = ruleProviders,\neditorConfigDefaults = EditorConfigDefaults.load(EDITORCONFIG_PATH),\n)\nktLintRuleEngine.format(outputDir.toPath())\n</code></pre> Here, outputDir refers to the directory of the generated files by KotlinPoet, ktLintRuleEngine is an instance of KtLint rule engine.</p> <p>It is also possible to format file-by-file the output of KotlinPoet if you write your <code>FileSpec</code> to a <code>StringBuilder()</code>, instead of a <code>File</code>, and send the generated code as <code>String</code> to KtLint inside a <code>CodeSnippet</code>: <pre><code>kotlinFile.writeText(\nktLintRuleEngine.format(\nCode.CodeSnippet(\nstringBuilder.toString()\n)\n)\n)\n</code></pre></p>"},{"location":"faq/#are-formatter-tags-respected","title":"Are formatter tags respected?","text":"<p>As of version <code>0.49.x</code> the formatter tags of IntelliJ IDEA are respected. By default, those formatter tags are disabled. The formatter tags can be enabled with <code>.editorconfig</code> properties below: <pre><code>ij_formatter_tags_enabled = true # Defaults to 'false'\nij_formatter_off_tag = some-custom-off-tag # Defaults to '@formatter:off'\nij_formatter_on_tag = some-custom-on-tag # Defaults to '@formatter:on'\n</code></pre></p> <p>When enabled, the ktlint rule checking is disabled for all code surrounded by the formatter tags.</p>"},{"location":"readme/","title":"Build & test documentation on local machine","text":"<p>The documentation of ktlint is served with mkdocs-material. For full documentation visit mkdocs.org.</p> <p>To build and test documentation on your local development machine, follow steps below:</p>"},{"location":"readme/#setup","title":"Setup","text":"<ol> <li>In IntelliJ IDEA<ul> <li>Open <code>Preferences</code></li> <li>Search for <code>JSON Schema mappings</code></li> <li>Add new schema for url <code>https://squidfunk.github.io/mkdocs-material/schema.json</code> and add file <code>mkdocs.yml</code> for this url.</li> </ul> </li> <li>Pull docker image <pre><code>$ docker pull squidfunk/mkdocs-material\n</code></pre></li> </ol>"},{"location":"readme/#build-server","title":"Build server","text":"<p>The following steps build and host the documentation locally, updating automatically whenever a local file is changed.</p> <ol> <li>Start mkdocs server from root of project (e.g. from same directory where file mkdocs.yml is located) <pre><code>docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n</code></pre></li> <li>Visit page <code>http://0.0.0.0:8000/</code> in your browser.</li> <li>Edit the documentation and explicitly save the file. The mkdocs server refreshes its cached and the current page in the browser is automatically refreshed.</li> </ol>"},{"location":"readme/#build-once","title":"Build once","text":"<p>If you do not want to run a local server, or if you want to inspect the built files, you can run the following command from the project's main directory to build the documentation in the <code>site/</code> directory.</p> <pre><code>docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material build\n</code></pre>"},{"location":"api/badge/","title":"Badge","text":"<p>If you want to display a badge to show that your project is linted and formatted using <code>'ktlint</code> than you can add the badge:</p> Ktlint code style badge<pre><code>[](https://pinterest.github.io/ktlint/)\n</code></pre>"},{"location":"api/custom-integration/","title":"Custom integration","text":"<p>Warning</p> <p>This page is based on Ktlint <code>0.49.x</code> which has to be released. Most concepts are also applicable for <code>0.48.x</code>. </p>"},{"location":"api/custom-integration/#ktlint-rule-engine","title":"Ktlint Rule Engine","text":"<p>The <code>Ktlint Rule Engine</code> is the central entry point for custom integrations with the <code>Ktlint API</code>. See basic API Consumer for a basic example on how to invoke the <code>Ktlint Rule Engine</code>. This example also explains how the logging of the <code>Ktlint Rule Engine</code> can be configured to your needs.</p> <p>The <code>KtLintRuleEngine</code> instance only needs to be created once for the entire lifetime of your application. Reusing the same instance results in better performance due to caching. </p> Creating the KtLintRuleEngine<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n)\n</code></pre>"},{"location":"api/custom-integration/#rule-provider","title":"Rule provider","text":"<p>The <code>KtLintRuleEngine</code> must be configured with at least one <code>RuleProvider</code>. A <code>RuleProvider</code> is a lambda which upon request of the <code>KtLintRuleEngine</code> provides a new instance of a specific rule. You can either provide any of the standard rules provided by KtLint or with your own custom rules, or with a combination of both. Creating a set of RuleProviders<pre><code>val KTLINT_API_CONSUMER_RULE_PROVIDERS =\nsetOf(\n// Can provide custom rules\nRuleProvider { NoVarRule() },\n// but also reuse rules from KtLint rulesets\nRuleProvider { IndentationRule() },\n)\n</code></pre></p>"},{"location":"api/custom-integration/#editor-config-defaults-overrides","title":"Editor config: defaults & overrides","text":"<p>When linting and formatting files, the <code>KtlintRuleEngine</code> takes the <code>.editorconfig</code> file(s) into account which are found on the path to the file. A property which is specified in the <code>editorConfigOverride</code> property of the <code>KtLintRuleEngine</code> takes precedence above the value of that same property in the <code>.editorconfig</code> file. The <code>editorConfigDefaults</code> property of the <code>KtLintRuleEngine</code> can be used to specify the fallback values for properties in case that property is not defined in the <code>.editorconfig</code> file (or in the <code>editorConfigOverride</code> property).</p> Specifying the editorConfigOverride<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigOverride = EditorConfigOverride.from(\nINDENT_STYLE_PROPERTY to IndentConfig.IndentStyle.SPACE,\nINDENT_SIZE_PROPERTY to 4\n)\n)\n</code></pre> <p>The <code>editorConfigOverride</code> property takes an <code>EditorConfigProperty</code> as key. KtLint defines several such properties, but they can also be defined as part of a custom rule.</p> <p>The <code>editorConfigDefaults</code> property is more cumbersome to define as it is based directly on the data format of the <code>ec4j</code> library which is used for parsing the <code>.editorconfig</code> file.</p> <p>The defaults can be loaded from a path or a directory. If a path to a file is specified, the name of the file does not necessarily have to end with <code>.editorconfig</code>. If a path to a directory is specified, the directory should contain a file with name <code>.editorconfig</code>. Note that the <code>propertyTypes</code> have to be derived from the same collection of rule providers that are specified in the <code>ruleProviders</code> property of the <code>KtLintRuleEngine</code>. </p> <p>Specifying the editorConfigDefaults using an '.editorconfig' file<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigDefaults = EditorConfigDefaults.load(\npath = Paths.get(\"/some/path/to/editorconfig/file/or/directory\"),\npropertyTypes = KTLINT_API_CONSUMER_RULE_PROVIDERS.propertyTypes(),\n)\n)\n</code></pre> If you want to include all RuleProviders of the Ktlint project than you can easily retrieve the collection using <code>StandardRuleSetProvider().getRuleProviders()</code>.</p> <p>The <code>EditorConfigDefaults</code> property can also be specified programmatically as is shown below:</p> Specifying the editorConfigDefaults programmatically<pre><code>val ktLintRuleEngine =\nKtLintRuleEngine(\nruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\neditorConfigDefaults = EditorConfigDefaults(\norg.ec4j.core.model.EditorConfig\n.builder()\n// .. add relevant properties\n.build()\n)\n)\n</code></pre>"},{"location":"api/custom-integration/#lint-format","title":"Lint & format","text":"<p>Once the <code>KtLintRuleEngine</code> has been defined, it is ready to be invoked for each file or code snippet that has to be linted or formatted. The the <code>lint</code> and <code>format</code> functions take a <code>Code</code> instance as parameter. Such an instance can either be created from a file Code from file<pre><code>val code = Code.fromFile(\nFile(\"/some/path/to/file\")\n)\n</code></pre> or a code snippet (set <code>script</code> to <code>true</code> to handle the snippet as Kotlin script): Code from snippet<pre><code>val code = Code.fromSnippet(\n\"\"\"\n val code = \"some-code\"\n \"\"\".trimIndent()\n)\n</code></pre></p> <p>The <code>lint</code> function is invoked with a lambda which is called each time a <code>LintError</code> is found and does not return a result. Specifying the editorConfigDefaults programmatically<pre><code>ktLintRuleEngine\n.lint(codeFile) { lintError ->\n// handle\n}\n</code></pre></p> <p>The <code>format</code> function is invoked with a lambda which is called each time a <code>LintError</code> is found and returns the formatted code as result. Note that the <code>LintError</code> should be inspected for errors that could not be autocorrected. Specifying the editorConfigDefaults programmatically<pre><code>val formattedCode =\nktLintRuleEngine\n.format(codeFile) { lintError ->\n// handle\n}\n</code></pre></p>"},{"location":"api/custom-integration/#logging","title":"Logging","text":"<p>Ktlint uses the <code>io.github.microutils:kotlin-logging</code> which is a <code>slf4j</code> wrapper. As API consumer you can choose which logging framework you want to use and configure that framework to your exact needs. The basic API Consumer contains an example with <code>org.slf4j:slf4j-simple</code> as logging provider and a customized configuration which shows logging at <code>DEBUG</code> level for all classes except one specific class which only displays logging at <code>WARN</code> level.</p>"},{"location":"api/custom-reporter/","title":"Custom reporter","text":""},{"location":"api/custom-reporter/#build-a-custom-reporter","title":"Build a custom reporter","text":"<p>Take a look at ktlint-cli-reporter-plain.</p> <p>In short, all you need to do is to implement a ReporterV2 and make it available by registering a custom ReporterProviderV2 using <code>META-INF/services/com.pinterest.ktlint.cli.reporter.core.api.ReporterProviderV2</code>. Pack all of that into a JAR and you're done.</p> <p>To load a custom (3rd party) reporter use <code>ktlint --reporter=name,artifact=/path/to/custom-ktlint-reporter.jar</code> (see <code>ktlint --help</code> for more).</p>"},{"location":"api/custom-reporter/#third-party-reporters","title":"Third party reporters","text":"<p>Known third-party reporters:</p> <ul> <li>kryanod/ktlint-junit-reporter reports ktlint output as an xml file in JUnit format so that the ktlint report can be made visible on the Merge Request page.</li> <li>musichin/ktlint-github-reporter uses GitHub workflow commands to set error messages for <code>ktlint</code> issues.</li> <li>tobi2k/ktlint-gitlab-reporter provides output in JSON format that can be parsed by GitLab automatically.</li> </ul>"},{"location":"api/custom-rule-set/","title":"Custom rule set","text":"<p>Tip</p> <p>See Writing your first ktlint rule by Niklas Baudy.</p> <p>In a nutshell: a \"rule set\" is a JAR containing one or more Rules. <code>ktlint</code> is relying on the ServiceLoader to discover all available \"RuleSet\"s on the classpath. As a ruleset author, all you need to do is to include a <code>META-INF/services/RuleSetProviderV3</code> file containing a fully qualified name of your RuleSetProviderV3 implementation.</p>"},{"location":"api/custom-rule-set/#ktlint-ruleset-template","title":"ktlint-ruleset-template","text":"<p>A complete sample project (with tests and build files) is included in this repo under the ktlint-ruleset-template directory (make sure to check NoVarRuleTest as it contains some useful information).</p> Building the ktlint-ruleset-template<pre><code>$ cd ktlint-ruleset-template/\n$ ../gradlew build\n</code></pre> Provide code sample that violates rule `custom:no-var<pre><code>$ echo 'var v = 0' > test.kt\n</code></pre> Running the ktlint-ruleset-template<pre><code>$ ktlint -R build/libs/ktlint-ruleset-template.jar --log-level=debug --relative test.kt\n\n18:13:21.026 [main] DEBUG com.pinterest.ktlint.internal.RuleSetsLoader - JAR ruleset provided with path \"/../ktlint/ktlint-ruleset-template/build/libs/ktlint-ruleset-template.jar\"\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"baseline\" id.\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"checkstyle\" id.\n18:13:21.241 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"json\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"html\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"plain\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with \"sarif\" id.\n18:13:21.242 [main] DEBUG com.pinterest.ktlint.Main - Initializing \"plain\" reporter with {verbose=false, color=false, color_name=DARK_GRAY}\n[DEBUG] Rule with id 'standard:max-line-length' should run after the rule with id 'trailing-comma'. However, the latter rule is not loaded and is allowed to be ignored. For best results, it is advised load the rule.\n[DEBUG] Rules will be executed in order below (unless disabled):\n - standard:filename, - standard:final-newline, - standard:chain-wrapping, - standard:colon-spacing, - standard:comma-spacing, - standard:comment-spacing, - standard:curly-spacing, - standard:dot-spacing, - standard:import-ordering, - standard:keyword-spacing, - standard:modifier-order, - standard:no-blank-line-before-rbrace, - standard:no-consecutive-blank-lines, - standard:no-empty-class-body, - standard:no-line-break-after-else, - standard:no-line-break-before-assignment, - standard:no-multi-spaces, - standard:no-semi, - standard:no-trailing-spaces, - standard:no-unit-return, - standard:no-unused-imports, - standard:no-wildcard-imports, - standard:op-spacing, - standard:parameter-list-wrapping, - standard:paren-spacing, - standard:range-spacing, - standard:string-template, - custom:no-var, - standard:indent, - standard:max-line-length\n`text test.kt:1:1: Unexpected var, use val instead (cannot be auto-corrected)`\n18:13:21.893 [main] DEBUG com.pinterest.ktlint.Main - 872ms / 1 file(s) / 1 error(s)\n</code></pre> <p>Tip</p> <p>Multiple custom rule sets can be loaded at the same time.</p>"},{"location":"api/custom-rule-set/#abstract-syntax-tree-ast","title":"Abstract Syntax Tree (AST)","text":"<p>While writing/debugging Rules it's often helpful to inspect the Abstract Syntax Tree (AST) of the code snippet that is to be linted / formatted. The Jetbrain PsiViewer plugin for IntelliJ IDEA is a convenient tool to inspect code as shown below:</p> <p></p>"},{"location":"api/overview/","title":"Overview","text":"<p>Ktlint has an open API with which you can integrate. </p> <p>The diagram below show the internal module structure of KtLint.</p> <p></p> <p>The <code>Ktlint Rule Engine</code> is by far the most important module. It is responsible for executing the linting and formatting of the source code. The Rule Engine itself does not contain any rules. Rules are provided by API Consumers.</p> <p>The <code>Ktlint CLI</code> is an API Consumer of the <code>Ktlint Rule Engine</code>. Together with the <code>Ktlint Ruleset Standard</code> and the <code>Ktlint Reporter</code> modules the CLI offers a standalone tool which can easily be run from the commandline. Also, the <code>Ktlint CLI</code> can easily be used with custom rulesets and/or reporters.</p> <p>The <code>Ktlint Ruleset Core</code> module contains the logic which is required by each API Consumer of the <code>Ktlint Rule Engine</code>, the <code>Ktlint Ruleset Standard</code> and custom rulesets. </p> <p>The module <code>Ktlint Test</code> provide functionalities like <code>assertThatRule</code> which is used to write unit tests in a fluent AssertJ look-a-like style and can also be used for testing of custom rules.</p> <p>The <code>Ktlint logger</code> module provides functionality for writing log messages. </p>"},{"location":"contributing/","title":"Index","text":""},{"location":"contributing/#contributing-guidelines","title":"Contributing guidelines","text":""},{"location":"contributing/code-of-conduct/","title":"Code of conduct","text":"<p>At Pinterest, we work hard to ensure that our work environment is welcoming and inclusive to as many people as possible. We are committed to creating this environment for everyone involved in our open source projects as well. We welcome all participants regardless of ability, age, ethnicity, identified gender, religion (or lack there of), sexual orientation and socioeconomic status.</p> <p>This code of conduct details our expectations for upholding these values.</p>"},{"location":"contributing/code-of-conduct/#good-behavior","title":"Good behavior","text":"<p>We expect members of our community to exhibit good behavior including (but of course not limited to):</p> <ul> <li>Using intentional and empathetic language.</li> <li>Focusing on resolving instead of escalating conflict.</li> <li>Providing constructive feedback.</li> </ul>"},{"location":"contributing/code-of-conduct/#unacceptable-behavior","title":"Unacceptable behavior","text":"<p>Some examples of unacceptable behavior (again, this is not an exhaustive list):</p> <ul> <li>Harassment, publicly or in private.</li> <li>Trolling.</li> <li>Sexual advances (this isn\u2019t the place for it).</li> <li>Publishing other\u2019s personal information.</li> <li>Any behavior which would be deemed unacceptable in a professional environment.</li> </ul>"},{"location":"contributing/code-of-conduct/#recourse","title":"Recourse","text":"<p>If you are witness to or the target of unacceptable behavior, it should be reported to Pinterest at opensource-policy@pinterest.com. All reporters will be kept confidential and an appropriate response for each incident will be evaluated.</p> <p>If the maintainers do not uphold and enforce this code of conduct in good faith, community leadership will hold them accountable.</p>"},{"location":"contributing/guidelines/","title":"Guidelines","text":"<p>First off, thanks for taking the time to contribute! This guide will answer some common questions about how this project works.</p> <p>While this is a Pinterest open source project, we welcome contributions from everyone. Regular outside contributors can become project maintainers.</p>"},{"location":"contributing/guidelines/#help","title":"Help","text":"<p>If you're having trouble using this project, please start by reading all documentation and searching for solutions in the existing open and closed issues.</p>"},{"location":"contributing/guidelines/#security","title":"Security","text":"<p>If you've found a security issue in one of our open source projects, please report it at Bugcrowd; you may even make some money!</p>"},{"location":"contributing/guidelines/#code-of-conduct","title":"Code of Conduct","text":"<p>Please be sure to read and understand our code of conduct. We work hard to ensure that our projects are welcoming and inclusive to as many people as possible.</p>"},{"location":"contributing/guidelines/#reporting-issues","title":"Reporting Issues","text":"<p>If you have a bug report, please provide as much information as possible so that we can help you out:</p> <ul> <li>Version of the project you're using.</li> <li>Code (or even better a sample project) which reproduce the issue.</li> <li>Steps which reproduce the issue.</li> <li>Stack traces for crashes.</li> <li>Any logs produced.</li> </ul>"},{"location":"contributing/guidelines/#making-changes","title":"Making Changes","text":"<p>Tip</p> <p><code>ktlint</code> only provides rules that enforce the Kotlin coding conventions or Android Kotlin style guide. If your change is more opinionated than please file an issue first so that it can be discussed amongst the community. Rules which are too opinionated might be better published as a custom rule set. </p> <ol> <li>Fork this repository to your own account</li> <li>Make your changes and verify that tests pass</li> <li>Commit your work and push to a new branch on your fork</li> <li>Submit a pull request</li> <li>Participate in the code review process by responding to feedback</li> </ol> <p>Once there is agreement that the code is in good shape, one of the project's maintainers will merge your contribution.</p> <p>To increase the chances that your pull request will be accepted:</p> <ul> <li>Follow the coding style</li> <li>Write tests for your changes</li> <li>Write a good commit message</li> <li>Provide context in the pull request description.</li> </ul> <p>New rules have to implement the <code>Rule.Experimental</code> interface so that the rule will only be run for user who have opted in to use experimental rules. Once the rule is stable, the marker interface <code>Rule.Experimental</code> can be removed.</p>"},{"location":"contributing/guidelines/#updating-dependencies","title":"Updating dependencies","text":"<p>This project has enabled Gradle dependencies verification. On adding/updating any dependency, ensure that you've added dependency provided checksum/signature to <code>gradle/verification-metadata.xml</code> file.</p>"},{"location":"contributing/guidelines/#using-kotlin-development-versions","title":"Using kotlin development versions","text":"<p>Add following flag - <code>-PkotlinDev</code> to enable kotlin development version.</p>"},{"location":"contributing/guidelines/#license","title":"License","text":"<p>By contributing to this project, you agree that your contributions will be licensed under its license.</p>"},{"location":"contributing/overview/","title":"Overview","text":"<p>Important</p> <p>Make sure to read the Contributing guideline and the code of conduct first.</p>"},{"location":"contributing/overview/#development","title":"Development","text":"<p>Development starts with cloning and building the project on your local machine:</p> <pre><code>git clone https://github.com/pinterest/ktlint && cd ktlint\n./gradlew tasks # shows how to build, test, run, etc. project\n</code></pre> <p>Tip</p> <p>To open and run <code>ktlint</code> in Intellij IDEA: </p> <ul> <li>File -> Open.... </li> <li>You'll also need to set the \"Project language level\" to 8 in \"Project Settings\" (File -> Project Structure... -> Project). </li> <li>To run <code>ktlint</code> - right-click on <code>ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt</code> -> Run.</li> </ul>"},{"location":"install/cli/","title":"Command line","text":"<p>Note</p> <p>If you don't plan to use <code>ktlint</code>'s command line interface then you can skip this section.</p>"},{"location":"install/cli/#download-and-verification","title":"Download and verification","text":""},{"location":"install/cli/#download-manually-from-github","title":"Download manually from github","text":"<p>All releases of <code>ktlint</code> can be downloaded from the releases page.</p>"},{"location":"install/cli/#download-using-curl","title":"Download using curl","text":"<p>A particular version of <code>ktlint</code> can be downloaded with next command which also changes the file to an executable in directory <code>/usr/local/bin</code>:</p> Download<pre><code>curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.49.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/\n</code></pre> <p>Curl not installed or behind proxy</p> <p>If you don't have curl installed - replace <code>curl -sL</code> with <code>wget -qO-</code>. If you are behind a proxy see - curl / wget manpage. Usually simple: <pre><code>http_proxy=http://proxy-server:port https_proxy=http://proxy-server:port curl -sL ...\n</code></pre></p>"},{"location":"install/cli/#verification-of-download","title":"Verification of download","text":"<p><code>ktlint.asc</code> contains PGP signature which you can verify with:</p> Verify releases 0.32.0 and above<pre><code>curl -sS https://keybase.io/ktlint/pgp_keys.asc | gpg --import && gpg --verify ktlint.asc\n</code></pre> Verify releases up through 0.31.0<pre><code>curl -sS https://keybase.io/shyiko/pgp_keys.asc | gpg --import && gpg --verify ktlint.asc\n</code></pre>"},{"location":"install/cli/#package-managers","title":"Package managers","text":"<p><code>ktlint</code> can be installed via several OS specific package managers.</p> <p>Install with brew on macOS or Homebrew on Linux <pre><code>brew install ktlint\n</code></pre></p> <p>Install with MacPorts <pre><code>port install ktlint\n</code></pre></p> <p>Install with SDKMAN! on macOS and Linux <pre><code>sdk install ktlint\n</code></pre></p> <p>On Arch Linux install package ktlint AUR.</p>"},{"location":"install/cli/#command-line-usage","title":"Command line usage","text":""},{"location":"install/cli/#rule-sets","title":"Rule set(s)","text":"<p>When no arguments are specified, the style of all Kotlin files (ending with '.kt' or '.kts') inside the current dir (recursively) are validated with the (non-experimental) rules from the standard ruleset. Hidden folders will be skipped.</p> Default validation with standard ruleset<pre><code>ktlint\n</code></pre> <p>To validate with the standard ruleset including the experimental rules run command below: </p> Validation with standard ruleset including the experimental rules<pre><code>ktlint --experimental\n</code></pre> <p>Note</p> <p>Instead of using this command line flag, it is advised to set <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> if you want the project always to be checked with the experimental rules.</p> <p>To validate with a custom ruleset run command below: </p> Validation with standard and a custom ruleset<pre><code>ktlint --ruleset=/path/to/custom-ruleset.jar\n# or\nktlint -R /path/to/custom-ruleset.jar\n</code></pre> <p>Note</p> <p>If the custom rule set contains rules that are marked as experimental, those rule will only be run when <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> is set (or command line parameter <code>--experimental</code> is specified).</p>"},{"location":"install/cli/#format-autocorrect","title":"Format (autocorrect)","text":"<p>Most style violations can be corrected automatically. Errors that can not be corrected, are printed to <code>stderr</code>.</p> Autocorrect style violations<pre><code>ktlint --format\n# or\nktlint -F\n</code></pre>"},{"location":"install/cli/#globs","title":"Globs","text":"<p>Globs can be used to specify more exactly what files and directories are to be validated. <code>ktlint</code> uses the <code>.gitignore</code> pattern style syntax for globs. Globs are processed from left to right. Prepend a glob with <code>!</code> to negate it. Hidden folders will be skipped.</p> Check only certain locations starting from the current directory<pre><code># Check all '.kt' files in 'src/' directory, but ignore files ending with 'Test.kt':\nktlint 'src/**/*.kt' '!src/**/*Test.kt'\n# Check all '.kt' files in 'src/' directory, but ignore 'generated' directory and its subdirectories:\nktlint 'src/**/*.kt' '!src/**/generated/**'\n</code></pre>"},{"location":"install/cli/#violation-reporting","title":"Violation reporting","text":"<p><code>ktlint</code> supports different type of reporters for lint violations. When not specified the <code>plain</code> reporter is used. Optionally the <code>plain</code> reporter can group the violations per file.</p> Style violation grouped by file<pre><code>$ ktlint --reporter=plain?group_by_file\n</code></pre> <p>When using <code>ktlint</code> on an existing project, the number of violations can be huge. To get more insights in which rules are causing the most violations, the <code>plain-summary</code> reporter can be used. Style violations counted per rule<pre><code>$ ktlint --reporter=plain-summary\n</code></pre></p> <p>Other built-in reporters are: <code>json</code>, <code>sarif</code>, <code>checkstyle</code>, and <code>html</code></p> <p>Style violations can be written to an output file which is convenient when multiple reporters are specified. In example below, the plain reporter is used to write to the console while the checkstyle reports is written to a file:</p> Multiple reporters<pre><code>ktlint --reporter=plain --reporter=checkstyle,output=ktlint-report-in-checkstyle-format.xml\n</code></pre> <p>If resolving all existing errors in a project is unwanted, it is possible to create a baseline and in following invocations compare violations against this baseline. Violations that are registered in the baseline, will be ignored silently. Remove the baseline file in case you want to reset it.</p> Check against a baseline file<pre><code>ktlint --baseline=ktlint-baseline.xml # Baseline is created when not existing\n</code></pre>"},{"location":"install/cli/#logging","title":"Logging","text":"<p>Logging information is written to <code>stdout</code>. The amount of logging can be influenced by setting the minimal log level using option <code>--log-level</code> or <code>-l</code> to one of values <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code>, or <code>none</code> to suppress all logging.</p> <p>By default, the <code>info</code> log level is used meaning that all log lines at level <code>info</code>, <code>warn</code> and <code>error</code> are shown while suppressing log lines at level <code>debug</code> or <code>trace</code>.</p>"},{"location":"install/cli/#rule-configuration-editorconfig","title":"Rule configuration (<code>.editorconfig</code>)","text":"<p>Some rules can be tweaked via the <code>editorconfig file</code>.</p> <p>A scaffold of the <code>.editorconfig file</code> can be generated with command below. Note: that the generated file only contains configuration settings which are actively used by the rules which are loaded:</p> Generate .editorconfig<pre><code>ktlint generateEditorConfig\n# or\nktlint --experimental generateEditorConfig\n# or\nktlint --experimental --ruleset=/path/to/custom-ruleset.jar generateEditorConfig\n</code></pre> <p>Normally this file is located in the root of your project directory. In case the file is located in a sub folder of the project, the settings of that file only applies to that subdirectory and its folders (recursively). Ktlint automatically detects and reads all <code>.editorconfig</code> files in your project.</p> <p>Use command below, to specify a default <code>editorconfig</code>. In case a property is not defined in any <code>.editorconfig</code> file on the path to the file, the value from the default file is used. The path may point to any valid file or directory. The path can be relative or absolute. Depending on your OS, the \"~\" at the beginning of a path is replaced by the user home directory.</p> Override '.editorconfig'<pre><code>ktlint --editorconfig=/path/to/.editorconfig\n</code></pre> <p>!!! warning \"Overrides '.editorconfig' in project directory\" in KtLint 0.46 and older When specifying this option using ktlint 0.46 or older, all <code>.editorconfig</code> files in the project directory are being ignored. Starting from KtLint 0.47 the properties in this file are used as fallback.</p>"},{"location":"install/cli/#stdin-stdout","title":"Stdin && stdout","text":"<p>With command below, the input is read from <code>stdin</code> and the violations are printed to <code>stderr</code>. Logging is written to <code>stdout</code>.</p> Lint from stdin<pre><code>ktlint --stdin\n</code></pre> <p>When combined with the <code>--format</code> option, the formatted code is written to <code>stdout</code> and the violations are printed to <code>stderr</code>:</p> Format from stdin and write to stdout<pre><code>ktlint --stdin -F\n</code></pre> <p>Tip</p> <p>Logging output printed to <code>stdout</code> can be suppressed by setting <code>--log-level=none</code> (see logging). Output printed to <code>stderr</code> can be suppressed in different ways. To ignore all error output, add <code>2> /dev/null</code> to the end of the command line. Otherwise, specify a reporter to write the error output to a file.</p>"},{"location":"install/cli/#git-hooks","title":"Git hooks","text":"<p>Predefined git hooks can be installed, to automatically validate lint errors before commit or push.</p> Install git pre-commit hook<pre><code>ktlint installGitPreCommitHook\n</code></pre> Install git pre-push hook<pre><code>ktlint installGitPrePushHook\n</code></pre>"},{"location":"install/cli/#miscellaneous-flags-and-commands","title":"Miscellaneous flags and commands","text":"<p><code>-a</code> or <code>--android</code>: Turn on Android Kotlin Style Guide compatibility. This flag is most likely to be removed in a future version. Use <code>.editorconfig ktlint_code_style</code>. </p> <p><code>--color</code> and <code>--color-name=<colorName></code>: Make output colorful and optionally set the color name to use.</p> <p><code>--disabled_rules=<disabledRules></code>: A comma-separated list of rules to globally disable. To disable the standard ktlint rule-set use <code>--disabled_rules=standard</code>. This flag is most likely to be removed in a future version. Use <code>.editorconfig disabled_rules</code>.</p> <p><code>-h</code> or <code>--help</code>: Prints help information.</p> <p><code>--limit=<limit></code>: Maximum number of errors to show (default: show all)</p> <p><code>--relative</code>: Print files relative to the working directory (e.g. dir/file.kt instead of /home/user/project/dir/file.kt)</p> <p><code>--patterns-from-stdin[=<delimiter>]</code>: Reads additional patterns from <code>stdin</code>, where the patterns are separated by <code><delimiter></code>. If <code>=<delimiter></code> is omitted, newline is used as fallback delimiter. If an empty string is given, the <code>NUL</code> byte is used as delimiter instead. If this option is given, then the default patterns are disabled. Options <code>--stdin</code> and <code>--patterns-from-stdin</code> are mutually exclusive, only one of them can be given at a time.</p> <p><code>-V</code> or <code>--version</code>: Prints version information and exit.</p>"},{"location":"install/cli/#microsoft-windows-users","title":"Microsoft Windows users","text":"<p>Microsoft Windows is not able to run the <code>ktlint</code> command directly. Ktlint can be run in following ways on Microsoft Windows:</p> <ol> <li>Use the <code>ktlint.bat</code> batch file provided as part of the release. Add the batch file to your <code>%PATH%</code> environment variable for easy access</li> <li>Run <code>ktlint</code> using Git Bash</li> <li>Run as <code>java -jar ktlint</code></li> </ol>"},{"location":"install/integrations/","title":"Integrations","text":""},{"location":"install/integrations/#maven-integration","title":"Maven integration","text":"<p>By adding the plugin definition below to the <code><plugins></code> section in the <code>pom.xml</code>:</p> <ul> <li>The <code>ktlint</code> task is bound to the Maven verify lifecycle and will be executed each time the <code>mvn verify</code> is executed. It can also be executed with command <code>mvn antrun:run@ktlint</code>.</li> <li>The <code>ktlint-format</code> task is not bound to any other maven lifecycle. It can be executed with command <code>mvn antrun:run@ktlint-format</code>.</li> </ul> <p>See cli usage for arguments that can be supplied to <code>ktlint</code>.</p> Adding plugin to pom.xml<pre><code>...\n<plugin>\n<groupId>org.apache.maven.plugins</groupId>\n<artifactId>maven-antrun-plugin</artifactId>\n<version>3.1.0</version>\n<executions>\n<execution>\n<id>ktlint</id>\n<phase>verify</phase>\n<configuration>\n<target name=\"ktlint\">\n<java taskname=\"ktlint\" dir=\"${basedir}\" fork=\"true\" failonerror=\"true\"\nclasspathref=\"maven.plugin.classpath\" classname=\"com.pinterest.ktlint.Main\">\n<!-- Note: the JVM arg below is only required when running ktlint with Java 16+ in format mode.\n <jvmarg value=\"--add-opens=java.base/java.lang=ALL-UNNAMED\"/>\n -->\n<!-- see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information -->\n<arg value=\"src/**/*.kt\"/>\n</java>\n</target>\n</configuration>\n<goals>\n<goal>run</goal>\n</goals>\n</execution>\n<execution>\n<id>ktlint-format</id>\n<configuration>\n<target name=\"ktlint\">\n<java taskname=\"ktlint\" dir=\"${basedir}\" fork=\"true\" failonerror=\"true\"\nclasspathref=\"maven.plugin.classpath\" classname=\"com.pinterest.ktlint.Main\">\n<!-- Note: the JVM args below is only required when running ktlint with Java 16+ in format mode -->\n<jvmarg value=\"--add-opens=java.base/java.lang=ALL-UNNAMED\"/>\n<!-- see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information -->\n<arg value=\"-F\"/>\n<arg value=\"src/**/*.kt\"/>\n</java>\n</target>\n</configuration>\n<goals>\n<goal>run</goal>\n</goals>\n</execution>\n</executions>\n<dependencies>\n<dependency>\n<groupId>com.pinterest</groupId>\n<artifactId>ktlint</artifactId>\n<version>0.49.1</version>\n</dependency>\n<!-- additional 3rd party ruleset(s) can be specified here -->\n</dependencies>\n</plugin>\n...\n</code></pre> <p>Tip</p> <p>If you want ktlint to run before code compilation takes place - change <code><phase>verify</phase></code> to <code><phase>validate</phase></code> (see Maven Build Lifecycle for more).</p> <p>ktlint-maven-plugin</p> <p>You might be interested to use the dedicated gantsign/ktlint-maven-plugin.</p>"},{"location":"install/integrations/#gradle-integration","title":"Gradle integration","text":""},{"location":"install/integrations/#jlleitschuhktlint-gradle","title":"jlleitschuh/ktlint-gradle","text":"<p>The jlleitschuh/ktlint-gradle Gradle plugin automatically creates check and format tasks for project Kotlin sources. It supports different kotlin plugins and Gradle build caching.</p>"},{"location":"install/integrations/#jeremymailenkotlinter-gradle","title":"jeremymailen/kotlinter-gradle","text":"<p>The jeremymailen/kotlinter-gradle Gradle plugin features incremental build support, file reports, and <code>*.kts</code> source support.</p>"},{"location":"install/integrations/#diffplugspotless","title":"diffplug/spotless","text":"<p>The diffplug/spotless Gradle plugin is a general-purpose formatting plugin which amongst many others also supports <code>ktlint</code>.</p>"},{"location":"install/integrations/#autostyleautostyle","title":"autostyle/autostyle","text":"<p>The autostyle/autostyle Gradle plugin is a general-purpose formatting plugin which amongst others also supports <code>ktlint</code>. </p>"},{"location":"install/integrations/#custom-gradle-integration","title":"Custom Gradle integration","text":""},{"location":"install/integrations/#custom-gradle-integration-with-groovy","title":"Custom Gradle integration with Groovy","text":"<p>Warning</p> <p>It is recommended to use one of the Gradle plugins mentioned before.</p> <p>The configuration below, defines following task:</p> <ul> <li>The <code>ktlintCheck</code> is bound to the Gradle check task. It can also be executed with command <code>./gradlew ktlintCheck</code>.</li> <li>The <code>ktlintFormat</code> task is not bound to any other task. It can be executed with command <code>./gradlew ktlintFormat</code>.</li> </ul> build.gradle<pre><code>// kotlin-gradle-plugin must be applied for configuration below to work\n// (see https://kotlinlang.org/docs/reference/using-gradle.html)\nplugins {\nid 'java'\n}\nrepositories {\nmavenCentral()\n}\nconfigurations {\nktlint\n}\ndependencies {\nktlint(\"com.pinterest:ktlint:0.49.1\") {\nattributes {\nattribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))\n}\n}\n// additional 3rd party ruleset(s) can be specified here\n// just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and \n// ktlint will pick them up\n}\ntasks.register(\"ktlintCheck\", JavaExec) {\ngroup = \"verification\"\ndescription = \"Check Kotlin code style.\"\nclasspath = configurations.ktlint\nmainClass = \"com.pinterest.ktlint.Main\"\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\ntasks.named(\"check\") {\ndependsOn tasks.named(\"ktlintCheck\")\n}\ntasks.register(\"ktlintFormat\", JavaExec) {\ngroup = \"formatting\"\ndescription = \"Fix Kotlin code style deviations.\"\nclasspath = configurations.ktlint\nmainClass = \"com.pinterest.ktlint.Main\"\njvmArgs \"--add-opens=java.base/java.lang=ALL-UNNAMED\"\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs \"-F\", \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\n</code></pre> <p>See Making your Gradle tasks incremental by Niklas Baudy on how to make tasks above incremental.</p>"},{"location":"install/integrations/#custom-gradle-integration-with-kotlin-dsl","title":"Custom Gradle integration with Kotlin DSL","text":"<p>Warning</p> <p>It is recommended to use one of the Gradle plugins mentioned before.</p> <p>The configuration below, defines following task:</p> <ul> <li>The <code>ktlintCheck</code> is bound to the Gradle check task. It can also be executed with command <code>./gradlew ktlintCheck</code>.</li> <li>The <code>ktlintFormat</code> task is not bound to any other task. It can be executed with command <code>./gradlew ktlintFormat</code>.</li> </ul> build.gradle.kts<pre><code>val ktlint by configurations.creating\ndependencies {\nktlint(\"com.pinterest:ktlint:0.49.1\") {\nattributes {\nattribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))\n}\n}\n// ktlint(project(\":custom-ktlint-ruleset\")) // in case of custom ruleset\n}\nval ktlintCheck by tasks.registering(JavaExec::class) {\ngroup = LifecycleBasePlugin.VERIFICATION_GROUP\ndescription = \"Check Kotlin code style\"\nclasspath = ktlint\nmainClass.set(\"com.pinterest.ktlint.Main\")\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs(\n\"**/src/**/*.kt\",\n\"**.kts\",\n\"!**/build/**\",\n)\n}\ntasks.check {\ndependsOn(ktlintCheck)\n}\ntasks.register<JavaExec>(\"ktlintFormat\") {\ngroup = LifecycleBasePlugin.VERIFICATION_GROUP\ndescription = \"Check Kotlin code style and format\"\nclasspath = ktlint\nmainClass.set(\"com.pinterest.ktlint.Main\")\njvmArgs(\"--add-opens=java.base/java.lang=ALL-UNNAMED\")\n// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\nargs(\n\"-F\",\n\"**/src/**/*.kt\",\n\"**.kts\",\n\"!**/build/**\",\n)\n}\n</code></pre>"},{"location":"install/integrations/#gnu-emacs-integration","title":"GNU Emacs integration","text":"<p>See whirm/flycheck-kotlin.</p>"},{"location":"install/integrations/#vim-integration","title":"Vim integration","text":"<p>See w0rp/ale.</p>"},{"location":"install/integrations/#mega-linter-integration","title":"Mega-Linter integration","text":"<p>The Mega-Linter integrates 70+ linters in a single tool for CI, including ktlint activated out of the box</p>"},{"location":"install/integrations/#other-integration","title":"Other integration","text":"<p>Do you know any other integration with <code>ktlint</code> then please create a PR to add this integration to our documentation.</p>"},{"location":"install/overview/","title":"Overview","text":"<p>See command line interface or integrations for details on installing the latest release of <code>ktlint</code>.</p>"},{"location":"install/overview/#online-demo","title":"Online demo","text":"<p>See <code>ktlint</code> online if you want to try-out 'ktlint'. This online version compares rule sets provided by <code>ktlint</code> and <code>diktat</code> (a layer on top of <code>ktlint</code>). To contribute to or get more info about <code>ktlint</code> online, please visit the GitHub repository.</p>"},{"location":"install/snapshot-build/","title":"Snapshot build","text":""},{"location":"install/snapshot-build/#access-to-the-latest-master-snapshot","title":"Access to the latest <code>master</code> snapshot","text":"<p>Whenever a commit is added to the <code>master</code> branch a snapshot build is automatically uploaded to Sonatype's snapshots repository. If you are eager to try upcoming changes (that might or might not be included in the next stable release) you can do so by changing version of ktlint to <code><latest-version>-SNAPSHOT</code> + adding a repo:</p>"},{"location":"install/snapshot-build/#maven","title":"Maven","text":"<pre><code>...\n<repository>\n<id>sonatype-snapshots</id>\n<url>https://oss.sonatype.org/content/repositories/snapshots</url>\n<snapshots>\n<enabled>true</enabled>\n</snapshots>\n<releases>\n<enabled>false</enabled>\n</releases>\n</repository>\n...\n</code></pre>"},{"location":"install/snapshot-build/#gradle","title":"Gradle","text":"<pre><code>repositories {\nmaven {\nurl \"https://oss.sonatype.org/content/repositories/snapshots\"\n}\n}\n</code></pre>"},{"location":"install/snapshot-build/#kotlin-development-version-snapshot","title":"Kotlin development version snapshot","text":"<p>Additionally, project publishes snapshots build against latest kotlin development version. To use them, change version of ktlint to <code><latest-version>-kotlin-dev-SNAPSHOT</code>.</p>"},{"location":"rules/","title":"Index","text":"<p>= Rules</p>"},{"location":"rules/code-styles/","title":"Code styles","text":"<p>In ktlint <code>0.49</code> the new code style <code>ktlint_official</code> is introduced. This code style is work in progress but will become the default code style in the <code>1.0</code> release. Please try out the new code style and provide your feedback via the issue tracker.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre> <p>This <code>ktlint_official</code> code style combines the best elements from the Kotlin Coding conventions and Android's Kotlin styleguide. This code style also provides additional formatting on topics which are not (explicitly) mentioned in those conventions and style guide.</p> <p>Note</p> <p>Be aware that this code style in some cases formats code in a way which is not accepted by the default code formatters in IntelliJ IDEA and Android Studio. The formatters of those editors produce nicely formatted code in the vast majority of cases. But in a number of edge cases, the formatting contains bugs which are waiting to be fixed for several years. The new code style formats code in a way which is compatible with the default formatting of the editors whenever possible. When using this codestyle, it is best to disable (e.g. not use) code formatting in the editor.</p> <p>The existing code styles have been renamed to make more clear what the basis of the code style is.</p> <ul> <li> <p>The <code>official</code> code style has been renamed to <code>intellij_idea</code>. Code formatted with this code style aims to be compatible with default formatter of IntelliJ IDEA. This code style is based on Kotlin Coding conventions. If <code>.editorconfig</code> property <code>ktlint_code_style</code> has been set to <code>official</code> then do not forget to change the value of that property to <code>intellij_idea</code>. When not set, this is still the default code style of ktlint <code>0.49</code>. Be aware that the default code style will be changed to <code>ktlint_official</code> in the <code>1.0</code> release.</p> </li> <li> <p>Code style <code>android</code> has been renamed to <code>android_studio</code>. Code formatted with this code style aims to be compatible with default formatter of Android Studio. This code style is based on Android's Kotlin styleguide. If <code>.editorconfig</code> property <code>ktlint_code_style</code> has been set to <code>android</code> then do not forget to change the value of that property to <code>android_studio</code>.</p> </li> </ul>"},{"location":"rules/configuration-intellij-idea/","title":"IntelliJ IDEA configuration","text":"<p>Warning</p> <p><code>ktlint</code> strives to prevent code formatting conflicts with IntelliJ IDEA / Android Studio. We recommend using either IDE formatting or <code>ktlint</code> formatting. However, if you persist on using both, then please ensure that the formatting settings are aligned as described below. This reduces the chance that code which is formatted by ktlint conflicts with formatting by the IntelliJ IDEA built-in formatter.</p> <p>Note</p> <p>IntelliJ IDEA supports the kotlin coding conventions. As of version 0.47.x of ktlint, the support to overwrite some configuration files of IntelliJ IDEA has been dropped as it no longer fits the scope of the project. </p> <p>Steps:</p> <ol> <li>Go to your project directory</li> <li>Create or replace file <code>.idea/codeStyles/codeStyleConfig.xml</code> with content below: <pre><code><component name=\"ProjectCodeStyleConfiguration\">\n<state>\n<option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n</state>\n</component>\n</code></pre></li> <li>Create or replace file <code>.idea/codeStyles/Project.xml</code> with content below: <pre><code><component name=\"ProjectCodeStyleConfiguration\">\n<code_scheme name=\"Project\" version=\"173\">\n<JetCodeStyleSettings>\n<option name=\"PACKAGES_TO_USE_STAR_IMPORTS\">\n<value />\n</option>\n<option name=\"NAME_COUNT_TO_USE_STAR_IMPORT\" value=\"2147483647\" />\n<option name=\"NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS\" value=\"2147483647\" />\n<option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n</JetCodeStyleSettings>\n<codeStyleSettings language=\"kotlin\">\n<option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n</codeStyleSettings>\n</code_scheme>\n</component>\n</code></pre></li> </ol>"},{"location":"rules/configuration-ktlint/","title":"KtLint configuration","text":"<p>Ktlint uses a limited set of <code>.editorconfig</code> properties for additional configuration. A sensible default value is provided for each property when not explicitly defined. Properties can be overridden, provided they are specified under <code>[*.{kt,kts}]</code>. Ktlint uses some properties defined by .editorconfig, IntelliJ IDEA and custom properties.</p> <p>Danger</p> <p>Unfortunately IntelliJ IDEA has an autoformat issue regarding <code>.editorconfig</code>. Due to this error an additional space is added between glob statements, resulting in <code>[*{kt, kts}]</code> instead of <code>[*{kt,kts}]</code>. The <code>.editorconfig</code> library used by <code>ktlint</code> ignores sections after encountering a space in the list. As a result, the rule is not applied on all files as documented in the original ktlint issue.</p>"},{"location":"rules/configuration-ktlint/#code-style","title":"Code style","text":"<p>By default, the <code>intellij_idea</code> Kotlin code style is applied. Alternatively, the code style can be set to <code>ktlint_official</code> or <code>android</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre> <p>Note</p> <p>The default code style will be changed to <code>ktlint_official</code> in the <code>1.0</code> version of ktlint.</p>"},{"location":"rules/configuration-ktlint/#disabled-rules","title":"Disabled rules","text":"<p>Note</p> <p>Support of properties <code>disabled_rules</code> and <code>ktlint_disabled_rules</code> has been removed in KtLint <code>0.49</code>.</p> <p>Rule sets and individual rules can be disabled / enabled with a separate property per rule (set).</p> <p>All rules in a rule set can be enabled or disabled with a rule set property. The name of the rule set property consists of the <code>ktlint_</code> prefix followed by the rule set id. Examples: <pre><code>ktlint_standard = disabled # Disable all rules from the `standard` rule set provided by KtLint\nktlint_experimental = enabled # Enable all `experimental` rules from all rule sets provided by KtLint or other rule providers\nktlint_custom-rule-set = enabled # Enable all rules in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Rules that are marked as experimental will not be run, unless explicitly enabled: <pre><code>ktlint_experimental = enabled # Enable rules marked as experimental for all rule sets that are enabled\n</code></pre></p> <p>An individual rule can be enabled or disabled with a rule property. The name of the rule property consists of the <code>ktlint_</code> prefix followed by the rule set id followed by a <code>_</code> and the rule id. Examples: <pre><code>ktlint_standard_final-newline = disabled # Disables the `final-newline` rule provided by KtLint\nktlint_standard_some-experimental-rule = enabled # Enables the (experimental) `some-experimental-rule` in the `standard` rule set provided by KtLint\nktlint_custom-rule-set_custom-rule = disabled # Disables the `custom-rule` rule in the `custom-rule-set` rule set (not provided by KtLint)\n</code></pre></p> <p>Note</p> <p>The rule properties are applied after applying the rule set properties and take precedence. So if a rule set is disabled but a specific rule of that rule set is enabled, then the rule will be executed.</p>"},{"location":"rules/configuration-ktlint/#final-newline","title":"Final newline","text":"<p>By default, a final newline is required at the end of the file.</p> <pre><code>[*.{kt,kts}]\ninsert_final_newline = true\n</code></pre> <p>This setting only takes effect when rule <code>final-newline</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#force-multiline-function-signature-based-on-number-of-parameters","title":"Force multiline function signature based on number of parameters","text":"<p>Setting <code>ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> forces a multiline function signature in case the function contains the specified minimum number of parameters even in case the function signature would fit on a single line. Use value <code>unset</code> (default) to disable this setting.</p> <p>Note</p> <p>By default, the <code>ktlint_official</code> code style wraps parameters of functions having at least 2 parameters. For other code styles, this setting is disabled by default. </p> <pre><code>[*.{kt,kts}]\nktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than=unset\n</code></pre> <p>This setting only takes effect when rule <code>function-signature</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#wrapping-the-expression-body-of-a-function","title":"Wrapping the expression body of a function","text":"<p>Setting <code>ktlint_function_signature_body_expression_wrapping</code> determines if and when the expression body of a function is wrapped to a new line. This setting can be set to value <code>default</code>, <code>multiline</code> or <code>always</code>. </p> <p>When set to <code>default</code>, the first line of a body expression is appended to the function signature as long as the max line length is not exceeded.</p> ktlint_function_signature_body_expression_wrapping=default (or when not set)<pre><code>// Given that the function signature has to be written as a single line function signature\nfun someFunction(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n// Given that the function signature has to be written as a multiline function signature\nfun someFunction(\na: Any,\nb: Any\n): String = \"some-result\"\n.uppercase()\n</code></pre> <p>When set to <code>multiline</code>, the body expression starts on a separate line in case it is a multiline expression. A single line body expression is wrapped only when it does not fit on the same line as the function signature.</p> ktlint_function_signature_body_expression_wrapping=multiline<pre><code>// Given a single line body expression and\n// a the function signature that has to be written as a single line function signature and\n// it does not exceed the max line length\nfun someFunction(a: Any, b: Any): String = \"some-result\".uppercase()\n// Given a single line body expression and\n// a the function signature that has to be written as a multiline function signature and\n// it does not exceed the max line length\nfun someFunction(\na: Any,\nb: Any\n): String = \"some-result\".uppercase()\n// Given a single line body expression then always wrap it to a separate line\nfun someFunction(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\nfun someFunction(\na: Any,\nb: Any\n): String =\n\"some-result\"\n.uppercase()\n</code></pre> <p>When set to <code>always</code> the body expression is always wrapped to a separate line.</p> ktlint_function_signature_body_expression_wrapping=always<pre><code>fun someFunction(a: Any, b: Any): String =\n\"some-result\".uppercase()\nfun functionWithAVeryLongName(\na: Any,\nb: Any\n): String =\n\"some-result\"\n.uppercase()\n</code></pre> <p>This setting only takes effect when rule <code>function-signature</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#ignore-identifiers-enclosed-in-backticks","title":"Ignore identifiers enclosed in backticks","text":"<p>By default, the identifiers enclosed in backticks are not ignored.</p> <p>According to Kotlin coding conventions it is acceptable to write method names in natural language. When using natural language, the description tends to be longer. This property allows lines containing an identifier between backticks to be longer than the maximum line length. (Since 0.41.0)</p> <pre><code>@Test\nfun `Given a test with a very loooooooooooooooooooooong test description`() {\n}\n</code></pre> <pre><code>[*.{kt,kts}]\nktlint_ignore_back_ticked_identifier = false\n</code></pre> <p>This setting only takes effect when rule <code>max-line-length</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#import-layouts","title":"Import layouts","text":"<p>By default, the same imports are allowed as in IntelliJ IDEA. The import path can be a full path, e.g. \"java.util.List.\" as well as wildcard path, e.g. \"kotlin.*\".</p> <p>The layout can be composed by the following symbols:</p> <ul> <li><code>*</code> - wildcard. There must be at least one entry of a single wildcard to match all other imports. Matches anything after a specified symbol/import as well.</li> <li><code>|</code> - blank line. Supports only single blank lines between imports. No blank line is allowed in the beginning or end of the layout.</li> <li><code>^</code> - alias import, e.g. \"^android.*\" will match all android alias imports, \"^\" will match all other alias imports.</li> </ul> <p>Examples: <pre><code>ij_kotlin_imports_layout=* # alphabetical with capital letters before lower case letters (e.g. Z before a), no blank lines\nij_kotlin_imports_layout=*,java.**,javax.**,kotlin.**,^ # default IntelliJ IDEA style, same as alphabetical, but with \"java\", \"javax\", \"kotlin\" and alias imports in the end of the imports list\nij_kotlin_imports_layout=android.**,|,^org.junit.**,kotlin.io.Closeable.*,|,*,^ # custom imports layout\n</code></pre></p> <p>Wildcard imports can be allowed for specific import paths (Comma-separated list, use \"**\" as wildcard for package and all subpackages). This setting overrides the no-wildcard-imports rule. This setting is best be used for allowing wildcard imports from libraries like Ktor where extension functions are used in a way that creates a lot of imports.</p> <pre><code>[*.{kt,kts}]\nij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**\n</code></pre> <p>This setting only takes effect when rule <code>no-wildcard-imports</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#indent-size-style","title":"Indent size & style","text":"<p>By default, indenting is done with 4 spaces per indent level. Code style <code>android_studio</code> uses a tab per indent level.</p> <pre><code>[*.{kt,kts}]\nindent_size = 4 # possible values: number (e.g. 2), \"unset\" (makes ktlint ignore indentation completely) \nindent_style = space # or \"tab\"\n</code></pre> <p>Those settings are used by multiple rules of which rule <code>indent</code> is the most important.</p>"},{"location":"rules/configuration-ktlint/#max-line-length","title":"Max line length","text":"<p>By default, the maximum line length is not set. The <code>android</code> code style sets the max line length to 100 (per Android Kotlin Style Guide).</p> <pre><code>[*.{kt,kts}]\nmax_line_length = off # Use \"off\" to ignore max line length or a positive number to set max line length\n</code></pre> <p>This setting is used by multiple rules of which rule <code>max-line-length</code> is the most important.</p>"},{"location":"rules/configuration-ktlint/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma_on_call_site</code> to enforce the usage of the trailing comma at call site when enabled. IntelliJ IDEA uses this property to allow the use of trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on call site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>Although the Kotlin coding conventions leaves it to the developer's discretion to use trailing commas on the call site, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Example: <pre><code>[*.{kt,kts}]\nij_kotlin_allow_trailing_comma_on_call_site = false\n</code></pre></p> <p>This setting only takes effect when rule <code>trailing-comma-on-call-site</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma</code> to enforce the usage of the trailing comma at declaration site when enabled. IntelliJ IDEA uses this property to allow the use of trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on declaration site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>The Kotlin coding conventions encourages the usage of trailing commas on the declaration site, but leaves it to the developer's discretion to use trailing commas on the call site. But next to this, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Example: <pre><code>[*.{kt,kts}]\nij_kotlin_allow_trailing_comma = false # Only used for declaration site \n</code></pre></p> <p>This setting only takes effect when rule <code>trailing-comma-on-declaration-site</code> is enabled.</p>"},{"location":"rules/configuration-ktlint/#overriding-editorconfig-properties-for-specific-directories","title":"Overriding Editorconfig properties for specific directories","text":"<p>You can override properties for specific directories inside your project: <pre><code>[*.{kt,kts}]\nktlint_standard_import-ordering = disabled\n[api/*.{kt,kts}]\nktlint_standard_indent = disabled\n</code></pre></p> <p>Note that the <code>import-ordering</code> rule is disabled for all packages including the <code>api</code> sub package. Next to this the <code>indent</code> rule is disabled for the <code>api</code> package and its sub packages.</p>"},{"location":"rules/dependencies/","title":"Dependencies","text":"<p>Preferably rules run independent of each other. In some case this is however not feasible. The diagram below shows the dependencies between the rules provided by KtLint.</p> <p></p>"},{"location":"rules/experimental/","title":"Experimental rules","text":"<p>Important</p> <p>Up and until Ktlint version <code>0.47</code>, experimental were located in a separate <code>experimental</code> rule set. As of Ktlint version <code>0.48</code>, each rule set can optionally define experimental rules.</p> <p>All experimental rules described below are part of the <code>standard</code> rule set of Ktlint. To enable all experimental rules (from all rule sets), set <code>editorconfig</code> property below: <pre><code>[*.{kt,kts}]\nktlint_experimental=enabled\n</code></pre> Also see enable/disable specific rules.</p>"},{"location":"rules/experimental/#binary-expression-wrapping","title":"Binary expression wrapping","text":"<p>Wraps binary expression at the operator reference whenever the binary expression does not fit on the line. In case the binary expression is nested, the expression is evaluated from outside to inside. If the left and right hand sides of the binary expression, after wrapping, fit on a single line then the inner binary expressions will not be wrapped. If one or both inner binary expression still do not fit on a single after wrapping of the outer binary expression, then each of those inner binary expressions will be wrapped.</p> Ktlint Disallowed <pre><code>fun foo() {\n// Assume that the last allowed character is\n// at the X character on the right X\nif ((leftHandSideExpression && rightHandSideExpression) ||\n(leftHandSideLongExpression &&\nrightHandSideLongExpression)) {\n// do something\n}\n}\n</code></pre> <pre><code>fun foo() {\n// Assume that the last allowed character is\n// at the X character on the right X\nif ((leftHandSideExpression && rightHandSideExpression) || (leftHandSideLongExpression && rightHandSideLongExpression)) {\n// do something\n}\n}\n</code></pre> <p>Rule id: <code>binary-expression-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#blank-line-before-declarations","title":"Blank line before declarations","text":"<p>Requires a blank line before any class or function declaration. No blank line is required between the class signature and the first declaration in the class. In a similar way, a blank line is required before any list of top level or class properties. No blank line is required before local properties or between consecutive properties.</p> Ktlint Disallowed <pre><code>const val foo1 = \"foo1\"\nclass FooBar {\nval foo2 = \"foo2\"\nval foo3 = \"foo3\"\nfun bar1() {\nval foo4 = \"foo4\"\nval foo5 = \"foo5\"\n}\nfun bar2() = \"bar\"\nval foo6 = \"foo3\"\nval foo7 = \"foo4\"\nenum class Foo {}\n}\n</code></pre> <pre><code>const val foo1 = \"foo1\"\nclass FooBar {\nval foo2 = \"foo2\"\nval foo3 = \"foo3\"\nfun bar1() {\nval foo4 = \"foo4\"\nval foo5 = \"foo5\"\n}\nfun bar2() = \"bar\"\nval foo6 = \"foo3\"\nval foo7 = \"foo4\"\nenum class Foo {}\n}\n</code></pre> <p>Rule id: <code>blank-line-before-declaration</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#discouraged-comment-location","title":"Discouraged comment location","text":"<p>Detect discouraged comment locations (no autocorrect).</p> <p>Note</p> <p>Kotlin allows comments to be placed almost everywhere. As this can lead to code which is hard to read, most of them will never be used in practice. Ideally each rule takes comments at all possible locations into account. Sometimes this is really hard and not worth the effort. By explicitly forbidding such comment locations, the development of those rules becomes a bit easier. </p> Disallowed <pre><code>fun <T> /* some comment */ foo(t: T) = \"some-result\"\nfun foo() {\nif (true)\n// some comment\nbar()\n}\n</code></pre> <p>Rule id: <code>discouraged-comment-location</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#disallow-empty-lines-at-start-of-class-body","title":"Disallow empty lines at start of class body","text":"<p>Detect blank lines at start of a class body.</p> Ktlint Disallowed <pre><code>class Foo {\nval foo = \"foo\"\n}\n</code></pre> <pre><code>class Foo {\nval foo = \"foo\"\n}\n</code></pre> <p>Rule id: <code>no-empty-first-line-in-class-body</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#disallow-consecutive-comments","title":"Disallow consecutive comments","text":"<p>Consecutive comments are disallowed in following cases: - Any mix of a consecutive kdoc, a block comment or an EOL comment unless separated by a blank line in between - Consecutive KDocs (even when separated by a blank line) - Consecutive block comments (even when separated by a blank line)</p> <p>Consecutive EOL comments are always allowed as they are often used instead of a block comment.</p> Ktlint Disallowed <pre><code>// An EOL comment\n// may be followed by another EOL comment\nval foo = \"foo\"\n// Different comment types (including KDoc) may be consecutive ..\n/*\n * ... but do need to be separated by a blank line ...\n */\n/**\n * ... but a KDoc can not be followed by an EOL or a block comment or another KDoc\n */\nfun bar() = \"bar\"\n</code></pre> <pre><code>/*\n * Block comments can not be consecutive ...\n */\n/*\n * ... even not when separated by a new line.\n */\nval bar = \"bar\" /**\n * A KDoc can not be followed by a block comment or an EOL comment or another KDOC\n */\n// ... even not when separated by a new line.\n</code></pre> <p>Rule id: <code>no-consecutive-comments</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#function-signature","title":"Function signature","text":"<p>Rewrites the function signature to a single line when possible (e.g. when not exceeding the <code>max_line_length</code> property) or a multiline signature otherwise. In case of function with a body expression, the body expression is placed on the same line as the function signature when not exceeding the <code>max_line_length</code> property. Optionally the function signature can be forced to be written as a multiline signature in case the function has more than a specified number of parameters (<code>.editorconfig</code> property <code>ktlint_function_signature_wrapping_rule_always_with_minimum_parameters</code>)</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nfun foooooooo(\na: Any,\nb: Any,\nc: Any\n): String {\n// body\n}\n// Assume that the last allowed character is\n// at the X character on the right X\nfun bar(a: Any, b: Any, c: Any): String {\n// body\n}\n// When wrapping of body is set to 'default'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n// When wrapping of body is set to 'multiline'\n// or 'always'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nfun foooooooo(a: Any, b: Any, c: Any): String {\n// body\n}\n// Assume that the last allowed character is\n// at the X character on the right X\nfun bar(\na: Any,\nb: Any,\nc: Any\n): String {\n// body\n}\n// When wrapping of body is set to 'default'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String =\n\"some-result\"\n.uppercase()\n// When wrapping of body is set to 'multiline'\n// or 'always'.\n// Assume that the last allowed character is\n// at the X character on the right X\nfun f(a: Any, b: Any): String = \"some-result\"\n.uppercase()\n</code></pre> <p>Rule id: <code>function-signature</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#if-else-bracing","title":"If else bracing","text":"<p>If at least one branch of an if-else statement or an if-else-if statement is wrapped between curly braces then all branches should be wrapped between braces.</p> Ktlint Disallowed <pre><code>fun foo(value: int) {\nif (value > 0) {\ndoSomething()\n} else if (value < 0) {\ndoSomethingElse()\n} else {\ndoSomethingElse2()\n}\n}\n</code></pre> <pre><code>fun foo(value: int) {\nif (value > 0)\ndoSomething()\nelse if (value < 0) {\ndoSomethingElse()\n} else\ndoSomethingElse2()\n}\n</code></pre> <p>Rule id: <code>if-else-bracing</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#if-else-wrapping","title":"If else wrapping","text":"<p>A single line if-statement should be kept simple. It may contain no more than one else-branch. The branches may not be wrapped in a block.</p> Ktlint Disallowed <pre><code>fun foobar() {\nif (true) foo()\nif (true) foo() else bar()\n}\n</code></pre> <pre><code>fun foobar() {\nif (true) if (false) foo() else bar()\nif (true) bar() else if (false) foo() else bar()\nif (true) { foo() } else bar()\nif (true) bar() else { if (false) foo() else bar() }\n}\n</code></pre> <p>Rule id: <code>if-else-wrapping</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#naming","title":"Naming","text":""},{"location":"rules/experimental/#function-naming","title":"Function naming","text":"<p>Enforce naming of function. </p> Ktlint Ktlint Test Disallowed <pre><code>fun foo() {}\nfun fooBar() {}\n</code></pre> <pre><code>@Test\nfun `Some name`() {}\n@Test\nfun do_something() {}\n</code></pre> <pre><code>fun Foo() {}\nfun Foo_Bar() {}\nfun `Some name`() {}\nfun do_something() {}\n</code></pre> <p>Note</p> <p>Functions in files which import a class from package <code>org.junit</code>, <code>org.testng</code> or <code>kotlin.test</code> are considered to be test functions. Functions in such classes are allowed to have underscores in the name. Or function names can be specified between backticks and do not need to adhere to the normal naming convention.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>FunctionName</code>.</p> <p>Rule id: <code>function-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#package-naming","title":"Package naming","text":"<p>Enforce naming of package.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>PackageName</code>.</p> Ktlint Disallowed <pre><code>package foo\npackage foo.foo\npackage foo_bar\npackage foo.foo_bar\n</code></pre> <pre><code>package Foo\npackage foo.Foo\npackage `foo bar`\npackage foo.`foo bar`\n</code></pre> <p>Rule id: <code>package-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#property-naming","title":"Property naming","text":"<p>Enforce naming of property.</p> Ktlint Disallowed <pre><code>val FOO_1 = Foo()\nval FOO_BAR_1 = \"FOO-BAR\"\nvar foo1: Foo = Foo()\nclass Bar {\nconst val FOO_2 = \"foo\"\nconst val FOO_BAR_2 = \"FOO-BAR\"\nval foo2 = \"foo\"\nval fooBar2 = \"foo-bar\"\n// Backing property\nprivate val _elementList = mutableListOf<Element>()\nval elementList: List<Element>\nget() = _elementList\n}\n</code></pre> <pre><code>val Foo1 = Foo()\nval FooBar1 = \"FOO-BAR\"\nvar FOO_1: Foo = Foo()\nclass Bar {\nconst val foo2 = \"foo\"\nconst val fooBar2 = \"FOO-BAR\"\nval FOO2 = \"foo\"\nval FOO_BAR_2 = \"foo-bar\"\n// Incomplete backing property as public property 'elementList1' is missing\nprivate val _elementList1 = mutableListOf<Element>()\n// Invalid backing property as '_elementList2' is not a private property\nval _elementList2 = mutableListOf<Element>()\nval elementList2: List<Element>\nget() = _elementList2\n}\n</code></pre> <p>Note</p> <p>Top level <code>val</code> properties and <code>const val</code> properties have to be written in screaming snake notation. Local <code>val</code> and <code>const val</code> are written in lower camel case.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>PropertyName</code>.</p> <p>Rule id: <code>property-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#no-empty-file","title":"No empty file","text":"<p>A kotlin (script) file should not be empty. It needs to contain at least one declaration. Files only contain a package and/or import statements are as of that disallowed.</p> <p>Rule id: <code>no-empty-file</code></p>"},{"location":"rules/experimental/#no-single-line-block-comments","title":"No single line block comments","text":"<p>A single line block comment should be replaced with an EOL comment when possible.</p> Ktlint Disallowed <pre><code>/*\n * Some comment\n */\nval foo = \"foo\" // Some comment\nval foo = { /* no-op */ }\n</code></pre> <pre><code>/* Some comment */\nval foo = \"foo\" /* Some comment */\n</code></pre> <p>Rule id: <code>no-single-line-block-comment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#spacing","title":"Spacing","text":""},{"location":"rules/experimental/#no-blank-lines-in-list","title":"No blank lines in list","text":"<p>Disallow blank lines to be used in lists before the first element, between elements, and after the last element.</p> <p>Super type</p> Ktlint Disallowed <pre><code>class FooBar:\nFoo,\nBar {\n// body\n}\n</code></pre> <pre><code>class FooBar:\nFoo,\nBar\n{\n// body\n}\n</code></pre> <p>Type argument list</p> Ktlint Disallowed <pre><code>val foobar: FooBar<\nFoo,\nBar,\n> = FooBar(Foo(), Bar())\n</code></pre> <pre><code>val foobar: FooBar<\nFoo,\nBar,\n> = FooBar(Foo(), Bar())\n</code></pre> <p>Type constraint list</p> Ktlint Disallowed <pre><code>class BiAdapter<C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2>(\nval adapter1: A1,\nval adapter2: A2\n) : RecyclerView.Adapter<C>()\nwhere A1 : RecyclerView.Adapter<V1>, A1 : ComposableAdapter.ViewTypeProvider,\nA2 : RecyclerView.Adapter<V2>, A2 : ComposableAdapter.ViewTypeProvider {\n// body\n}\n</code></pre> <pre><code>class BiAdapter<C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2>(\nval adapter1: A1,\nval adapter2: A2\n) : RecyclerView.Adapter<C>()\nwhere\nA1 : RecyclerView.Adapter<V1>, A1 : ComposableAdapter.ViewTypeProvider,\nA2 : RecyclerView.Adapter<V2>, A2 : ComposableAdapter.ViewTypeProvider\n{\n// body\n}\n</code></pre> <p>Type parameter list</p> Ktlint Disallowed <pre><code>fun <\nFoo,\nBar,\n> foobar()\n</code></pre> <pre><code>fun <\nFoo,\nBar,\n> foobar()\n</code></pre> <p>Value argument list</p> Ktlint Disallowed <pre><code>val foobar = foobar(\n\"foo\",\n\"bar\",\n)\n</code></pre> <pre><code>val foobar = foobar(\n\"foo\",\n\"bar\",\n)\n</code></pre> <p>Value parameter list</p> Ktlint Disallowed <pre><code>fun foobar(\nfoo: String,\nbar: String,\n)\n</code></pre> <pre><code>fun foobar(\nfoo: String,\nbar: String,\n)\n</code></pre> <p>Rule id: <code>no-blank-line-in-list</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#parameter-list-spacing","title":"Parameter list spacing","text":"<p>Consistent spacing inside the parameter list.</p> Ktlint Disallowed <pre><code>fun foo(a: Any ) = \"some-result\"\nfun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo( a : Any ) = \"some-result\"\nfun foo(\n) = \"some-result\"\n</code></pre> <p>Rule id: <code>parameter-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#string-template-indent","title":"String template indent","text":"<p>Enforce consistent string template indentation for multiline string templates which are post-fixed with <code>.trimIndent()</code>. The opening and closing <code>\"\"\"</code> are placed on separate lines and the indentation of the content of the template is aligned with the <code>\"\"\"</code>.</p> Ktlint Disallowed <pre><code>val foo =\n\"\"\"\n line1\n line2\n \"\"\".trimIndent()\nfun foo() {\n// The opening \"\"\" can not be wrapped to next line as that would result in a compilation error\nreturn \"\"\"\n line1\n line2\n \"\"\".trimIndent()\n}\n</code></pre> <pre><code>val foo = \"\"\"\n line1\n line2\n \"\"\".trimIndent()\nfun foo() {\nreturn \"\"\"\n line1\n line2\n \"\"\".trimIndent()\n}\n</code></pre> <p>Rule id: <code>string-template-indent</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#try-catch-finally-spacing","title":"Try catch finally spacing","text":"<p>Enforce consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p> Ktlint Disallowed <pre><code>fun foo() =\ntry {\n// do something\n} catch (exception: Exception) {\n// handle exception\n} finally {\n// clean up\n}\n</code></pre> <pre><code>fun foo1() = try { /* ... */ } catch (exception: Exception) { /* ... */ } finally { /* ... */ }\nfun foo2() = try {\n// do something\n}\ncatch (exception: Exception) {\n// handle exception\n}\nfinally {\n// clean up\n}\n</code></pre> <p>Rule id: <code>try-catch-finally-spacing</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#type-argument-list-spacing","title":"Type argument list spacing","text":"<p>Spacing before and after the angle brackets of a type argument list.</p> Ktlint Disallowed <pre><code>val res = ArrayList<LintError>()\nclass B<T> : A<T>() {\noverride fun x() = super<A>.x()\n}\n</code></pre> <pre><code>val res = ArrayList < LintError > ()\nclass B<T> : A< T >() {\noverride fun x() = super< A >.x()\n}\n</code></pre> <p>Rule id: <code>type-argument-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#type-parameter-list-spacing","title":"Type parameter list spacing","text":"<p>Spacing after a type parameter list in function and class declarations.</p> Ktlint Disallowed <pre><code>fun <T> foo1(t: T) = \"some-result\"\nfun <T> foo2(t: T) = \"some-result\"\nfun <T> foo3(t: T) = \"some-result\"\n</code></pre> <pre><code>fun<T> foo1(t: T) = \"some-result\"\nfun <T>foo2(t: T) = \"some-result\"\nfun<T>foo3(t: T) = \"some-result\"\n</code></pre> <p>Rule id: <code>type-parameter-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#wrapping","title":"Wrapping","text":""},{"location":"rules/experimental/#content-receiver-wrapping","title":"Content receiver wrapping","text":"<p>Wraps the content receiver list to a separate line regardless of maximum line length. If the maximum line length is configured and is exceeded, wrap the context receivers and if needed its projection types to separate lines.</p> Ktlint Disallowed <pre><code>// ALways wrap regardless of whether max line length is set\ncontext(Foo)\nfun fooBar()\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\nFooooooooooooooooooo1,\nFoooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line.\n// Also, wrap each of it projection types in case a context\n// receiver does not fit on a single line after it has been\n// wrapped.\ncontext(\nFoooooooooooooooo<\nFoo,\nBar\n>\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(Foo) fun fooBar()\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(Fooooooooooooooooooo1, Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line. Also, it should wrap each of it projection\n// type in case a context receiver does not fit on a single line \n// after it has been wrapped.\ncontext(Foooooooooooooooo<Foo, Bar>)\nfun fooBar()\n</code></pre> <p>Rule id: <code>context-receiver-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#enum-wrapping","title":"Enum wrapping","text":"<p>An enum should be a single line, or each enum entry has to be placed on a separate line. In case the enumeration contains enum entries and declarations those are to be separated by a blank line.</p> Ktlint Disallowed <pre><code>enum class Foo { A, B, C, D }\nenum class Foo {\nA,\nB,\nC,\nD,\n;\nfun foo() = \"foo\"\n}\n</code></pre> <pre><code>enum class Foo {\nA,\nB, C,\nD\n}\nenum class Foo {\nA;\nfun foo() = \"foo\"\n}\n</code></pre> <p>Rule id: <code>enum-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/experimental/#multiline-expression-wrapping","title":"Multiline expression wrapping","text":"<p>Multiline expression on the right hand side of an expression are forced to start on a separate line. Expressions in return statement are excluded as that would result in a compilation error. </p> Ktlint Disallowed <pre><code>val foo =\nfoo(\nparameterName =\n\"The quick brown fox \"\n.plus(\"jumps \")\n.plus(\"over the lazy dog\"),\n)\n</code></pre> <pre><code>val foo = foo(\nparameterName = \"The quick brown fox \"\n.plus(\"jumps \")\n.plus(\"over the lazy dog\"),\n)\n</code></pre> <p>Rule id: <code>multiline-expression-wrapping</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule is only run when <code>ktlint_code_style</code> is set to <code>ktlint_official</code> or when the rule is enabled explicitly.</p>"},{"location":"rules/experimental/#statement-wrapping","title":"Statement wrapping","text":"<p>A function, class/object body or other block body statement has to be placed on different line than the braces of the body block.</p> Ktlint Disallowed <pre><code>fun foo() {\nif (true) {\n// do something\n}\n}\nclass A {\nval a = 0\nval b = 1\n}\n</code></pre> <pre><code>fun foo() { if (true) {\n// do something\n}\n}\nclass A { val a = 0\nval b = 1 }\n</code></pre> <p>Rule id: <code>statement-wrapping</code></p>"},{"location":"rules/standard/","title":"Standard rules","text":""},{"location":"rules/standard/#annotation-formatting","title":"Annotation formatting","text":"<p>Multiple annotations should be on a separate line than the annotated declaration; annotations with parameters should each be on separate lines; annotations should be followed by a space</p> Ktlint Disallowed <pre><code>// A single annotation (without parameters) is allowed on same line as annotated construct\n@FunctionalInterface class FooBar {\n@JvmField var foo: String\n@Test fun bar() {}\n}\n// A class or function parameter may have a single annotation with parameter(s) on the same line\nclass Foo(@Path(\"fooId\") val fooId: String)\nclass Bar(\n@NotNull(\"fooId\") val fooId: String,\n@NotNull(\"bar\") bar: String\n)\n// Multiple annotations (without parameters) are allowed on the same line\n@Foo @Bar\nclass FooBar {\n@Foo @Bar\nvar foo: String\n@Foo @Bar\nfun bar() {}\n}\n// An array of annotations (without parameters) is allowed on same line as annotated construct\n@[Foo Bar] class FooBar2 {\n@[Foo Bar] var foo: String\n@[Foo Bar] fun bar() {}\n}\n</code></pre> <pre><code>// An annotation with parameter(s) is not allowed on same line as annotated construct\n@Suppress(\"Unused\") class FooBar {\n@Suppress(\"Unused\") var foo: String\n@Suppress(\"Unused\") fun bar() {}\n}\n// Multiple annotation on same line as annotated construct are not allowed\n@Foo @Bar class FooBar {\n@Foo @Bar var foo: String\n@Foo @Bar fun bar() {}\n}\n</code></pre> <p>Rule-id: <code>annotation</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#argument-list-wrapping","title":"Argument list wrapping","text":"<p>All arguments should be on the same line, or every argument should be on a separate line.</p> Ktlint Disallowed <pre><code>val x = f(\na,\nb,\nc\n)\n</code></pre> <pre><code>val x = f(\na,\nb, c\n)\n</code></pre> <p>Rule-id: <code>argument-list-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#block-comment-initial-star-alignment","title":"Block comment initial star alignment","text":"<p>Lines in a block comment which (exclusive the indentation) start with a <code>*</code> should have this <code>*</code> aligned with the <code>*</code> in the opening of the block comment.</p> Ktlint Disallowed <pre><code>/*\n * This comment is formatted well.\n */\n</code></pre> <pre><code>/*\n * This comment is not formatted well.\n */\n</code></pre> <p>Rule id: <code>block-comment-initial-star-alignment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#chain-wrapping","title":"Chain wrapping","text":"<p>When wrapping chained calls <code>.</code>, <code>?.</code> and <code>?:</code> should be placed on the next line</p> Ktlint Disallowed <pre><code>val foo = listOf(1, 2, 3)\n.filter { it > 2 }!!\n.takeIf { it.count() > 100 }\n?.sum()\nval foobar = foo()\n?: bar\n</code></pre> <pre><code>val foo = listOf(1, 2, 3).\nfilter { it > 2 }!!.\ntakeIf { it.count() > 100 }?.\nsum()\nval foobar = foo() ?:\nbar\n</code></pre> <p>Rule id: <code>chain-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#classobject-naming","title":"Class/object naming","text":"<p>Enforce naming of class.</p> Ktlint Ktlint JUnit Test Disallowed <pre><code>class Foo\nclass Foo1\n</code></pre> <pre><code>@Nested\ninner class `Some descriptive class name` {\n@Test\nfun `Some descriptive test name`() {\n// do something\n}\n}\n</code></pre> <pre><code>class foo\nclass Foo_Bar\nclass `Some class in the production code`\n</code></pre> <p>Note</p> <p>Functions in files which import a class from package <code>org.junit.jupiter.api</code> are considered to be test functions and are allowed to have a name specified between backticks and do not need to adhere to the normal naming convention. Although, the Kotlin coding conventions does not allow this explicitly for class identifiers, <code>ktlint</code> does allow it.</p> <p>This rule can also be suppressed with the IntelliJ IDEA inspection suppression <code>ClassName</code>.</p> <p>Rule id: <code>class-naming</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#enum-entry","title":"Enum entry","text":"<p>Enum entry names should be uppercase underscore-separated or upper camel-case separated.</p> Ktlint Disallowed <pre><code>enum class Bar {\nFOO,\nFoo,\nFOO_BAR,\nFooBar\n}\n</code></pre> <pre><code>enum class Bar {\nfoo,\nbAr,\nFoo_Bar,\n}\n</code></pre> <p>Rule id: <code>enum-entry-name-case</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#file-name","title":"File name","text":"<p>A file containing only one visible (e.g. non-private) class, and visible declarations related to that class only, should be named according to that element. The same applies if the file does not contain a visible class but exactly one type alias or one object declaration. Otherwise, the PascalCase notation should be used.</p> <p>Rule id: <code>filename</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#final-newline","title":"Final newline","text":"<p>Ensures consistent usage of a newline at the end of each file. </p> <p>This rule can be configured with <code>.editorconfig</code> property <code>insert_final_newline</code>.</p> <p>Rule id: <code>final-newline</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#import-ordering","title":"Import ordering","text":"<p>Ensures that imports are ordered consistently (see Import Layouts for configuration).</p> Ktlint Disallowed <pre><code>import com.bar.Bar\nimport com.foo.Foo\nimport org.foo.bar.FooBar\nimport java.util.concurrent.ConcurrentHashMap\n</code></pre> <pre><code>import com.bar.Bar\nimport java.util.concurrent.ConcurrentHashMap\nimport org.foo.bar.FooBar\nimport com.foo.Foo\n</code></pre> <p>Rule id: <code>import-ordering</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#indentation","title":"Indentation","text":"<p>Indentation formatting - respects <code>.editorconfig</code> <code>indent_size</code> with no continuation indent (see EditorConfig section for more).</p> Ktlint Disallowed <pre><code>fun main() {\nfoobar(\na,\nb,\nc\n)\n}\n</code></pre> <pre><code>fun main() {\nfoobar(\na,\nb,\nc\n)\n}\n</code></pre> <p>Note</p> <p>This rule handles indentation for many different language constructs which can not be summarized with a few examples. See the unit tests for more details.</p> <p>Rule id: <code>indent</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#ktlint-suppression-rule","title":"Ktlint-suppression rule","text":"<p>The <code>ktlint-disable</code> and <code>ktlint-enable</code> directives are no longer supported as of ktlint version <code>0.50.0</code>. This rule migrates the directives to Suppress or SuppressWarnings annotations.</p> <p>Identifiers in the @Suppress and @SuppressWarnings annotations to suppress ktlint rules are checked for validity and autocorrected when possible. </p> Ktlint Disallowed <pre><code>@file:Suppress(\"ktlint:standard:no-wildcard-imports\")\nclass FooBar {\n@Suppress(\"ktlint:standard:max-line-length\")\nval foo = \"some longggggggggggggggggggg text\"\nfun bar() =\n@Suppress(\"ktlint:standard:no-multi-spaces\")\nlistOf(\n\"1 One\", \"10 Ten\", \"100 Hundred\", )\n}\n</code></pre> <pre><code>/* ktlint-disable standard:no-wildcard-imports */\nclass FooBar {\nval foo = \"some longggggggggggggggggggg text\" // ktlint-disable standard:max-line-length\nfun bar() =\nlistOf(\n/* ktlint-disable standard:no-multi-spaces */\n\"1 One\", \"10 Ten\", \"100 Hundred\", /* ktlint-enable standard:no-multi-spaces */\n)\n}\n</code></pre> <p>Rule id: <code>ktlint-suppression</code> (<code>standard</code> rule set)</p> <p>Note</p> <p>This rule can not be disabled in the <code>.editorconfig</code>.</p>"},{"location":"rules/standard/#max-line-length","title":"Max line length","text":"<p>Ensures that lines do not exceed the given length of <code>.editorconfig</code> property <code>max_line_length</code> (see EditorConfig section for more). This rule does not apply in a number of situations. For example, in the case a line exceeds the maximum line length due to a comment that disables ktlint rules then that comment is being ignored when validating the length of the line. The <code>.editorconfig</code> property <code>ktlint_ignore_back_ticked_identifier</code> can be set to ignore identifiers which are enclosed in backticks, which for example is very useful when you want to allow longer names for unit tests.</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\n// Lines below are accepted although the max\n// line length is exceeded.\npackage com.toooooooooooooooooooooooooooo.long\nimport com.tooooooooooooooooooooooooooooo.long\nval foo =\n\"\"\"\n fooooooooooooooooooooooooooooooooooooooooo\n \"\"\"\n@Test\nfun `Test description which is toooooooooooo long`() {\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval fooooooooooooooo = \"fooooooooooooooooooooo\"\nval foooooooooooooo = \"foooooooooooooooooooo\" // some comment\nval fooooooooooooo =\n\"foooooooooooooooooooooooooooooooooooooooo\"\n</code></pre> <p>Rule id: <code>max-line-length</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#modifier-order","title":"Modifier order","text":"<p>Consistent order of modifiers</p> Ktlint Disallowed <pre><code>abstract class A {\nprotected open val v = \"\"\ninternal open suspend fun f(v: Any): Any = \"\"\nprotected lateinit var lv: String\n}\n</code></pre> <pre><code>abstract class A {\nopen protected val v = \"\"\nopen suspend internal fun f(v: Any): Any = \"\"\nlateinit protected var lv: String\n}\n</code></pre> <p>Rule id: <code>modifier-order</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#multiline-if-else","title":"Multiline if-else","text":"<p>Braces required for multiline if/else statements.</p> Ktlint Disallowed <pre><code>val foo =\nif (true) {\nreturn 0\n} else {\nreturn 1\n}\n</code></pre> <pre><code>val foo =\nif (true)\nreturn 0\nelse\nreturn 1\n</code></pre> <p>Rule id: <code>multiline-if-else</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-blank-lines-before","title":"No blank lines before <code>}</code>","text":"<p>No blank lines before <code>}</code>.</p> Ktlint Disallowed <pre><code>fun main() {\nfun a() {\n}\nfun b()\n}\n</code></pre> <pre><code>fun main() {\nfun a() {\n}\nfun b()\n}\n</code></pre> <p>Rule id: <code>no-blank-line-before-rbrace</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-blank-lines-in-chained-method-calls","title":"No blank lines in chained method calls","text":"Ktlint Disallowed <pre><code>fun foo(inputText: String) {\ninputText\n.lowercase(Locale.getDefault())\n}\n</code></pre> <pre><code>fun foo(inputText: String) {\ninputText\n.lowercase(Locale.getDefault())\n}\n</code></pre> <p>Rule id: <code>no-blank-lines-in-chained-method-calls</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-consecutive-blank-lines","title":"No consecutive blank lines","text":"Ktlint Disallowed <pre><code>package com.test\nimport com.test.util\nval a = \"a\"\nfun b() {\n}\nfun c()\n</code></pre> <pre><code>package com.test\nimport com.test.util\nval a = \"a\"\nfun b() {\n}\nfun c()\n</code></pre> <p>Rule id: <code>no-consecutive-blank-lines</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-empty-class-bodies","title":"No empty (<code>{}</code>) class bodies","text":"Ktlint Disallowed <pre><code>class C\ndata class DC(val v: Any)\ninterface I\nobject O\n</code></pre> <pre><code>class C {}\ndata class DC(val v: Any) { }\ninterface I {\n}\nobject O{}\n</code></pre> <p>Rule id: <code>no-empty-class-body</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-leading-empty-lines-in-method-blocks","title":"No leading empty lines in method blocks","text":"Ktlint Disallowed <pre><code>fun bar() {\nval a = 2\n}\n</code></pre> <pre><code>fun bar() {\nval a = 2\n}\n</code></pre> <p>Rule id: <code>no-empty-first-line-in-method-block</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-line-break-after-else","title":"No line break after else","text":"<p>Disallows line breaks after the else keyword if that could lead to confusion, for example:</p> Ktlint Disallowed <pre><code>fun funA() {\nif (conditionA()) {\ndoSomething()\n} else if (conditionB()) {\ndoAnotherThing()\n}\n}\n</code></pre> <pre><code>fun funA() {\nif (conditionA()) {\ndoSomething()\n} else\nif (conditionB()) {\ndoAnotherThing()\n}\n}\n</code></pre> <p>Rule id: <code>no-line-break-after-else</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-line-break-before-assignment","title":"No line break before assignment","text":"<p>When a line is broken at an assignment (<code>=</code>) operator the break comes after the symbol.</p> Ktlint Disallowed <pre><code>val valA =\n\"\"\n</code></pre> <pre><code>val valA\n= \"\"\n</code></pre> <p>Rule id: <code>no-line-break-before-assignment</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-multi-spaces","title":"No multi spaces","text":"<p>Except in indentation and in KDoc's it is not allowed to have multiple consecutive spaces.</p> Ktlint Disallowed <pre><code>fun main() {\nx(1, 3)\n}\n</code></pre> <pre><code>fun main() {\nx(1, 3)\n}\n</code></pre> <p>Rule id: <code>no-multi-spaces</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-semicolons","title":"No semicolons","text":"<p>No semicolons (unless used to separate multiple statements on the same line).</p> Ktlint Disallowed <pre><code>fun foo() {\nbar()\nbar()\n}\n</code></pre> <pre><code>fun foo() {\n;\nbar()\n;\nbar()\n;\n}\n</code></pre> <p>Rule id: <code>no-semi</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-trailing-whitespaces","title":"No trailing whitespaces","text":"<p>Rule id: <code>no-trailing-spaces</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-unit-as-return-type","title":"No <code>Unit</code> as return type","text":"<p>The <code>Unit</code> type is not allowed as return type of a function. returns (<code>fun fn {}</code> instead of <code>fun fn: Unit {}</code>)</p> Ktlint Disallowed <pre><code>fun fn() {}\n</code></pre> <pre><code>fun fn(): Unit {}\n</code></pre> <p>Rule id: <code>no-unit-return</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-unused-imports","title":"No unused imports","text":"<p>Warning</p> <p>This rule is not able to detect all unused imports as mentioned in this issue comment.</p> <p>Rule id: <code>no-unused-imports</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#no-wildcard-imports","title":"No wildcard imports","text":"<p>No wildcard imports except imports listed in <code>.editorconfig</code> property <code>ij_kotlin_packages_to_use_import_on_demand</code>.</p> Ktlint Disallowed <pre><code>import foobar.Bar\nimport foobar.Foo\n</code></pre> <pre><code>import foobar.*\n</code></pre> <p>Warning</p> <p>In case property <code>ij_kotlin_packages_to_use_import_on_demand</code> is not explicitly set, it allows wildcards imports like <code>java.util.*</code> by default to keep in sync with IntelliJ IDEA behavior. To disallow all wildcard imports, add property below to your <code>.editorconfig</code>: <pre><code>[*.{kt,kts}]\nij_kotlin_packages_to_use_import_on_demand = unset\n</code></pre></p> <p>Rule id: <code>no-wildcard-imports</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#package-name","title":"Package name","text":"<p>Validates that the package name matches the regular expression <code>[a-z][a-zA-Z\\d]*(\\.[a-z][a-zA-Z\\d]*)*</code>.</p> Ktlint Disallowed <pre><code>package foo\npackage foo.bar\n</code></pre> <pre><code>package Foo\npackage foo.Foo\npackage `foo bar`\npackage foo.`foo bar`\n</code></pre> <p>Rule id: <code>package-name</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parameter-list-wrapping","title":"Parameter list wrapping","text":"<p>When class/function signature doesn't fit on a single line, each parameter must be on a separate line</p> Ktlint Disallowed (ktlint_official) Disallowed (non ktlint_official)\" <pre><code>class ClassA(paramA: String, paramB: String, paramC: String)\nclass ClassA(\nparamA: String,\nparamB: String,\nparamC: String\n)\nfun f(a: Any, b: Any, c: Any)\nfun f(\na: Any,\nb: Any,\nc: Any\n)\nfun foo(\n@Bar fooBar: FooBar\n)\n</code></pre> <pre><code>class ClassA(\nparamA: String, paramB: String,\nparamC: String\n)\nfun f(\na: Any,\nb: Any, c: Any\n)\nfun foo(@Bar fooBar: FooBar)\n</code></pre> <pre><code>class ClassA(\nparamA: String, paramB: String,\nparamC: String\n)\nfun f(\na: Any,\nb: Any, c: Any\n)\n</code></pre> <p>Rule id: <code>parameter-list-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parameter-wrapping","title":"Parameter wrapping","text":"<p>When a function or class parameter doesn't fit on a single line, wrap the type or value to a separate line</p> Ktlint (ktlint_official) Ktlint (non ktlint_official) Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong:\nFoo,\n)\nfun bar(\nfooooooooooooooooooooooooTooLong:\nFoo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong:\nFoo,\n)\nfun bar(\nfooooooooooooooooooooooooTooLong:\nFoo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nclass Bar(\nval fooooooooooooooooooooooooTooLong: Foo,\n)\nfun bar(\nfooooooooooooooooooooooooooooTooLong: Foo,\n)\n</code></pre> <p>Rule id: <code>parameter-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#property-wrapping","title":"Property wrapping","text":"<p>When a property doesn't fit on a single line, wrap the type or value to a separate line</p> Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval aVariableWithALooooooooooooongName:\nString\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right X\nval aVariableWithALooooooooooooongName: String\n</code></pre> <p>Rule id: <code>property-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#string-template","title":"String template","text":"<p>Consistent string templates (<code>$v</code> instead of <code>${v}</code>, <code>${p.v}</code> instead of <code>${p.v.toString()}</code>)</p> Ktlint Disallowed <pre><code>val foo = \"$foo hello\"\n</code></pre> <pre><code>val foo = \"${foo} hello\"\n</code></pre> <p>Rule id: <code>string-template</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>Consistent removal (default) or adding of trailing commas on call site.</p> <p>Important</p> <p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma_on_call_site</code> to configure the rule. When this property is enabled, KtLint enforces the usage of the trailing comma at call site while IntelliJ IDEA default formatter only allows to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> Ktlint Disallowed <pre><code>FooWrapper(\nFoo(\na = 3,\nb = 4,\n),\n)\n</code></pre> <pre><code>FooWrapper(Foo(\na = 3,\nb = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on call site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>Although the Kotlin coding conventions leaves it to the developer's discretion to use trailing commas on the call site, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Note</p> <p>Trailing comma on call site is automatically disabled if the Wrapping rule (or, before version <code>0.45.0</code>, the Indentation rule) is disabled or not loaded. Because it cannot provide proper formatting with unwrapped calls. (see dependencies).</p> <p>Rule id: <code>trailing-comma-on-call-site</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>Consistent removal (default) or adding of trailing commas on declaration site.</p> <p>Important</p> <p>KtLint uses the IntelliJ IDEA <code>.editorconfig</code> property <code>ij_kotlin_allow_trailing_comma</code> to configure the rule. When this property is enabled, KtLint enforces the usage of the trailing comma at declaration site while IntelliJ IDEA default formatter only allows to use the trailing comma but leaves it to the developer's discretion to actually use it (or not). KtLint values consistent formatting more than a per-situation decision.</p> Ktlint Disallowed <pre><code>class FooWrapper(\nval foo = Foo(\na = 3,\nb = 4,\n),\n)\n</code></pre> <pre><code>class FooWrapper(val foo = Foo(\na = 3,\nb = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> <p>Note</p> <p>In KtLint 0.48.x the default value for using the trailing comma on declaration site has been changed to <code>true</code> except when codestyle <code>android</code> is used.</p> <p>The Kotlin coding conventions encourages the usage of trailing commas on the declaration site, but leaves it to the developer's discretion to use trailing commas on the call site. But next to this, it also states that usage of trailing commas has several benefits:</p> <ul> <li>It makes version-control diffs cleaner \u2013 as all the focus is on the changed value.</li> <li>It makes it easy to add and reorder elements \u2013 there is no need to add or delete the comma if you manipulate elements.</li> <li>It simplifies code generation, for example, for object initializers. The last element can also have a comma.</li> </ul> <p>Note</p> <p>Trailing comma on declaration site is automatically disabled if the Wrapping rule (or, before version <code>0.45.0</code>, the Indentation rule) is disabled or not loaded. Because it cannot provide proper formatting with unwrapped declarations. (see dependencies).</p> <p>Rule id: <code>trailing-comma-on-declaration-site</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#unnecessary-parenthesis-before-trailing-lambda","title":"Unnecessary parenthesis before trailing lambda","text":"<p>An empty parentheses block before a lambda is redundant.</p> Ktlint Disallowed <pre><code>\"some-string\".count { it == '-' }\n</code></pre> <pre><code>\"some-string\".count() { it == '-' }\n</code></pre> <p>Rule id: <code>unnecessary-parentheses-before-trailing-lambda</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#wrapping","title":"Wrapping","text":""},{"location":"rules/standard/#wrapping_1","title":"Wrapping","text":"<p>Inserts missing newlines (for example between parentheses of a multi-line function call).</p> Ktlint Disallowed <pre><code>val x = f(\na,\nb,\nc\n)\n</code></pre> <pre><code>val x = f(\na,\nb,\nc)\n</code></pre> <p>Rule id: <code>wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comment-wrapping","title":"Comment wrapping","text":"<p>A block comment should start and end on a line that does not contain any other element.</p> Ktlint Disallowed <pre><code>/* Some comment 1 */\nval foo1 = \"foo1\"\nval foo2 = \"foo\" // Some comment\nval foo3 = { /* no-op */ } </code></pre> <pre><code>/* Some comment 1 */ val foo1 = \"foo1\"\nval foo2 = \"foo\" /* Block comment instead of end-of-line comment */\nval foo3 = \"foo\" /* Some comment\n * with a newline\n */\n</code></pre> <p>Rule id: <code>comment-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#spacing","title":"Spacing","text":""},{"location":"rules/standard/#angle-bracket-spacing","title":"Angle bracket spacing","text":"<p>No spaces around angle brackets when used for typing.</p> Ktlint Disallowed <pre><code>val a: Map<Int, String> = mapOf()\nval b: Map<Int, String> = mapOf()\nval c: Map<Int, String> = mapOf()\n</code></pre> <pre><code>val a: Map< Int, String> = mapOf()\nval b: Map<Int, String > = mapOf()\nval c: Map <Int, String> = mapOf()\n</code></pre> <p>Rule id: <code>spacing-around-angle-brackets</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#annotation-spacing","title":"Annotation spacing","text":"<p>Annotations should be separated by a single line break.</p> Ktlint Disallowed <pre><code>@JvmField\nfun foo() {}\n/**\n * block comment\n */\n@Foo @Bar\nclass FooBar {\n}\n</code></pre> <pre><code>@JvmField\nfun foo() {}\n@Foo @Bar\n/**\n * block comment\n */\nclass FooBar {\n}\n</code></pre> <p>Rule id: <code>annotation-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#blank-line-between-declarations-with-annotations","title":"Blank line between declarations with annotations","text":"<p>Declarations with annotations should be separated by a blank line.</p> Ktlint Disallowed <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <p>Rule id: <code>spacing-between-declarations-with-annotations</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#blank-line-between-declaration-with-comments","title":"Blank line between declaration with comments","text":"<p>Declarations with comments should be separated by a blank line.</p> Ktlint Disallowed <pre><code>// some comment 1\nbar()\n/*\n * some comment 2\n */\nfoo()\n</code></pre> <pre><code>// some comment 1\nbar()\n/*\n * some comment 2\n */\nfoo()\n</code></pre> <p>Rule id: <code>spacing-between-declarations-with-comments</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#colon-spacing","title":"Colon spacing","text":"<p>Consistent spacing around colon.</p> Ktlint Disallowed <pre><code>class A : B\nclass A2 : B2\n</code></pre> <pre><code>class A:B\nclass A2 : B2\n</code></pre> <p>Rule id: <code>colon-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comma-spacing","title":"Comma spacing","text":"<p>Consistent spacing around comma.</p> Ktlint Disallowed <pre><code>val foo1 = Foo(1, 3)\nval foo2 = Foo(1, 3)\n</code></pre> <pre><code>val foo1 = Foo(1 ,3)\nval foo2 = Foo(1,3)\n</code></pre> <p>Rule id: <code>comma-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#comment-spacing","title":"Comment spacing","text":"<p>The end of line comment sign <code>//</code> should be preceded and followed by exactly a space.</p> Ktlint Disallowed <pre><code>// comment\nvar debugging = false // comment\nvar debugging = false // comment\nvar debugging = false // comment\nfun main() {\nSystem.out.println( // 123\n\"test\"\n)\n}\n// comment\n</code></pre> <pre><code>//comment\nvar debugging = false// comment\nvar debugging = false //comment\nvar debugging = false//comment\nfun main() {\nSystem.out.println(//123\n\"test\"\n)\n}\n//comment\n</code></pre> <p>Rule id: <code>comment-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#curly-spacing","title":"Curly spacing","text":"<p>Consistent spacing around curly braces.</p> Ktlint Disallowed <pre><code>val foo = if (true) { 0 } else { 1 }\n</code></pre> <pre><code>val foo = if (true){0}else{1}\n</code></pre> <p>Rule id: <code>curly-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#dot-spacing","title":"Dot spacing","text":"<p>Consistent spacing around dots.</p> Ktlint Disallowed <pre><code>fun String.foo() = \"foo\"\n</code></pre> <pre><code>fun String . foo() = \"foo\"\n</code></pre> <p>Rule id: <code>dot-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#double-colon-spacing","title":"Double colon spacing","text":"<p>No spaces around <code>::</code>.</p> Ktlint Disallowed <pre><code>val foo = Foo::class\n</code></pre> <pre><code>val foo1 = Foo ::class\nval foo2 = Foo:: class\nval foo3 = Foo :: class\nval foo4 = Foo::\nclass\n</code></pre> <p>Rule id: <code>double-colon-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-return-type-spacing","title":"Function return type spacing","text":"<p>Consistent spacing around the function return type.</p> Ktlint Disallowed <pre><code>fun foo(): String = \"some-result\"\n</code></pre> <pre><code>fun foo1() : String = \"some-result\"\nfun foo2(): String = \"some-result\"\nfun foo3():String = \"some-result\"\nfun foo4():\nString = \"some-result\"\n</code></pre> <p>Rule id: <code>function-return-type-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-start-of-body-spacing","title":"Function start of body spacing","text":"<p>Consistent spacing before start of function body.</p> Ktlint Disallowed <pre><code>fun foo1() = \"some-result\"\nfun foo2() =\n\"some-result\"\nfun foo3() {\n// do something\n}\nfun bar1(): String = \"some-result\"\nfun bar2(): String =\n\"some-result\"\nfun bar3(): String {\nreturn \"some-result\"\n}\n</code></pre> <pre><code>fun foo1()= \"some-result\"\nfun foo2()\n= \"some-result\"\nfun foo3()\n{\n// do something\n}\nfun bar1(): String= \"some-result\"\nfun bar2(): String\n= \"some-result\"\nfun bar3(): String\n{\nreturn \"some-result\"\n}\n</code></pre> <p>Rule id: <code>function-start-of-body-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#function-type-reference-spacing","title":"Function type reference spacing","text":"<p>Consistent spacing in the type reference before a function.</p> Ktlint Disallowed <pre><code>fun String.foo() = \"some-result\"\n</code></pre> <pre><code>fun String .foo() = \"some-result\"\nfun String\n.foo() = \"some-result\"\nfun String? .foo() = \"some-result\"\nfun String?\n.foo() = \"some-result\"\n</code></pre> <p>Rule id: <code>function-type-reference-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#fun-keyword-spacing","title":"Fun keyword spacing","text":"<p>Consistent spacing after the fun keyword.</p> Ktlint Disallowed <pre><code>fun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo() = \"some-result\"\nfun\nfoo() = \"some-result\"\n</code></pre> <p>Rule id: <code>fun-keyword-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#kdoc-wrapping","title":"Kdoc wrapping","text":"<p>A KDoc comment should start and end on a line that does not contain any other element.</p> Ktlint Disallowed <pre><code>/** Some KDoc comment 1 */\nval foo1 = \"foo1\"\n</code></pre> <pre><code>/** Some KDoc comment 1 */ val foo1 = \"foo1\"\nval foo2 = \"foo2\" /** Some KDoc comment\n * with a newline\n */\n</code></pre> <p>Rule id: <code>kdoc-wrapping</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#keyword-spacing","title":"Keyword spacing","text":"<p>Consistent spacing around keywords.</p> Ktlint Disallowed <pre><code>fun main() {\nif (true) {}\n}\n</code></pre> <pre><code>fun main() {\nif(true){}\n}\n</code></pre> <p>Rule id: <code>keyword-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#modifier-list-spacing","title":"Modifier list spacing","text":"<p>Consistent spacing between modifiers in and after the last modifier in a modifier list.</p> Ktlint Disallowed <pre><code>abstract class Foo {\nprotected abstract suspend fun execute()\n}\n</code></pre> <pre><code>abstract class Foo {\nprotected abstract suspend fun execute()\n}\nabstract\nclass Foo {\nprotected\nabstract\nsuspend\nfun execute()\n}\n</code></pre> <p>Rule id: <code>modifier-list-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#nullable-type-spacing","title":"Nullable type spacing","text":"<p>No spaces in a nullable type.</p> Ktlint Disallowed <pre><code>val foo: String? = null\nval foo: List<String?> = listOf(null)\n</code></pre> <pre><code>val foo: String ? = null\nval foo: List<String ?> = listOf(null)\n</code></pre> <p>Rule id: <code>nullable-type-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#operator-spacing","title":"Operator spacing","text":"<p>Consistent spacing around operators.</p> Ktlint Disallowed <pre><code>val foo1 = 1 + 2\nval foo2 = 1 - 2\nval foo3 = 1 * 2\nval foo4 = 1 / 2\n</code></pre> <pre><code>val foo1 = 1+2\nval foo2 = 1- 2\nval foo3 = 1 *2\nval foo4 = 1 / 2\n</code></pre> <p>Rule id: <code>op-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#parenthesis-spacing","title":"Parenthesis spacing","text":"<p>Consistent spacing around parenthesis.</p> Ktlint Disallowed <pre><code>class Foo : Bar {\nconstructor(string: String) : super()\n}\nval foo1 = ((1 + 2) / 3)\n</code></pre> <pre><code>class Foo : Bar {\nconstructor(string: String) : super ()\n}\nval foo1 = ( (1 + 2 ) / 3)\n</code></pre> <p>Rule id: <code>paren-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#range-spacing","title":"Range spacing","text":"<p>Consistent spacing around range operators.</p> Ktlint Disallowed <pre><code>val foo1 = (1..12 step 2).last\nval foo2 = (1..12 step 2).last\nval foo3 = (1..12 step 2).last\n</code></pre> <pre><code>val foo1 = (1.. 12 step 2).last\nval foo2 = (1 .. 12 step 2).last\nval foo3 = (1 ..12 step 2).last\n</code></pre> <p>Rule id: <code>range-spacing</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#spacing-between-function-name-and-opening-parenthesis","title":"Spacing between function name and opening parenthesis","text":"<p>Consistent spacing between function name and opening parenthesis.</p> Ktlint Disallowed <pre><code>fun foo() = \"foo\"\n</code></pre> <pre><code>fun foo () = \"foo\"\n</code></pre> <p>Rule id: <code>spacing-between-function-name-and-opening-parenthesis</code> (<code>standard</code> rule set)</p>"},{"location":"rules/standard/#unary-operator-spacing","title":"Unary operator spacing","text":"<p>No spaces around unary operators.</p> Ktlint Disallowed <pre><code>fun foo1(i: Int) = i++\nfun foo2(i: Int) = ++i\nfun foo3(i: Int) = ++i\n</code></pre> <pre><code>fun foo1(i: Int) = i ++\nfun foo2(i: Int) = ++ i\nfun foo3(i: Int) = ++\ni\n</code></pre> <p>Rule id: <code>unary-op-spacing</code> (<code>standard</code> rule set)</p>"}]}
\ No newline at end of file
diff --git a/dev-snapshot/sitemap.xml b/dev-snapshot/sitemap.xml
index cf74715..ae6373a 100644
--- a/dev-snapshot/sitemap.xml
+++ b/dev-snapshot/sitemap.xml
@@ -2,127 +2,127 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/faq/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/readme/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/badge/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-integration/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-reporter/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-rule-set/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/api/overview/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/code-of-conduct/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/guidelines/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/overview/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/install/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/install/cli/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/install/integrations/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/install/overview/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/install/snapshot-build/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/code-styles/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/configuration-intellij-idea/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/configuration-ktlint/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/dependencies/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/experimental/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/standard/</loc>
- <lastmod>2023-06-24</lastmod>
+ <lastmod>2023-06-27</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
\ No newline at end of file
diff --git a/dev-snapshot/sitemap.xml.gz b/dev-snapshot/sitemap.xml.gz
index 66b3226..746209b 100644
--- a/dev-snapshot/sitemap.xml.gz
+++ b/dev-snapshot/sitemap.xml.gz
Binary files differ