Deployed 79dfa67d to dev-snapshot with MkDocs 1.6.1 and mike 2.1.3
diff --git a/dev-snapshot/rules/standard/index.html b/dev-snapshot/rules/standard/index.html
index 64ba7f8..4ddee45 100644
--- a/dev-snapshot/rules/standard/index.html
+++ b/dev-snapshot/rules/standard/index.html
@@ -1417,6 +1417,15 @@
 </li>
         
           <li class="md-nav__item">
+  <a href="#then-spacing" class="md-nav__link">
+    <span class="md-ellipsis">
+      Then spacing
+    </span>
+  </a>
+  
+</li>
+        
+          <li class="md-nav__item">
   <a href="#try-catch-finally-spacing" class="md-nav__link">
     <span class="md-ellipsis">
       Try catch finally spacing
@@ -2756,6 +2765,15 @@
 </li>
         
           <li class="md-nav__item">
+  <a href="#then-spacing" class="md-nav__link">
+    <span class="md-ellipsis">
+      Then spacing
+    </span>
+  </a>
+  
+</li>
+        
+          <li class="md-nav__item">
   <a href="#try-catch-finally-spacing" class="md-nav__link">
     <span class="md-ellipsis">
       Try catch finally spacing
@@ -6433,33 +6451,68 @@
     <div class="highlight"><pre><span></span><code><a id="__codelineno-341-1" name="__codelineno-341-1" href="#__codelineno-341-1"></a>ktlint_standard_spacing-between-function-name-and-opening-parenthesis = disabled
 </code></pre></div></li>
 </ol>
-<h3 id="try-catch-finally-spacing">Try catch finally spacing<a class="headerlink" href="#try-catch-finally-spacing" title="Permanent link">&para;</a></h3>
-<p>Enforces consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p>
+<h3 id="then-spacing">Then spacing<a class="headerlink" href="#then-spacing" title="Permanent link">&para;</a></h3>
+<p>Enforces consistent spacing around the <code>then</code> block in an <code>if</code>-statement.</p>
 <div class="tabbed-set tabbed-alternate" data-tabs="69:2"><input checked="checked" id="__tabbed_69_1" name="__tabbed_69" type="radio" /><input id="__tabbed_69_2" name="__tabbed_69" type="radio" /><div class="tabbed-labels"><label for="__tabbed_69_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_69_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-342-1" name="__codelineno-342-1" href="#__codelineno-342-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>
-<a id="__codelineno-342-2" name="__codelineno-342-2" href="#__codelineno-342-2"></a><span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-342-3" name="__codelineno-342-3" href="#__codelineno-342-3"></a><span class="w">        </span><span class="c1">// do something</span>
-<a id="__codelineno-342-4" name="__codelineno-342-4" href="#__codelineno-342-4"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-342-5" name="__codelineno-342-5" href="#__codelineno-342-5"></a><span class="w">        </span><span class="c1">// handle exception</span>
-<a id="__codelineno-342-6" name="__codelineno-342-6" href="#__codelineno-342-6"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-342-7" name="__codelineno-342-7" href="#__codelineno-342-7"></a><span class="w">        </span><span class="c1">// clean up</span>
-<a id="__codelineno-342-8" name="__codelineno-342-8" href="#__codelineno-342-8"></a><span class="w">    </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-342-1" name="__codelineno-342-1" href="#__codelineno-342-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-342-2" name="__codelineno-342-2" href="#__codelineno-342-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="kc">true</span>
+<a id="__codelineno-342-3" name="__codelineno-342-3" href="#__codelineno-342-3"></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><span class="m">0</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">)</span>
+<a id="__codelineno-342-4" name="__codelineno-342-4" href="#__codelineno-342-4"></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="n">print</span><span class="p">(</span><span class="m">0</span><span class="p">)</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">)</span>
+<a id="__codelineno-342-5" name="__codelineno-342-5" href="#__codelineno-342-5"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-343-1" name="__codelineno-343-1" href="#__codelineno-343-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="k">try</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-343-2" name="__codelineno-343-2" href="#__codelineno-343-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><span class="w"> </span>
-<a id="__codelineno-343-3" name="__codelineno-343-3" href="#__codelineno-343-3"></a><span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-343-4" name="__codelineno-343-4" href="#__codelineno-343-4"></a><span class="w">        </span><span class="c1">// do something</span>
-<a id="__codelineno-343-5" name="__codelineno-343-5" href="#__codelineno-343-5"></a><span class="w">    </span><span class="p">}</span>
-<a id="__codelineno-343-6" name="__codelineno-343-6" href="#__codelineno-343-6"></a><span class="w">    </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-343-7" name="__codelineno-343-7" href="#__codelineno-343-7"></a><span class="w">        </span><span class="c1">// handle exception</span>
-<a id="__codelineno-343-8" name="__codelineno-343-8" href="#__codelineno-343-8"></a><span class="w">    </span><span class="p">}</span>
-<a id="__codelineno-343-9" name="__codelineno-343-9" href="#__codelineno-343-9"></a><span class="w">    </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-343-10" name="__codelineno-343-10" href="#__codelineno-343-10"></a><span class="w">        </span><span class="c1">// clean up</span>
-<a id="__codelineno-343-11" name="__codelineno-343-11" href="#__codelineno-343-11"></a><span class="w">    </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-343-1" name="__codelineno-343-1" href="#__codelineno-343-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-343-2" name="__codelineno-343-2" href="#__codelineno-343-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="kc">true</span>
+<a id="__codelineno-343-3" name="__codelineno-343-3" href="#__codelineno-343-3"></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="m">0</span><span class="p">)</span><span class="k">else</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">)</span>
+<a id="__codelineno-343-4" name="__codelineno-343-4" href="#__codelineno-343-4"></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="n">print</span><span class="p">(</span><span class="m">0</span><span class="p">)</span><span class="k">else</span><span class="w"> </span><span class="p">(</span><span class="m">1</span><span class="p">)</span>
+<a id="__codelineno-343-5" name="__codelineno-343-5" href="#__codelineno-343-5"></a><span class="p">}</span>
+</code></pre></div>
+</div>
+</div>
+</div>
+<p>Rule id: <code>standard:then-spacing</code></p>
+<p class="annotate">Suppress or disable rule (1)</p>
+<ol>
+<li>Suppress rule in code with annotation below:
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-344-1" name="__codelineno-344-1" href="#__codelineno-344-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:then-spacing&quot;</span><span class="p">)</span>
+</code></pre></div>
+   Enable rule via <code>.editorconfig</code>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-345-1" name="__codelineno-345-1" href="#__codelineno-345-1"></a>ktlint_standard_then-spacing = enabled
+</code></pre></div>
+   Disable rule via <code>.editorconfig</code>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-346-1" name="__codelineno-346-1" href="#__codelineno-346-1"></a>ktlint_standard_then-spacing = disabled
+</code></pre></div></li>
+</ol>
+<h3 id="try-catch-finally-spacing">Try catch finally spacing<a class="headerlink" href="#try-catch-finally-spacing" title="Permanent link">&para;</a></h3>
+<p>Enforces consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p>
+<div class="tabbed-set tabbed-alternate" data-tabs="70:2"><input checked="checked" id="__tabbed_70_1" name="__tabbed_70" type="radio" /><input id="__tabbed_70_2" name="__tabbed_70" type="radio" /><div class="tabbed-labels"><label for="__tabbed_70_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_70_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-content">
+<div class="tabbed-block">
+<div class="highlight"><pre><span></span><code><a id="__codelineno-347-1" name="__codelineno-347-1" href="#__codelineno-347-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>
+<a id="__codelineno-347-2" name="__codelineno-347-2" href="#__codelineno-347-2"></a><span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-347-3" name="__codelineno-347-3" href="#__codelineno-347-3"></a><span class="w">        </span><span class="c1">// do something</span>
+<a id="__codelineno-347-4" name="__codelineno-347-4" href="#__codelineno-347-4"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-347-5" name="__codelineno-347-5" href="#__codelineno-347-5"></a><span class="w">        </span><span class="c1">// handle exception</span>
+<a id="__codelineno-347-6" name="__codelineno-347-6" href="#__codelineno-347-6"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-347-7" name="__codelineno-347-7" href="#__codelineno-347-7"></a><span class="w">        </span><span class="c1">// clean up</span>
+<a id="__codelineno-347-8" name="__codelineno-347-8" href="#__codelineno-347-8"></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-348-1" name="__codelineno-348-1" href="#__codelineno-348-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="k">try</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="cm">/* ... */</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-348-2" name="__codelineno-348-2" href="#__codelineno-348-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><span class="w"> </span>
+<a id="__codelineno-348-3" name="__codelineno-348-3" href="#__codelineno-348-3"></a><span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-348-4" name="__codelineno-348-4" href="#__codelineno-348-4"></a><span class="w">        </span><span class="c1">// do something</span>
+<a id="__codelineno-348-5" name="__codelineno-348-5" href="#__codelineno-348-5"></a><span class="w">    </span><span class="p">}</span>
+<a id="__codelineno-348-6" name="__codelineno-348-6" href="#__codelineno-348-6"></a><span class="w">    </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">exception</span><span class="p">:</span><span class="w"> </span><span class="n">Exception</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-348-7" name="__codelineno-348-7" href="#__codelineno-348-7"></a><span class="w">        </span><span class="c1">// handle exception</span>
+<a id="__codelineno-348-8" name="__codelineno-348-8" href="#__codelineno-348-8"></a><span class="w">    </span><span class="p">}</span>
+<a id="__codelineno-348-9" name="__codelineno-348-9" href="#__codelineno-348-9"></a><span class="w">    </span><span class="k">finally</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-348-10" name="__codelineno-348-10" href="#__codelineno-348-10"></a><span class="w">        </span><span class="c1">// clean up</span>
+<a id="__codelineno-348-11" name="__codelineno-348-11" href="#__codelineno-348-11"></a><span class="w">    </span><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -6468,37 +6521,37 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-344-1" name="__codelineno-344-1" href="#__codelineno-344-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:try-catch-finally-spacing&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-349-1" name="__codelineno-349-1" href="#__codelineno-349-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:try-catch-finally-spacing&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-345-1" name="__codelineno-345-1" href="#__codelineno-345-1"></a>ktlint_standard_try-catch-finally-spacing = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-350-1" name="__codelineno-350-1" href="#__codelineno-350-1"></a>ktlint_standard_try-catch-finally-spacing = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-346-1" name="__codelineno-346-1" href="#__codelineno-346-1"></a>ktlint_standard_try-catch-finally-spacing = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-351-1" name="__codelineno-351-1" href="#__codelineno-351-1"></a>ktlint_standard_try-catch-finally-spacing = disabled
 </code></pre></div></li>
 </ol>
 <div class="admonition note">
 <p class="admonition-title">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>
 </div>
+<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>
 <h3 id="type-argument-list-spacing">Type argument list spacing<a class="headerlink" href="#type-argument-list-spacing" title="Permanent link">&para;</a></h3>
 <p>Disallows spacing before and after the angle brackets of a type argument list.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="70:2"><input checked="checked" id="__tabbed_70_1" name="__tabbed_70" type="radio" /><input id="__tabbed_70_2" name="__tabbed_70" type="radio" /><div class="tabbed-labels"><label for="__tabbed_70_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_70_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="71:2"><input checked="checked" id="__tabbed_71_1" name="__tabbed_71" type="radio" /><input id="__tabbed_71_2" name="__tabbed_71" type="radio" /><div class="tabbed-labels"><label for="__tabbed_71_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_71_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-347-1" name="__codelineno-347-1" href="#__codelineno-347-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">LintError</span><span class="o">&gt;</span><span class="p">()</span>
-<a id="__codelineno-347-2" name="__codelineno-347-2" href="#__codelineno-347-2"></a>
-<a id="__codelineno-347-3" name="__codelineno-347-3" href="#__codelineno-347-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">B</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-347-4" name="__codelineno-347-4" href="#__codelineno-347-4"></a><span class="w">    </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">x</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">super</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">.</span><span class="na">x</span><span class="p">()</span>
-<a id="__codelineno-347-5" name="__codelineno-347-5" href="#__codelineno-347-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-352-1" name="__codelineno-352-1" href="#__codelineno-352-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">LintError</span><span class="o">&gt;</span><span class="p">()</span>
+<a id="__codelineno-352-2" name="__codelineno-352-2" href="#__codelineno-352-2"></a>
+<a id="__codelineno-352-3" name="__codelineno-352-3" href="#__codelineno-352-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">B</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-352-4" name="__codelineno-352-4" href="#__codelineno-352-4"></a><span class="w">    </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">x</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">super</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">.</span><span class="na">x</span><span class="p">()</span>
+<a id="__codelineno-352-5" name="__codelineno-352-5" href="#__codelineno-352-5"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-348-1" name="__codelineno-348-1" href="#__codelineno-348-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ArrayList</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">LintError</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="p">()</span>
-<a id="__codelineno-348-2" name="__codelineno-348-2" href="#__codelineno-348-2"></a>
-<a id="__codelineno-348-3" name="__codelineno-348-3" href="#__codelineno-348-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">B</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-348-4" name="__codelineno-348-4" href="#__codelineno-348-4"></a><span class="w">    </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">x</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">super</span><span class="o">&lt;</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="o">&gt;</span><span class="p">.</span><span class="na">x</span><span class="p">()</span>
-<a id="__codelineno-348-5" name="__codelineno-348-5" href="#__codelineno-348-5"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-353-1" name="__codelineno-353-1" href="#__codelineno-353-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ArrayList</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">LintError</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="p">()</span>
+<a id="__codelineno-353-2" name="__codelineno-353-2" href="#__codelineno-353-2"></a>
+<a id="__codelineno-353-3" name="__codelineno-353-3" href="#__codelineno-353-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">B</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-353-4" name="__codelineno-353-4" href="#__codelineno-353-4"></a><span class="w">    </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">x</span><span class="p">()</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">super</span><span class="o">&lt;</span><span class="w"> </span><span class="n">A</span><span class="w"> </span><span class="o">&gt;</span><span class="p">.</span><span class="na">x</span><span class="p">()</span>
+<a id="__codelineno-353-5" name="__codelineno-353-5" href="#__codelineno-353-5"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -6507,33 +6560,33 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-349-1" name="__codelineno-349-1" href="#__codelineno-349-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-argument-list-spacing&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-354-1" name="__codelineno-354-1" href="#__codelineno-354-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-argument-list-spacing&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-350-1" name="__codelineno-350-1" href="#__codelineno-350-1"></a>ktlint_standard_type-argument-list-spacing = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-355-1" name="__codelineno-355-1" href="#__codelineno-355-1"></a>ktlint_standard_type-argument-list-spacing = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-351-1" name="__codelineno-351-1" href="#__codelineno-351-1"></a>ktlint_standard_type-argument-list-spacing = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-356-1" name="__codelineno-356-1" href="#__codelineno-356-1"></a>ktlint_standard_type-argument-list-spacing = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="type-parameter-list-spacing">Type parameter list spacing<a class="headerlink" href="#type-parameter-list-spacing" title="Permanent link">&para;</a></h3>
 <p>Disallows spacing after a type parameter list in function and class declarations.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="71:2"><input checked="checked" id="__tabbed_71_1" name="__tabbed_71" type="radio" /><input id="__tabbed_71_2" name="__tabbed_71" type="radio" /><div class="tabbed-labels"><label for="__tabbed_71_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_71_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="72:2"><input checked="checked" id="__tabbed_72_1" name="__tabbed_72" type="radio" /><input id="__tabbed_72_2" name="__tabbed_72" type="radio" /><div class="tabbed-labels"><label for="__tabbed_72_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_72_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-352-1" name="__codelineno-352-1" href="#__codelineno-352-1"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
-<a id="__codelineno-352-2" name="__codelineno-352-2" href="#__codelineno-352-2"></a>
-<a id="__codelineno-352-3" name="__codelineno-352-3" href="#__codelineno-352-3"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
-<a id="__codelineno-352-4" name="__codelineno-352-4" href="#__codelineno-352-4"></a>
-<a id="__codelineno-352-5" name="__codelineno-352-5" href="#__codelineno-352-5"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-357-1" name="__codelineno-357-1" href="#__codelineno-357-1"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo1</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<a id="__codelineno-357-2" name="__codelineno-357-2" href="#__codelineno-357-2"></a>
+<a id="__codelineno-357-3" name="__codelineno-357-3" href="#__codelineno-357-3"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo2</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<a id="__codelineno-357-4" name="__codelineno-357-4" href="#__codelineno-357-4"></a>
+<a id="__codelineno-357-5" name="__codelineno-357-5" href="#__codelineno-357-5"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">foo3</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-353-1" name="__codelineno-353-1" href="#__codelineno-353-1"></a><span class="n">fun</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">foo1</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
-<a id="__codelineno-353-2" name="__codelineno-353-2" href="#__codelineno-353-2"></a>
-<a id="__codelineno-353-3" name="__codelineno-353-3" href="#__codelineno-353-3"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="nf">foo2</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
-<a id="__codelineno-353-4" name="__codelineno-353-4" href="#__codelineno-353-4"></a>
-<a id="__codelineno-353-5" name="__codelineno-353-5" href="#__codelineno-353-5"></a><span class="n">fun</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="n">foo3</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-358-1" name="__codelineno-358-1" href="#__codelineno-358-1"></a><span class="n">fun</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">foo1</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<a id="__codelineno-358-2" name="__codelineno-358-2" href="#__codelineno-358-2"></a>
+<a id="__codelineno-358-3" name="__codelineno-358-3" href="#__codelineno-358-3"></a><span class="kd">fun</span><span class="w"> </span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="nf">foo2</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
+<a id="__codelineno-358-4" name="__codelineno-358-4" href="#__codelineno-358-4"></a>
+<a id="__codelineno-358-5" name="__codelineno-358-5" href="#__codelineno-358-5"></a><span class="n">fun</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="n">foo3</span><span class="p">(</span><span class="n">t</span><span class="p">:</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;some-result&quot;</span>
 </code></pre></div>
 </div>
 </div>
@@ -6542,34 +6595,34 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-354-1" name="__codelineno-354-1" href="#__codelineno-354-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-parameter-list-spacing&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-359-1" name="__codelineno-359-1" href="#__codelineno-359-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-parameter-list-spacing&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-355-1" name="__codelineno-355-1" href="#__codelineno-355-1"></a>ktlint_standard_type-parameter-list-spacing = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-360-1" name="__codelineno-360-1" href="#__codelineno-360-1"></a>ktlint_standard_type-parameter-list-spacing = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-356-1" name="__codelineno-356-1" href="#__codelineno-356-1"></a>ktlint_standard_type-parameter-list-spacing = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-361-1" name="__codelineno-361-1" href="#__codelineno-361-1"></a>ktlint_standard_type-parameter-list-spacing = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="unary-operator-spacing">Unary operator spacing<a class="headerlink" href="#unary-operator-spacing" title="Permanent link">&para;</a></h3>
 <p>Disallows spaces around unary operators.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="72:2"><input checked="checked" id="__tabbed_72_1" name="__tabbed_72" type="radio" /><input id="__tabbed_72_2" name="__tabbed_72" type="radio" /><div class="tabbed-labels"><label for="__tabbed_72_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_72_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="73:2"><input checked="checked" id="__tabbed_73_1" name="__tabbed_73" type="radio" /><input id="__tabbed_73_2" name="__tabbed_73" type="radio" /><div class="tabbed-labels"><label for="__tabbed_73_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_73_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-357-1" name="__codelineno-357-1" href="#__codelineno-357-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-357-2" name="__codelineno-357-2" href="#__codelineno-357-2"></a>
-<a id="__codelineno-357-3" name="__codelineno-357-3" href="#__codelineno-357-3"></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-357-4" name="__codelineno-357-4" href="#__codelineno-357-4"></a>
-<a id="__codelineno-357-5" name="__codelineno-357-5" href="#__codelineno-357-5"></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-362-1" name="__codelineno-362-1" href="#__codelineno-362-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-362-2" name="__codelineno-362-2" href="#__codelineno-362-2"></a>
+<a id="__codelineno-362-3" name="__codelineno-362-3" href="#__codelineno-362-3"></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-362-4" name="__codelineno-362-4" href="#__codelineno-362-4"></a>
+<a id="__codelineno-362-5" name="__codelineno-362-5" href="#__codelineno-362-5"></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-358-1" name="__codelineno-358-1" href="#__codelineno-358-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-358-2" name="__codelineno-358-2" href="#__codelineno-358-2"></a>
-<a id="__codelineno-358-3" name="__codelineno-358-3" href="#__codelineno-358-3"></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-358-4" name="__codelineno-358-4" href="#__codelineno-358-4"></a>
-<a id="__codelineno-358-5" name="__codelineno-358-5" href="#__codelineno-358-5"></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-358-6" name="__codelineno-358-6" href="#__codelineno-358-6"></a><span class="w">    </span><span class="n">i</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-363-1" name="__codelineno-363-1" href="#__codelineno-363-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-363-2" name="__codelineno-363-2" href="#__codelineno-363-2"></a>
+<a id="__codelineno-363-3" name="__codelineno-363-3" href="#__codelineno-363-3"></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-363-4" name="__codelineno-363-4" href="#__codelineno-363-4"></a>
+<a id="__codelineno-363-5" name="__codelineno-363-5" href="#__codelineno-363-5"></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-363-6" name="__codelineno-363-6" href="#__codelineno-363-6"></a><span class="w">    </span><span class="n">i</span>
 </code></pre></div>
 </div>
 </div>
@@ -6578,25 +6631,25 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-359-1" name="__codelineno-359-1" href="#__codelineno-359-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:unary-op-spacing&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-364-1" name="__codelineno-364-1" href="#__codelineno-364-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:unary-op-spacing&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-360-1" name="__codelineno-360-1" href="#__codelineno-360-1"></a>ktlint_standard_unary-op-spacing = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-365-1" name="__codelineno-365-1" href="#__codelineno-365-1"></a>ktlint_standard_unary-op-spacing = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-361-1" name="__codelineno-361-1" href="#__codelineno-361-1"></a>ktlint_standard_unary-op-spacing = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-366-1" name="__codelineno-366-1" href="#__codelineno-366-1"></a>ktlint_standard_unary-op-spacing = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="string-template">String template<a class="headerlink" href="#string-template" title="Permanent link">&para;</a></h2>
 <p>Enforces 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="73:2"><input checked="checked" id="__tabbed_73_1" name="__tabbed_73" type="radio" /><input id="__tabbed_73_2" name="__tabbed_73" type="radio" /><div class="tabbed-labels"><label for="__tabbed_73_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_73_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="74:2"><input checked="checked" id="__tabbed_74_1" name="__tabbed_74" type="radio" /><input id="__tabbed_74_2" name="__tabbed_74" type="radio" /><div class="tabbed-labels"><label for="__tabbed_74_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_74_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-362-1" name="__codelineno-362-1" href="#__codelineno-362-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">&quot;</span><span class="si">$</span><span class="n">foo</span><span class="s"> hello&quot;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-367-1" name="__codelineno-367-1" href="#__codelineno-367-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">&quot;</span><span class="si">$</span><span class="n">foo</span><span class="s"> hello&quot;</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-363-1" name="__codelineno-363-1" href="#__codelineno-363-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">&quot;</span><span class="si">${</span><span class="n">foo</span><span class="si">}</span><span class="s"> hello&quot;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-368-1" name="__codelineno-368-1" href="#__codelineno-368-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">&quot;</span><span class="si">${</span><span class="n">foo</span><span class="si">}</span><span class="s"> hello&quot;</span>
 </code></pre></div>
 </div>
 </div>
@@ -6605,47 +6658,47 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-364-1" name="__codelineno-364-1" href="#__codelineno-364-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:string-template&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-369-1" name="__codelineno-369-1" href="#__codelineno-369-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:string-template&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-365-1" name="__codelineno-365-1" href="#__codelineno-365-1"></a>ktlint_standard_string-template = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-370-1" name="__codelineno-370-1" href="#__codelineno-370-1"></a>ktlint_standard_string-template = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-366-1" name="__codelineno-366-1" href="#__codelineno-366-1"></a>ktlint_standard_string-template = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-371-1" name="__codelineno-371-1" href="#__codelineno-371-1"></a>ktlint_standard_string-template = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="string-template-indent">String template indent<a class="headerlink" href="#string-template-indent" title="Permanent link">&para;</a></h2>
 <p>Enforces 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>
-<div class="tabbed-set tabbed-alternate" data-tabs="74:2"><input checked="checked" id="__tabbed_74_1" name="__tabbed_74" type="radio" /><input id="__tabbed_74_2" name="__tabbed_74" type="radio" /><div class="tabbed-labels"><label for="__tabbed_74_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_74_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="75:2"><input checked="checked" id="__tabbed_75_1" name="__tabbed_75" type="radio" /><input id="__tabbed_75_2" name="__tabbed_75" type="radio" /><div class="tabbed-labels"><label for="__tabbed_75_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_75_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-367-1" name="__codelineno-367-1" href="#__codelineno-367-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-367-2" name="__codelineno-367-2" href="#__codelineno-367-2"></a><span class="w">    </span><span class="s">&quot;&quot;&quot;</span>
-<a id="__codelineno-367-3" name="__codelineno-367-3" href="#__codelineno-367-3"></a><span class="s">    line1</span>
-<a id="__codelineno-367-4" name="__codelineno-367-4" href="#__codelineno-367-4"></a><span class="s">    line2</span>
-<a id="__codelineno-367-5" name="__codelineno-367-5" href="#__codelineno-367-5"></a><span class="s">    &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
-<a id="__codelineno-367-6" name="__codelineno-367-6" href="#__codelineno-367-6"></a>
-<a id="__codelineno-367-7" name="__codelineno-367-7" href="#__codelineno-367-7"></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-367-8" name="__codelineno-367-8" href="#__codelineno-367-8"></a><span class="w">    </span><span class="c1">// The opening &quot;&quot;&quot; can not be wrapped to next line as that would result in a compilation error</span>
-<a id="__codelineno-367-9" name="__codelineno-367-9" href="#__codelineno-367-9"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="s">&quot;&quot;&quot;</span>
-<a id="__codelineno-367-10" name="__codelineno-367-10" href="#__codelineno-367-10"></a><span class="s">        line1</span>
-<a id="__codelineno-367-11" name="__codelineno-367-11" href="#__codelineno-367-11"></a><span class="s">        line2</span>
-<a id="__codelineno-367-12" name="__codelineno-367-12" href="#__codelineno-367-12"></a><span class="s">        &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
-<a id="__codelineno-367-13" name="__codelineno-367-13" href="#__codelineno-367-13"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-372-1" name="__codelineno-372-1" href="#__codelineno-372-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-372-2" name="__codelineno-372-2" href="#__codelineno-372-2"></a><span class="w">    </span><span class="s">&quot;&quot;&quot;</span>
+<a id="__codelineno-372-3" name="__codelineno-372-3" href="#__codelineno-372-3"></a><span class="s">    line1</span>
+<a id="__codelineno-372-4" name="__codelineno-372-4" href="#__codelineno-372-4"></a><span class="s">    line2</span>
+<a id="__codelineno-372-5" name="__codelineno-372-5" href="#__codelineno-372-5"></a><span class="s">    &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
+<a id="__codelineno-372-6" name="__codelineno-372-6" href="#__codelineno-372-6"></a>
+<a id="__codelineno-372-7" name="__codelineno-372-7" href="#__codelineno-372-7"></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-372-8" name="__codelineno-372-8" href="#__codelineno-372-8"></a><span class="w">    </span><span class="c1">// The opening &quot;&quot;&quot; can not be wrapped to next line as that would result in a compilation error</span>
+<a id="__codelineno-372-9" name="__codelineno-372-9" href="#__codelineno-372-9"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="s">&quot;&quot;&quot;</span>
+<a id="__codelineno-372-10" name="__codelineno-372-10" href="#__codelineno-372-10"></a><span class="s">        line1</span>
+<a id="__codelineno-372-11" name="__codelineno-372-11" href="#__codelineno-372-11"></a><span class="s">        line2</span>
+<a id="__codelineno-372-12" name="__codelineno-372-12" href="#__codelineno-372-12"></a><span class="s">        &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
+<a id="__codelineno-372-13" name="__codelineno-372-13" href="#__codelineno-372-13"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-368-1" name="__codelineno-368-1" href="#__codelineno-368-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">&quot;&quot;&quot;</span>
-<a id="__codelineno-368-2" name="__codelineno-368-2" href="#__codelineno-368-2"></a><span class="s">          line1</span>
-<a id="__codelineno-368-3" name="__codelineno-368-3" href="#__codelineno-368-3"></a><span class="s">          line2</span>
-<a id="__codelineno-368-4" name="__codelineno-368-4" href="#__codelineno-368-4"></a><span class="s">          &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
-<a id="__codelineno-368-5" name="__codelineno-368-5" href="#__codelineno-368-5"></a>
-<a id="__codelineno-368-6" name="__codelineno-368-6" href="#__codelineno-368-6"></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-368-7" name="__codelineno-368-7" href="#__codelineno-368-7"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="s">&quot;&quot;&quot;</span>
-<a id="__codelineno-368-8" name="__codelineno-368-8" href="#__codelineno-368-8"></a><span class="s">        line1</span>
-<a id="__codelineno-368-9" name="__codelineno-368-9" href="#__codelineno-368-9"></a><span class="s">        line2</span>
-<a id="__codelineno-368-10" name="__codelineno-368-10" href="#__codelineno-368-10"></a><span class="s">    &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
-<a id="__codelineno-368-11" name="__codelineno-368-11" href="#__codelineno-368-11"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-373-1" name="__codelineno-373-1" href="#__codelineno-373-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">&quot;&quot;&quot;</span>
+<a id="__codelineno-373-2" name="__codelineno-373-2" href="#__codelineno-373-2"></a><span class="s">          line1</span>
+<a id="__codelineno-373-3" name="__codelineno-373-3" href="#__codelineno-373-3"></a><span class="s">          line2</span>
+<a id="__codelineno-373-4" name="__codelineno-373-4" href="#__codelineno-373-4"></a><span class="s">          &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
+<a id="__codelineno-373-5" name="__codelineno-373-5" href="#__codelineno-373-5"></a>
+<a id="__codelineno-373-6" name="__codelineno-373-6" href="#__codelineno-373-6"></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-373-7" name="__codelineno-373-7" href="#__codelineno-373-7"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="s">&quot;&quot;&quot;</span>
+<a id="__codelineno-373-8" name="__codelineno-373-8" href="#__codelineno-373-8"></a><span class="s">        line1</span>
+<a id="__codelineno-373-9" name="__codelineno-373-9" href="#__codelineno-373-9"></a><span class="s">        line2</span>
+<a id="__codelineno-373-10" name="__codelineno-373-10" href="#__codelineno-373-10"></a><span class="s">    &quot;&quot;&quot;</span><span class="p">.</span><span class="na">trimIndent</span><span class="p">()</span>
+<a id="__codelineno-373-11" name="__codelineno-373-11" href="#__codelineno-373-11"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -6654,13 +6707,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-369-1" name="__codelineno-369-1" href="#__codelineno-369-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:string-template-indent&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-374-1" name="__codelineno-374-1" href="#__codelineno-374-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:string-template-indent&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-370-1" name="__codelineno-370-1" href="#__codelineno-370-1"></a>ktlint_standard_string-template-indent = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-375-1" name="__codelineno-375-1" href="#__codelineno-375-1"></a>ktlint_standard_string-template-indent = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-371-1" name="__codelineno-371-1" href="#__codelineno-371-1"></a>ktlint_standard_string-template-indent = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-376-1" name="__codelineno-376-1" href="#__codelineno-376-1"></a>ktlint_standard_string-template-indent = disabled
 </code></pre></div></li>
 </ol>
 <div class="admonition note">
@@ -6669,24 +6722,24 @@
 </div>
 <h2 id="trailing-comma-on-call-site">Trailing comma on call site<a class="headerlink" href="#trailing-comma-on-call-site" title="Permanent link">&para;</a></h2>
 <p>Enforces consistent removal (default) or adding of trailing commas on call site.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="75:2"><input checked="checked" id="__tabbed_75_1" name="__tabbed_75" type="radio" /><input id="__tabbed_75_2" name="__tabbed_75" type="radio" /><div class="tabbed-labels"><label for="__tabbed_75_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_75_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="76:2"><input checked="checked" id="__tabbed_76_1" name="__tabbed_76" type="radio" /><input id="__tabbed_76_2" name="__tabbed_76" type="radio" /><div class="tabbed-labels"><label for="__tabbed_76_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_76_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-372-1" name="__codelineno-372-1" href="#__codelineno-372-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-372-2" name="__codelineno-372-2" href="#__codelineno-372-2"></a><span class="w">    </span><span class="n">FooWrapper</span><span class="p">(</span>
-<a id="__codelineno-372-3" name="__codelineno-372-3" href="#__codelineno-372-3"></a><span class="w">        </span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-372-4" name="__codelineno-372-4" href="#__codelineno-372-4"></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-372-5" name="__codelineno-372-5" href="#__codelineno-372-5"></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-372-6" name="__codelineno-372-6" href="#__codelineno-372-6"></a><span class="w">        </span><span class="p">),</span>
-<a id="__codelineno-372-7" name="__codelineno-372-7" href="#__codelineno-372-7"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-377-1" name="__codelineno-377-1" href="#__codelineno-377-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-377-2" name="__codelineno-377-2" href="#__codelineno-377-2"></a><span class="w">    </span><span class="n">FooWrapper</span><span class="p">(</span>
+<a id="__codelineno-377-3" name="__codelineno-377-3" href="#__codelineno-377-3"></a><span class="w">        </span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-377-4" name="__codelineno-377-4" href="#__codelineno-377-4"></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-377-5" name="__codelineno-377-5" href="#__codelineno-377-5"></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-377-6" name="__codelineno-377-6" href="#__codelineno-377-6"></a><span class="w">        </span><span class="p">),</span>
+<a id="__codelineno-377-7" name="__codelineno-377-7" href="#__codelineno-377-7"></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-373-1" name="__codelineno-373-1" href="#__codelineno-373-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-373-2" name="__codelineno-373-2" href="#__codelineno-373-2"></a><span class="w">    </span><span class="n">FooWrapper</span><span class="p">(</span><span class="n">Foo</span><span class="p">(</span>
-<a id="__codelineno-373-3" name="__codelineno-373-3" href="#__codelineno-373-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-373-4" name="__codelineno-373-4" href="#__codelineno-373-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-373-5" name="__codelineno-373-5" href="#__codelineno-373-5"></a><span class="w">    </span><span class="p">),)</span><span class="w"> </span><span class="c1">// it&#39;s weird to insert &quot;,&quot; between unwrapped (continued) parenthesis</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-378-1" name="__codelineno-378-1" href="#__codelineno-378-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-378-2" name="__codelineno-378-2" href="#__codelineno-378-2"></a><span class="w">    </span><span class="n">FooWrapper</span><span class="p">(</span><span class="n">Foo</span><span class="p">(</span>
+<a id="__codelineno-378-3" name="__codelineno-378-3" href="#__codelineno-378-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-378-4" name="__codelineno-378-4" href="#__codelineno-378-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-378-5" name="__codelineno-378-5" href="#__codelineno-378-5"></a><span class="w">    </span><span class="p">),)</span><span class="w"> </span><span class="c1">// it&#39;s weird to insert &quot;,&quot; between unwrapped (continued) parenthesis</span>
 </code></pre></div>
 </div>
 </div>
@@ -6723,33 +6776,33 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-374-1" name="__codelineno-374-1" href="#__codelineno-374-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:trailing-comma-on-call-site&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-379-1" name="__codelineno-379-1" href="#__codelineno-379-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:trailing-comma-on-call-site&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-375-1" name="__codelineno-375-1" href="#__codelineno-375-1"></a>ktlint_standard_trailing-comma-on-call-site = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-380-1" name="__codelineno-380-1" href="#__codelineno-380-1"></a>ktlint_standard_trailing-comma-on-call-site = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-376-1" name="__codelineno-376-1" href="#__codelineno-376-1"></a>ktlint_standard_trailing-comma-on-call-site = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-381-1" name="__codelineno-381-1" href="#__codelineno-381-1"></a>ktlint_standard_trailing-comma-on-call-site = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="trailing-comma-on-declaration-site">Trailing comma on declaration site<a class="headerlink" href="#trailing-comma-on-declaration-site" title="Permanent link">&para;</a></h2>
 <p>Enforces consistent removal (default) or adding of trailing commas on declaration site.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="76:2"><input checked="checked" id="__tabbed_76_1" name="__tabbed_76" type="radio" /><input id="__tabbed_76_2" name="__tabbed_76" type="radio" /><div class="tabbed-labels"><label for="__tabbed_76_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_76_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="77:2"><input checked="checked" id="__tabbed_77_1" name="__tabbed_77" type="radio" /><input id="__tabbed_77_2" name="__tabbed_77" type="radio" /><div class="tabbed-labels"><label for="__tabbed_77_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_77_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-377-1" name="__codelineno-377-1" href="#__codelineno-377-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span>
-<a id="__codelineno-377-2" name="__codelineno-377-2" href="#__codelineno-377-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-377-3" name="__codelineno-377-3" href="#__codelineno-377-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-377-4" name="__codelineno-377-4" href="#__codelineno-377-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-377-5" name="__codelineno-377-5" href="#__codelineno-377-5"></a><span class="w">    </span><span class="p">),</span>
-<a id="__codelineno-377-6" name="__codelineno-377-6" href="#__codelineno-377-6"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-382-1" name="__codelineno-382-1" href="#__codelineno-382-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">FooWrapper</span><span class="p">(</span>
+<a id="__codelineno-382-2" name="__codelineno-382-2" href="#__codelineno-382-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-382-3" name="__codelineno-382-3" href="#__codelineno-382-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-382-4" name="__codelineno-382-4" href="#__codelineno-382-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-382-5" name="__codelineno-382-5" href="#__codelineno-382-5"></a><span class="w">    </span><span class="p">),</span>
+<a id="__codelineno-382-6" name="__codelineno-382-6" href="#__codelineno-382-6"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-378-1" name="__codelineno-378-1" href="#__codelineno-378-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-378-2" name="__codelineno-378-2" href="#__codelineno-378-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-378-3" name="__codelineno-378-3" href="#__codelineno-378-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-378-4" name="__codelineno-378-4" href="#__codelineno-378-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it&#39;s weird to insert &quot;,&quot; between unwrapped (continued) parenthesis</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-383-1" name="__codelineno-383-1" href="#__codelineno-383-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-383-2" name="__codelineno-383-2" href="#__codelineno-383-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-383-3" name="__codelineno-383-3" href="#__codelineno-383-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-383-4" name="__codelineno-383-4" href="#__codelineno-383-4"></a><span class="p">),)</span><span class="w"> </span><span class="c1">// it&#39;s weird to insert &quot;,&quot; between unwrapped (continued) parenthesis</span>
 </code></pre></div>
 </div>
 </div>
@@ -6786,35 +6839,35 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-379-1" name="__codelineno-379-1" href="#__codelineno-379-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:trailing-comma-on-declaration-site&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-384-1" name="__codelineno-384-1" href="#__codelineno-384-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:trailing-comma-on-declaration-site&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-380-1" name="__codelineno-380-1" href="#__codelineno-380-1"></a>ktlint_standard_trailing-comma-on-declaration-site = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-385-1" name="__codelineno-385-1" href="#__codelineno-385-1"></a>ktlint_standard_trailing-comma-on-declaration-site = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-381-1" name="__codelineno-381-1" href="#__codelineno-381-1"></a>ktlint_standard_trailing-comma-on-declaration-site = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-386-1" name="__codelineno-386-1" href="#__codelineno-386-1"></a>ktlint_standard_trailing-comma-on-declaration-site = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="type-argument-comment">Type argument comment<a class="headerlink" href="#type-argument-comment" title="Permanent link">&para;</a></h2>
 <p>Disallows comments to be placed at certain locations inside a type argument.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="77:2"><input checked="checked" id="__tabbed_77_1" name="__tabbed_77" type="radio" /><input id="__tabbed_77_2" name="__tabbed_77" type="radio" /><div class="tabbed-labels"><label for="__tabbed_77_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_77_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="78:2"><input checked="checked" id="__tabbed_78_1" name="__tabbed_78" type="radio" /><input id="__tabbed_78_2" name="__tabbed_78" type="radio" /><div class="tabbed-labels"><label for="__tabbed_78_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_78_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-382-1" name="__codelineno-382-1" href="#__codelineno-382-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
-<a id="__codelineno-382-2" name="__codelineno-382-2" href="#__codelineno-382-2"></a><span class="w">    </span><span class="cm">/* some comment */</span><span class="w"> </span>
-<a id="__codelineno-382-3" name="__codelineno-382-3" href="#__codelineno-382-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span>
-<a id="__codelineno-382-4" name="__codelineno-382-4" href="#__codelineno-382-4"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-382-5" name="__codelineno-382-5" href="#__codelineno-382-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
-<a id="__codelineno-382-6" name="__codelineno-382-6" href="#__codelineno-382-6"></a><span class="w">    </span><span class="c1">// some comment </span>
-<a id="__codelineno-382-7" name="__codelineno-382-7" href="#__codelineno-382-7"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span>
-<a id="__codelineno-382-8" name="__codelineno-382-8" href="#__codelineno-382-8"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-387-1" name="__codelineno-387-1" href="#__codelineno-387-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
+<a id="__codelineno-387-2" name="__codelineno-387-2" href="#__codelineno-387-2"></a><span class="w">    </span><span class="cm">/* some comment */</span><span class="w"> </span>
+<a id="__codelineno-387-3" name="__codelineno-387-3" href="#__codelineno-387-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span>
+<a id="__codelineno-387-4" name="__codelineno-387-4" href="#__codelineno-387-4"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-387-5" name="__codelineno-387-5" href="#__codelineno-387-5"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
+<a id="__codelineno-387-6" name="__codelineno-387-6" href="#__codelineno-387-6"></a><span class="w">    </span><span class="c1">// some comment </span>
+<a id="__codelineno-387-7" name="__codelineno-387-7" href="#__codelineno-387-7"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span>
+<a id="__codelineno-387-8" name="__codelineno-387-8" href="#__codelineno-387-8"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</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-383-1" name="__codelineno-383-1" href="#__codelineno-383-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span><span class="k">out</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="kt">Any</span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
-<a id="__codelineno-383-2" name="__codelineno-383-2" href="#__codelineno-383-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
-<a id="__codelineno-383-3" name="__codelineno-383-3" href="#__codelineno-383-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-383-4" name="__codelineno-383-4" href="#__codelineno-383-4"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-388-1" name="__codelineno-388-1" href="#__codelineno-388-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span><span class="k">out</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="kt">Any</span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<a id="__codelineno-388-2" name="__codelineno-388-2" href="#__codelineno-388-2"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
+<a id="__codelineno-388-3" name="__codelineno-388-3" href="#__codelineno-388-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="kt">Any</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-388-4" name="__codelineno-388-4" href="#__codelineno-388-4"></a><span class="w">    </span><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
 </code></pre></div>
 </div>
 </div>
@@ -6822,10 +6875,10 @@
 <div class="admonition note">
 <p class="admonition-title">Note</p>
 <p>In some projects it is an accepted practice to use EOL comments to document the parameter <em>before</em> the comma as is shown below:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-384-1" name="__codelineno-384-1" href="#__codelineno-384-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
-<a id="__codelineno-384-2" name="__codelineno-384-2" href="#__codelineno-384-2"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar1</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-384-3" name="__codelineno-384-3" href="#__codelineno-384-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar2</span><span class="p">,</span><span class="w"> </span><span class="c1">// some other comment</span>
-<a id="__codelineno-384-4" name="__codelineno-384-4" href="#__codelineno-384-4"></a><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-389-1" name="__codelineno-389-1" href="#__codelineno-389-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">Foo</span><span class="o">&lt;</span>
+<a id="__codelineno-389-2" name="__codelineno-389-2" href="#__codelineno-389-2"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar1</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-389-3" name="__codelineno-389-3" href="#__codelineno-389-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar2</span><span class="p">,</span><span class="w"> </span><span class="c1">// some other comment</span>
+<a id="__codelineno-389-4" name="__codelineno-389-4" href="#__codelineno-389-4"></a><span class="o">&gt;</span><span class="p">.</span><span class="na">foo</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span>
 </code></pre></div>
 Although this code sample might look ok, it is semantically and programmatically unclear to which type <code>some comment</code> refers. From the developer perspective it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p>
 </div>
@@ -6833,35 +6886,35 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-385-1" name="__codelineno-385-1" href="#__codelineno-385-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-argument-comment&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-390-1" name="__codelineno-390-1" href="#__codelineno-390-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:type-argument-comment&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-386-1" name="__codelineno-386-1" href="#__codelineno-386-1"></a>ktlint_standard_type-argument-comment = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-391-1" name="__codelineno-391-1" href="#__codelineno-391-1"></a>ktlint_standard_type-argument-comment = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-387-1" name="__codelineno-387-1" href="#__codelineno-387-1"></a>ktlint_standard_type-argument-comment = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-392-1" name="__codelineno-392-1" href="#__codelineno-392-1"></a>ktlint_standard_type-argument-comment = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="type-parameter-comment">Type parameter comment<a class="headerlink" href="#type-parameter-comment" title="Permanent link">&para;</a></h2>
 <p>Disallows comments to be placed at certain locations inside a type parameter.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="78:2"><input checked="checked" id="__tabbed_78_1" name="__tabbed_78" type="radio" /><input id="__tabbed_78_2" name="__tabbed_78" type="radio" /><div class="tabbed-labels"><label for="__tabbed_78_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_78_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="79:2"><input checked="checked" id="__tabbed_79_1" name="__tabbed_79" type="radio" /><input id="__tabbed_79_2" name="__tabbed_79" type="radio" /><div class="tabbed-labels"><label for="__tabbed_79_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_79_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-388-1" name="__codelineno-388-1" href="#__codelineno-388-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="o">&lt;</span>
-<a id="__codelineno-388-2" name="__codelineno-388-2" href="#__codelineno-388-2"></a><span class="w">    </span><span class="cm">/* some comment */</span><span class="w"> </span>
-<a id="__codelineno-388-3" name="__codelineno-388-3" href="#__codelineno-388-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar</span>
-<a id="__codelineno-388-4" name="__codelineno-388-4" href="#__codelineno-388-4"></a><span class="w">    </span><span class="o">&gt;</span>
-<a id="__codelineno-388-5" name="__codelineno-388-5" href="#__codelineno-388-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="o">&lt;</span>
-<a id="__codelineno-388-6" name="__codelineno-388-6" href="#__codelineno-388-6"></a><span class="w">    </span><span class="c1">// some comment </span>
-<a id="__codelineno-388-7" name="__codelineno-388-7" href="#__codelineno-388-7"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar</span>
-<a id="__codelineno-388-8" name="__codelineno-388-8" href="#__codelineno-388-8"></a><span class="w">    </span><span class="o">&gt;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-393-1" name="__codelineno-393-1" href="#__codelineno-393-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="o">&lt;</span>
+<a id="__codelineno-393-2" name="__codelineno-393-2" href="#__codelineno-393-2"></a><span class="w">    </span><span class="cm">/* some comment */</span><span class="w"> </span>
+<a id="__codelineno-393-3" name="__codelineno-393-3" href="#__codelineno-393-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar</span>
+<a id="__codelineno-393-4" name="__codelineno-393-4" href="#__codelineno-393-4"></a><span class="w">    </span><span class="o">&gt;</span>
+<a id="__codelineno-393-5" name="__codelineno-393-5" href="#__codelineno-393-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="o">&lt;</span>
+<a id="__codelineno-393-6" name="__codelineno-393-6" href="#__codelineno-393-6"></a><span class="w">    </span><span class="c1">// some comment </span>
+<a id="__codelineno-393-7" name="__codelineno-393-7" href="#__codelineno-393-7"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar</span>
+<a id="__codelineno-393-8" name="__codelineno-393-8" href="#__codelineno-393-8"></a><span class="w">    </span><span class="o">&gt;</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-389-1" name="__codelineno-389-1" href="#__codelineno-389-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="o">&lt;</span><span class="k">in</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span>
-<a id="__codelineno-389-2" name="__codelineno-389-2" href="#__codelineno-389-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="o">&lt;</span>
-<a id="__codelineno-389-3" name="__codelineno-389-3" href="#__codelineno-389-3"></a><span class="w">    </span><span class="k">in</span><span class="w"> </span><span class="n">Bar</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-389-4" name="__codelineno-389-4" href="#__codelineno-389-4"></a><span class="w">    </span><span class="o">&gt;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-394-1" name="__codelineno-394-1" href="#__codelineno-394-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="o">&lt;</span><span class="k">in</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span>
+<a id="__codelineno-394-2" name="__codelineno-394-2" href="#__codelineno-394-2"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="o">&lt;</span>
+<a id="__codelineno-394-3" name="__codelineno-394-3" href="#__codelineno-394-3"></a><span class="w">    </span><span class="k">in</span><span class="w"> </span><span class="n">Bar</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-394-4" name="__codelineno-394-4" href="#__codelineno-394-4"></a><span class="w">    </span><span class="o">&gt;</span>
 </code></pre></div>
 </div>
 </div>
@@ -6869,10 +6922,10 @@
 <div class="admonition note">
 <p class="admonition-title">Note</p>
 <p>In some projects, it is an accepted practice to use EOL comments to document the parameter <em>before</em> the comma as is shown below:
-<div class="highlight"><pre><span></span><code><a id="__codelineno-390-1" name="__codelineno-390-1" href="#__codelineno-390-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="o">&lt;</span>
-<a id="__codelineno-390-2" name="__codelineno-390-2" href="#__codelineno-390-2"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar1</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-390-3" name="__codelineno-390-3" href="#__codelineno-390-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar2</span><span class="p">,</span><span class="w"> </span><span class="c1">// some other comment</span>
-<a id="__codelineno-390-4" name="__codelineno-390-4" href="#__codelineno-390-4"></a><span class="o">&gt;</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-395-1" name="__codelineno-395-1" href="#__codelineno-395-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo</span><span class="o">&lt;</span>
+<a id="__codelineno-395-2" name="__codelineno-395-2" href="#__codelineno-395-2"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar1</span><span class="p">,</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-395-3" name="__codelineno-395-3" href="#__codelineno-395-3"></a><span class="w">    </span><span class="k">out</span><span class="w"> </span><span class="n">Bar2</span><span class="p">,</span><span class="w"> </span><span class="c1">// some other comment</span>
+<a id="__codelineno-395-4" name="__codelineno-395-4" href="#__codelineno-395-4"></a><span class="o">&gt;</span>
 </code></pre></div></p>
 </div>
 <p>Although this code sample might look ok, it is semantically and programmatically unclear on which parameter <code>some comment</code> refers. From the developer perspective, it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p>
@@ -6880,25 +6933,25 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-391-1" name="__codelineno-391-1" href="#__codelineno-391-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:type-parameter-comment&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-396-1" name="__codelineno-396-1" href="#__codelineno-396-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:type-parameter-comment&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-392-1" name="__codelineno-392-1" href="#__codelineno-392-1"></a>ktlint_standard_type-parameter-comment = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-397-1" name="__codelineno-397-1" href="#__codelineno-397-1"></a>ktlint_standard_type-parameter-comment = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-393-1" name="__codelineno-393-1" href="#__codelineno-393-1"></a>ktlint_standard_type-parameter-comment = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-398-1" name="__codelineno-398-1" href="#__codelineno-398-1"></a>ktlint_standard_type-parameter-comment = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="unnecessary-parenthesis-before-trailing-lambda">Unnecessary parenthesis before trailing lambda<a class="headerlink" href="#unnecessary-parenthesis-before-trailing-lambda" title="Permanent link">&para;</a></h2>
 <p>An empty parentheses block before a lambda is redundant.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="79:2"><input checked="checked" id="__tabbed_79_1" name="__tabbed_79" type="radio" /><input id="__tabbed_79_2" name="__tabbed_79" type="radio" /><div class="tabbed-labels"><label for="__tabbed_79_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_79_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="80:2"><input checked="checked" id="__tabbed_80_1" name="__tabbed_80" type="radio" /><input id="__tabbed_80_2" name="__tabbed_80" type="radio" /><div class="tabbed-labels"><label for="__tabbed_80_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_80_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-394-1" name="__codelineno-394-1" href="#__codelineno-394-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">&quot;some-string&quot;</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">&#39;-&#39;</span><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-399-1" name="__codelineno-399-1" href="#__codelineno-399-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">&quot;some-string&quot;</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">&#39;-&#39;</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-395-1" name="__codelineno-395-1" href="#__codelineno-395-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">&quot;some-string&quot;</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">&#39;-&#39;</span><span class="w"> </span><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-400-1" name="__codelineno-400-1" href="#__codelineno-400-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">&quot;some-string&quot;</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">&#39;-&#39;</span><span class="w"> </span><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -6907,39 +6960,39 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-396-1" name="__codelineno-396-1" href="#__codelineno-396-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:unnecessary-parentheses-before-trailing-lambda&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-401-1" name="__codelineno-401-1" href="#__codelineno-401-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:unnecessary-parentheses-before-trailing-lambda&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-397-1" name="__codelineno-397-1" href="#__codelineno-397-1"></a>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-402-1" name="__codelineno-402-1" href="#__codelineno-402-1"></a>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-398-1" name="__codelineno-398-1" href="#__codelineno-398-1"></a>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-403-1" name="__codelineno-403-1" href="#__codelineno-403-1"></a>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="value-argument-comment">Value argument comment<a class="headerlink" href="#value-argument-comment" title="Permanent link">&para;</a></h2>
 <p>Disallows comments to be placed at certain locations inside a value argument.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="80:2"><input checked="checked" id="__tabbed_80_1" name="__tabbed_80" type="radio" /><input id="__tabbed_80_2" name="__tabbed_80" type="radio" /><div class="tabbed-labels"><label for="__tabbed_80_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_80_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="81:2"><input checked="checked" id="__tabbed_81_1" name="__tabbed_81" type="radio" /><input id="__tabbed_81_2" name="__tabbed_81" type="radio" /><div class="tabbed-labels"><label for="__tabbed_81_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_81_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-399-1" name="__codelineno-399-1" href="#__codelineno-399-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-399-2" name="__codelineno-399-2" href="#__codelineno-399-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-399-3" name="__codelineno-399-3" href="#__codelineno-399-3"></a><span class="w">        </span><span class="cm">/* some comment */</span>
-<a id="__codelineno-399-4" name="__codelineno-399-4" href="#__codelineno-399-4"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-399-5" name="__codelineno-399-5" href="#__codelineno-399-5"></a><span class="w">    </span><span class="p">)</span>
-<a id="__codelineno-399-6" name="__codelineno-399-6" href="#__codelineno-399-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-399-7" name="__codelineno-399-7" href="#__codelineno-399-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-399-8" name="__codelineno-399-8" href="#__codelineno-399-8"></a><span class="w">        </span><span class="c1">// some comment</span>
-<a id="__codelineno-399-9" name="__codelineno-399-9" href="#__codelineno-399-9"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-399-10" name="__codelineno-399-10" href="#__codelineno-399-10"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-404-1" name="__codelineno-404-1" href="#__codelineno-404-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo1</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-404-2" name="__codelineno-404-2" href="#__codelineno-404-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-404-3" name="__codelineno-404-3" href="#__codelineno-404-3"></a><span class="w">        </span><span class="cm">/* some comment */</span>
+<a id="__codelineno-404-4" name="__codelineno-404-4" href="#__codelineno-404-4"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-404-5" name="__codelineno-404-5" href="#__codelineno-404-5"></a><span class="w">    </span><span class="p">)</span>
+<a id="__codelineno-404-6" name="__codelineno-404-6" href="#__codelineno-404-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foo2</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-404-7" name="__codelineno-404-7" href="#__codelineno-404-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-404-8" name="__codelineno-404-8" href="#__codelineno-404-8"></a><span class="w">        </span><span class="c1">// some comment</span>
+<a id="__codelineno-404-9" name="__codelineno-404-9" href="#__codelineno-404-9"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-404-10" name="__codelineno-404-10" href="#__codelineno-404-10"></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-400-1" name="__codelineno-400-1" href="#__codelineno-400-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="n">bar</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span><span class="p">)</span>
-<a id="__codelineno-400-2" name="__codelineno-400-2" href="#__codelineno-400-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>
-<a id="__codelineno-400-3" name="__codelineno-400-3" href="#__codelineno-400-3"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-400-4" name="__codelineno-400-4" href="#__codelineno-400-4"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="c1">// some comment</span>
-<a id="__codelineno-400-5" name="__codelineno-400-5" href="#__codelineno-400-5"></a><span class="w">            </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-400-6" name="__codelineno-400-6" href="#__codelineno-400-6"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-405-1" name="__codelineno-405-1" href="#__codelineno-405-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="n">bar</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span><span class="p">)</span>
+<a id="__codelineno-405-2" name="__codelineno-405-2" href="#__codelineno-405-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>
+<a id="__codelineno-405-3" name="__codelineno-405-3" href="#__codelineno-405-3"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-405-4" name="__codelineno-405-4" href="#__codelineno-405-4"></a><span class="w">        </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="c1">// some comment</span>
+<a id="__codelineno-405-5" name="__codelineno-405-5" href="#__codelineno-405-5"></a><span class="w">            </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-405-6" name="__codelineno-405-6" href="#__codelineno-405-6"></a><span class="w">    </span><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -6948,46 +7001,46 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-401-1" name="__codelineno-401-1" href="#__codelineno-401-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:value-argument-comment&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-406-1" name="__codelineno-406-1" href="#__codelineno-406-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:value-argument-comment&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-402-1" name="__codelineno-402-1" href="#__codelineno-402-1"></a>ktlint_standard_value-argument-comment = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-407-1" name="__codelineno-407-1" href="#__codelineno-407-1"></a>ktlint_standard_value-argument-comment = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-403-1" name="__codelineno-403-1" href="#__codelineno-403-1"></a>ktlint_standard_value-argument-comment = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-408-1" name="__codelineno-408-1" href="#__codelineno-408-1"></a>ktlint_standard_value-argument-comment = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="value-parameter-comment">Value parameter comment<a class="headerlink" href="#value-parameter-comment" title="Permanent link">&para;</a></h2>
 <p>Disallows comments to be placed at certain locations inside a value argument.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="81:2"><input checked="checked" id="__tabbed_81_1" name="__tabbed_81" type="radio" /><input id="__tabbed_81_2" name="__tabbed_81" type="radio" /><div class="tabbed-labels"><label for="__tabbed_81_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_81_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="82:2"><input checked="checked" id="__tabbed_82_1" name="__tabbed_82" type="radio" /><input id="__tabbed_82_2" name="__tabbed_82" type="radio" /><div class="tabbed-labels"><label for="__tabbed_82_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_82_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-404-1" name="__codelineno-404-1" href="#__codelineno-404-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="p">(</span>
-<a id="__codelineno-404-2" name="__codelineno-404-2" href="#__codelineno-404-2"></a><span class="w">    </span><span class="cm">/** some kdoc */</span>
-<a id="__codelineno-404-3" name="__codelineno-404-3" href="#__codelineno-404-3"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-404-4" name="__codelineno-404-4" href="#__codelineno-404-4"></a><span class="p">)</span>
-<a id="__codelineno-404-5" name="__codelineno-404-5" href="#__codelineno-404-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="p">(</span>
-<a id="__codelineno-404-6" name="__codelineno-404-6" href="#__codelineno-404-6"></a><span class="w">    </span><span class="cm">/* some comment */</span>
-<a id="__codelineno-404-7" name="__codelineno-404-7" href="#__codelineno-404-7"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-404-8" name="__codelineno-404-8" href="#__codelineno-404-8"></a><span class="p">)</span>
-<a id="__codelineno-404-9" name="__codelineno-404-9" href="#__codelineno-404-9"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo3</span><span class="p">(</span>
-<a id="__codelineno-404-10" name="__codelineno-404-10" href="#__codelineno-404-10"></a><span class="w">    </span><span class="c1">// some comment</span>
-<a id="__codelineno-404-11" name="__codelineno-404-11" href="#__codelineno-404-11"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-404-12" name="__codelineno-404-12" href="#__codelineno-404-12"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-409-1" name="__codelineno-409-1" href="#__codelineno-409-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="p">(</span>
+<a id="__codelineno-409-2" name="__codelineno-409-2" href="#__codelineno-409-2"></a><span class="w">    </span><span class="cm">/** some kdoc */</span>
+<a id="__codelineno-409-3" name="__codelineno-409-3" href="#__codelineno-409-3"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-409-4" name="__codelineno-409-4" href="#__codelineno-409-4"></a><span class="p">)</span>
+<a id="__codelineno-409-5" name="__codelineno-409-5" href="#__codelineno-409-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="p">(</span>
+<a id="__codelineno-409-6" name="__codelineno-409-6" href="#__codelineno-409-6"></a><span class="w">    </span><span class="cm">/* some comment */</span>
+<a id="__codelineno-409-7" name="__codelineno-409-7" href="#__codelineno-409-7"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-409-8" name="__codelineno-409-8" href="#__codelineno-409-8"></a><span class="p">)</span>
+<a id="__codelineno-409-9" name="__codelineno-409-9" href="#__codelineno-409-9"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo3</span><span class="p">(</span>
+<a id="__codelineno-409-10" name="__codelineno-409-10" href="#__codelineno-409-10"></a><span class="w">    </span><span class="c1">// some comment</span>
+<a id="__codelineno-409-11" name="__codelineno-409-11" href="#__codelineno-409-11"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-409-12" name="__codelineno-409-12" href="#__codelineno-409-12"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-405-1" name="__codelineno-405-1" href="#__codelineno-405-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="p">(</span>
-<a id="__codelineno-405-2" name="__codelineno-405-2" href="#__codelineno-405-2"></a><span class="w">   </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="cm">/** some kdoc */</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-405-3" name="__codelineno-405-3" href="#__codelineno-405-3"></a><span class="p">)</span>
-<a id="__codelineno-405-4" name="__codelineno-405-4" href="#__codelineno-405-4"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="p">(</span>
-<a id="__codelineno-405-5" name="__codelineno-405-5" href="#__codelineno-405-5"></a><span class="w">   </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-405-6" name="__codelineno-405-6" href="#__codelineno-405-6"></a><span class="p">)</span>
-<a id="__codelineno-405-7" name="__codelineno-405-7" href="#__codelineno-405-7"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo3</span><span class="p">(</span>
-<a id="__codelineno-405-8" name="__codelineno-405-8" href="#__codelineno-405-8"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-405-9" name="__codelineno-405-9" href="#__codelineno-405-9"></a><span class="w">       </span><span class="c1">// some comment</span>
-<a id="__codelineno-405-10" name="__codelineno-405-10" href="#__codelineno-405-10"></a><span class="w">       </span><span class="s">&quot;bar&quot;</span>
-<a id="__codelineno-405-11" name="__codelineno-405-11" href="#__codelineno-405-11"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-410-1" name="__codelineno-410-1" href="#__codelineno-410-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo1</span><span class="p">(</span>
+<a id="__codelineno-410-2" name="__codelineno-410-2" href="#__codelineno-410-2"></a><span class="w">   </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="cm">/** some kdoc */</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-410-3" name="__codelineno-410-3" href="#__codelineno-410-3"></a><span class="p">)</span>
+<a id="__codelineno-410-4" name="__codelineno-410-4" href="#__codelineno-410-4"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo2</span><span class="p">(</span>
+<a id="__codelineno-410-5" name="__codelineno-410-5" href="#__codelineno-410-5"></a><span class="w">   </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="cm">/* some comment */</span><span class="w"> </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-410-6" name="__codelineno-410-6" href="#__codelineno-410-6"></a><span class="p">)</span>
+<a id="__codelineno-410-7" name="__codelineno-410-7" href="#__codelineno-410-7"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Foo3</span><span class="p">(</span>
+<a id="__codelineno-410-8" name="__codelineno-410-8" href="#__codelineno-410-8"></a><span class="w">    </span><span class="n">bar</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-410-9" name="__codelineno-410-9" href="#__codelineno-410-9"></a><span class="w">       </span><span class="c1">// some comment</span>
+<a id="__codelineno-410-10" name="__codelineno-410-10" href="#__codelineno-410-10"></a><span class="w">       </span><span class="s">&quot;bar&quot;</span>
+<a id="__codelineno-410-11" name="__codelineno-410-11" href="#__codelineno-410-11"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -6996,35 +7049,35 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-406-1" name="__codelineno-406-1" href="#__codelineno-406-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:value-parameter-comment&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-411-1" name="__codelineno-411-1" href="#__codelineno-411-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:value-parameter-comment&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-407-1" name="__codelineno-407-1" href="#__codelineno-407-1"></a>ktlint_standard_value-parameter-comment = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-412-1" name="__codelineno-412-1" href="#__codelineno-412-1"></a>ktlint_standard_value-parameter-comment = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-408-1" name="__codelineno-408-1" href="#__codelineno-408-1"></a>ktlint_standard_value-parameter-comment = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-413-1" name="__codelineno-413-1" href="#__codelineno-413-1"></a>ktlint_standard_value-parameter-comment = disabled
 </code></pre></div></li>
 </ol>
 <h2 id="wrapping">Wrapping<a class="headerlink" href="#wrapping" title="Permanent link">&para;</a></h2>
 <h3 id="argument-list-wrapping">Argument list wrapping<a class="headerlink" href="#argument-list-wrapping" title="Permanent link">&para;</a></h3>
 <p>All arguments should either be on the same line, or on a separate line.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="82:2"><input checked="checked" id="__tabbed_82_1" name="__tabbed_82" type="radio" /><input id="__tabbed_82_2" name="__tabbed_82" type="radio" /><div class="tabbed-labels"><label for="__tabbed_82_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_82_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="83:2"><input checked="checked" id="__tabbed_83_1" name="__tabbed_83" type="radio" /><input id="__tabbed_83_2" name="__tabbed_83" type="radio" /><div class="tabbed-labels"><label for="__tabbed_83_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_83_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-409-1" name="__codelineno-409-1" href="#__codelineno-409-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-409-2" name="__codelineno-409-2" href="#__codelineno-409-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-409-3" name="__codelineno-409-3" href="#__codelineno-409-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-409-4" name="__codelineno-409-4" href="#__codelineno-409-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span>
-<a id="__codelineno-409-5" name="__codelineno-409-5" href="#__codelineno-409-5"></a><span class="w">        </span><span class="n">c</span><span class="p">,</span>
-<a id="__codelineno-409-6" name="__codelineno-409-6" href="#__codelineno-409-6"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-414-1" name="__codelineno-414-1" href="#__codelineno-414-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-414-2" name="__codelineno-414-2" href="#__codelineno-414-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-414-3" name="__codelineno-414-3" href="#__codelineno-414-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-414-4" name="__codelineno-414-4" href="#__codelineno-414-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span>
+<a id="__codelineno-414-5" name="__codelineno-414-5" href="#__codelineno-414-5"></a><span class="w">        </span><span class="n">c</span><span class="p">,</span>
+<a id="__codelineno-414-6" name="__codelineno-414-6" href="#__codelineno-414-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-410-1" name="__codelineno-410-1" href="#__codelineno-410-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-410-2" name="__codelineno-410-2" href="#__codelineno-410-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-410-3" name="__codelineno-410-3" href="#__codelineno-410-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-410-4" name="__codelineno-410-4" href="#__codelineno-410-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">,</span>
-<a id="__codelineno-410-5" name="__codelineno-410-5" href="#__codelineno-410-5"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-415-1" name="__codelineno-415-1" href="#__codelineno-415-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-415-2" name="__codelineno-415-2" href="#__codelineno-415-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-415-3" name="__codelineno-415-3" href="#__codelineno-415-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-415-4" name="__codelineno-415-4" href="#__codelineno-415-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">,</span>
+<a id="__codelineno-415-5" name="__codelineno-415-5" href="#__codelineno-415-5"></a><span class="w">    </span><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -7057,39 +7110,39 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-411-1" name="__codelineno-411-1" href="#__codelineno-411-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:argument-list-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-416-1" name="__codelineno-416-1" href="#__codelineno-416-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:argument-list-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-412-1" name="__codelineno-412-1" href="#__codelineno-412-1"></a>ktlint_standard_argument-list-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-417-1" name="__codelineno-417-1" href="#__codelineno-417-1"></a>ktlint_standard_argument-list-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-413-1" name="__codelineno-413-1" href="#__codelineno-413-1"></a>ktlint_standard_argument-list-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-418-1" name="__codelineno-418-1" href="#__codelineno-418-1"></a>ktlint_standard_argument-list-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="chain-wrapping">Chain wrapping<a class="headerlink" href="#chain-wrapping" title="Permanent link">&para;</a></h3>
 <p>When wrapping chained calls <code>.</code>, <code>?.</code> and <code>?:</code> should be placed on the next line</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="83:2"><input checked="checked" id="__tabbed_83_1" name="__tabbed_83" type="radio" /><input id="__tabbed_83_2" name="__tabbed_83" type="radio" /><div class="tabbed-labels"><label for="__tabbed_83_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_83_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="84:2"><input checked="checked" id="__tabbed_84_1" name="__tabbed_84" type="radio" /><input id="__tabbed_84_2" name="__tabbed_84" type="radio" /><div class="tabbed-labels"><label for="__tabbed_84_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_84_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-414-1" name="__codelineno-414-1" href="#__codelineno-414-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-414-2" name="__codelineno-414-2" href="#__codelineno-414-2"></a><span class="w">    </span><span class="n">listOf</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
-<a id="__codelineno-414-3" name="__codelineno-414-3" href="#__codelineno-414-3"></a><span class="w">        </span><span class="p">.</span><span class="na">filter</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">&gt;</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">}</span><span class="o">!!</span>
-<a id="__codelineno-414-4" name="__codelineno-414-4" href="#__codelineno-414-4"></a><span class="w">        </span><span class="p">.</span><span class="na">takeIf</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">count</span><span class="p">()</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-414-5" name="__codelineno-414-5" href="#__codelineno-414-5"></a><span class="w">        </span><span class="o">?.</span><span class="na">sum</span><span class="p">()</span>
-<a id="__codelineno-414-6" name="__codelineno-414-6" href="#__codelineno-414-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foobar</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-414-7" name="__codelineno-414-7" href="#__codelineno-414-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">()</span>
-<a id="__codelineno-414-8" name="__codelineno-414-8" href="#__codelineno-414-8"></a><span class="w">        </span><span class="o">?:</span><span class="w"> </span><span class="n">bar</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-419-1" name="__codelineno-419-1" href="#__codelineno-419-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-419-2" name="__codelineno-419-2" href="#__codelineno-419-2"></a><span class="w">    </span><span class="n">listOf</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">)</span>
+<a id="__codelineno-419-3" name="__codelineno-419-3" href="#__codelineno-419-3"></a><span class="w">        </span><span class="p">.</span><span class="na">filter</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">&gt;</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">}</span><span class="o">!!</span>
+<a id="__codelineno-419-4" name="__codelineno-419-4" href="#__codelineno-419-4"></a><span class="w">        </span><span class="p">.</span><span class="na">takeIf</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">count</span><span class="p">()</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-419-5" name="__codelineno-419-5" href="#__codelineno-419-5"></a><span class="w">        </span><span class="o">?.</span><span class="na">sum</span><span class="p">()</span>
+<a id="__codelineno-419-6" name="__codelineno-419-6" href="#__codelineno-419-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foobar</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-419-7" name="__codelineno-419-7" href="#__codelineno-419-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">()</span>
+<a id="__codelineno-419-8" name="__codelineno-419-8" href="#__codelineno-419-8"></a><span class="w">        </span><span class="o">?:</span><span class="w"> </span><span class="n">bar</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-415-1" name="__codelineno-415-1" href="#__codelineno-415-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-415-2" name="__codelineno-415-2" href="#__codelineno-415-2"></a><span class="w">    </span><span class="n">listOf</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">).</span>
-<a id="__codelineno-415-3" name="__codelineno-415-3" href="#__codelineno-415-3"></a><span class="w">        </span><span class="n">filter</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">&gt;</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">}</span><span class="o">!!</span><span class="p">.</span>
-<a id="__codelineno-415-4" name="__codelineno-415-4" href="#__codelineno-415-4"></a><span class="w">        </span><span class="n">takeIf</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">count</span><span class="p">()</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="p">}</span><span class="o">?.</span>
-<a id="__codelineno-415-5" name="__codelineno-415-5" href="#__codelineno-415-5"></a><span class="w">        </span><span class="n">sum</span><span class="p">()</span>
-<a id="__codelineno-415-6" name="__codelineno-415-6" href="#__codelineno-415-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foobar</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-415-7" name="__codelineno-415-7" href="#__codelineno-415-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="o">?:</span>
-<a id="__codelineno-415-8" name="__codelineno-415-8" href="#__codelineno-415-8"></a><span class="w">        </span><span class="n">bar</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-420-1" name="__codelineno-420-1" href="#__codelineno-420-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-420-2" name="__codelineno-420-2" href="#__codelineno-420-2"></a><span class="w">    </span><span class="n">listOf</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">).</span>
+<a id="__codelineno-420-3" name="__codelineno-420-3" href="#__codelineno-420-3"></a><span class="w">        </span><span class="n">filter</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">&gt;</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="p">}</span><span class="o">!!</span><span class="p">.</span>
+<a id="__codelineno-420-4" name="__codelineno-420-4" href="#__codelineno-420-4"></a><span class="w">        </span><span class="n">takeIf</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">count</span><span class="p">()</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">100</span><span class="w"> </span><span class="p">}</span><span class="o">?.</span>
+<a id="__codelineno-420-5" name="__codelineno-420-5" href="#__codelineno-420-5"></a><span class="w">        </span><span class="n">sum</span><span class="p">()</span>
+<a id="__codelineno-420-6" name="__codelineno-420-6" href="#__codelineno-420-6"></a><span class="kd">val</span><span class="w"> </span><span class="nv">foobar</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-420-7" name="__codelineno-420-7" href="#__codelineno-420-7"></a><span class="w">    </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="o">?:</span>
+<a id="__codelineno-420-8" name="__codelineno-420-8" href="#__codelineno-420-8"></a><span class="w">        </span><span class="n">bar</span>
 </code></pre></div>
 </div>
 </div>
@@ -7098,32 +7151,32 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-416-1" name="__codelineno-416-1" href="#__codelineno-416-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:chain-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-421-1" name="__codelineno-421-1" href="#__codelineno-421-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:chain-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-417-1" name="__codelineno-417-1" href="#__codelineno-417-1"></a>ktlint_standard_chain-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-422-1" name="__codelineno-422-1" href="#__codelineno-422-1"></a>ktlint_standard_chain-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-418-1" name="__codelineno-418-1" href="#__codelineno-418-1"></a>ktlint_standard_chain-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-423-1" name="__codelineno-423-1" href="#__codelineno-423-1"></a>ktlint_standard_chain-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="comment-wrapping">Comment wrapping<a class="headerlink" href="#comment-wrapping" title="Permanent link">&para;</a></h3>
 <p>A block comment must start and end on a line that does not contain any other element.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="84:2"><input checked="checked" id="__tabbed_84_1" name="__tabbed_84" type="radio" /><input id="__tabbed_84_2" name="__tabbed_84" type="radio" /><div class="tabbed-labels"><label for="__tabbed_84_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_84_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="85:2"><input checked="checked" id="__tabbed_85_1" name="__tabbed_85" type="radio" /><input id="__tabbed_85_2" name="__tabbed_85" type="radio" /><div class="tabbed-labels"><label for="__tabbed_85_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_85_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-419-1" name="__codelineno-419-1" href="#__codelineno-419-1"></a><span class="c1">// Some comment 1</span>
-<a id="__codelineno-419-2" name="__codelineno-419-2" href="#__codelineno-419-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">&quot;foo1&quot;</span>
-<a id="__codelineno-419-3" name="__codelineno-419-3" href="#__codelineno-419-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">&quot;foo&quot;</span><span class="w"> </span><span class="c1">// Some comment</span>
-<a id="__codelineno-419-4" name="__codelineno-419-4" href="#__codelineno-419-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-424-1" name="__codelineno-424-1" href="#__codelineno-424-1"></a><span class="c1">// Some comment 1</span>
+<a id="__codelineno-424-2" name="__codelineno-424-2" href="#__codelineno-424-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">&quot;foo1&quot;</span>
+<a id="__codelineno-424-3" name="__codelineno-424-3" href="#__codelineno-424-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">&quot;foo&quot;</span><span class="w"> </span><span class="c1">// Some comment</span>
+<a id="__codelineno-424-4" name="__codelineno-424-4" href="#__codelineno-424-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-420-1" name="__codelineno-420-1" href="#__codelineno-420-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">&quot;foo1&quot;</span>
-<a id="__codelineno-420-2" name="__codelineno-420-2" href="#__codelineno-420-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">&quot;foo&quot;</span><span class="w"> </span><span class="cm">/* Block comment instead of end-of-line comment */</span>
-<a id="__codelineno-420-3" name="__codelineno-420-3" href="#__codelineno-420-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">&quot;foo&quot;</span><span class="w"> </span><span class="cm">/* Some comment</span>
-<a id="__codelineno-420-4" name="__codelineno-420-4" href="#__codelineno-420-4"></a><span class="cm">                  * with a newline</span>
-<a id="__codelineno-420-5" name="__codelineno-420-5" href="#__codelineno-420-5"></a><span class="cm">                  */</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-425-1" name="__codelineno-425-1" href="#__codelineno-425-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">&quot;foo1&quot;</span>
+<a id="__codelineno-425-2" name="__codelineno-425-2" href="#__codelineno-425-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">&quot;foo&quot;</span><span class="w"> </span><span class="cm">/* Block comment instead of end-of-line comment */</span>
+<a id="__codelineno-425-3" name="__codelineno-425-3" href="#__codelineno-425-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">&quot;foo&quot;</span><span class="w"> </span><span class="cm">/* Some comment</span>
+<a id="__codelineno-425-4" name="__codelineno-425-4" href="#__codelineno-425-4"></a><span class="cm">                  * with a newline</span>
+<a id="__codelineno-425-5" name="__codelineno-425-5" href="#__codelineno-425-5"></a><span class="cm">                  */</span>
 </code></pre></div>
 </div>
 </div>
@@ -7132,13 +7185,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-421-1" name="__codelineno-421-1" href="#__codelineno-421-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:comment-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-426-1" name="__codelineno-426-1" href="#__codelineno-426-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:comment-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-422-1" name="__codelineno-422-1" href="#__codelineno-422-1"></a>ktlint_standard_comment-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-427-1" name="__codelineno-427-1" href="#__codelineno-427-1"></a>ktlint_standard_comment-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-423-1" name="__codelineno-423-1" href="#__codelineno-423-1"></a>ktlint_standard_comment-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-428-1" name="__codelineno-428-1" href="#__codelineno-428-1"></a>ktlint_standard_comment-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="context-receiver-wrapping">Context receiver wrapping<a class="headerlink" href="#context-receiver-wrapping" title="Permanent link">&para;</a></h3>
@@ -7151,50 +7204,50 @@
 <p>This rule does not affect context parameters. See rule <code>context-receiver-list-wrapping</code> for wrapping of context parameters.</p>
 </div>
 <p>Wraps the context receiver list containing a context receiver 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>
-<div class="tabbed-set tabbed-alternate" data-tabs="85:2"><input checked="checked" id="__tabbed_85_1" name="__tabbed_85" type="radio" /><input id="__tabbed_85_2" name="__tabbed_85" type="radio" /><div class="tabbed-labels"><label for="__tabbed_85_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_85_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="86:2"><input checked="checked" id="__tabbed_86_1" name="__tabbed_86" type="radio" /><input id="__tabbed_86_2" name="__tabbed_86" type="radio" /><div class="tabbed-labels"><label for="__tabbed_86_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_86_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-424-1" name="__codelineno-424-1" href="#__codelineno-424-1"></a><span class="c1">// Always wrap regardless of whether max line length is set</span>
-<a id="__codelineno-424-2" name="__codelineno-424-2" href="#__codelineno-424-2"></a><span class="n">context</span><span class="p">(</span><span class="n">Foo</span><span class="p">)</span>
-<a id="__codelineno-424-3" name="__codelineno-424-3" href="#__codelineno-424-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-424-4" name="__codelineno-424-4" href="#__codelineno-424-4"></a>
-<a id="__codelineno-424-5" name="__codelineno-424-5" href="#__codelineno-424-5"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
-<a id="__codelineno-424-6" name="__codelineno-424-6" href="#__codelineno-424-6"></a><span class="c1">// entire context receiver list does not fit on a single line</span>
-<a id="__codelineno-424-7" name="__codelineno-424-7" href="#__codelineno-424-7"></a><span class="n">context</span><span class="p">(</span>
-<a id="__codelineno-424-8" name="__codelineno-424-8" href="#__codelineno-424-8"></a><span class="w">    </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span>
-<a id="__codelineno-424-9" name="__codelineno-424-9" href="#__codelineno-424-9"></a><span class="w">    </span><span class="n">Foooooooooooooooooooooooooooooo2</span>
-<a id="__codelineno-424-10" name="__codelineno-424-10" href="#__codelineno-424-10"></a><span class="p">)</span>
-<a id="__codelineno-424-11" name="__codelineno-424-11" href="#__codelineno-424-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-424-12" name="__codelineno-424-12" href="#__codelineno-424-12"></a>
-<a id="__codelineno-424-13" name="__codelineno-424-13" href="#__codelineno-424-13"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
-<a id="__codelineno-424-14" name="__codelineno-424-14" href="#__codelineno-424-14"></a><span class="c1">// entire context receiver list does not fit on a single line.</span>
-<a id="__codelineno-424-15" name="__codelineno-424-15" href="#__codelineno-424-15"></a><span class="c1">// Also, wrap each of it projection types in case a context</span>
-<a id="__codelineno-424-16" name="__codelineno-424-16" href="#__codelineno-424-16"></a><span class="c1">// receiver does not fit on a single line after it has been</span>
-<a id="__codelineno-424-17" name="__codelineno-424-17" href="#__codelineno-424-17"></a><span class="c1">// wrapped.</span>
-<a id="__codelineno-424-18" name="__codelineno-424-18" href="#__codelineno-424-18"></a><span class="n">context</span><span class="p">(</span>
-<a id="__codelineno-424-19" name="__codelineno-424-19" href="#__codelineno-424-19"></a><span class="w">    </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span>
-<a id="__codelineno-424-20" name="__codelineno-424-20" href="#__codelineno-424-20"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-424-21" name="__codelineno-424-21" href="#__codelineno-424-21"></a><span class="w">        </span><span class="n">Bar</span><span class="p">,</span>
-<a id="__codelineno-424-22" name="__codelineno-424-22" href="#__codelineno-424-22"></a><span class="w">        </span><span class="o">&gt;</span>
-<a id="__codelineno-424-23" name="__codelineno-424-23" href="#__codelineno-424-23"></a><span class="p">)</span>
-<a id="__codelineno-424-24" name="__codelineno-424-24" href="#__codelineno-424-24"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-429-1" name="__codelineno-429-1" href="#__codelineno-429-1"></a><span class="c1">// Always wrap regardless of whether max line length is set</span>
+<a id="__codelineno-429-2" name="__codelineno-429-2" href="#__codelineno-429-2"></a><span class="n">context</span><span class="p">(</span><span class="n">Foo</span><span class="p">)</span>
+<a id="__codelineno-429-3" name="__codelineno-429-3" href="#__codelineno-429-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-429-4" name="__codelineno-429-4" href="#__codelineno-429-4"></a>
+<a id="__codelineno-429-5" name="__codelineno-429-5" href="#__codelineno-429-5"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
+<a id="__codelineno-429-6" name="__codelineno-429-6" href="#__codelineno-429-6"></a><span class="c1">// entire context receiver list does not fit on a single line</span>
+<a id="__codelineno-429-7" name="__codelineno-429-7" href="#__codelineno-429-7"></a><span class="n">context</span><span class="p">(</span>
+<a id="__codelineno-429-8" name="__codelineno-429-8" href="#__codelineno-429-8"></a><span class="w">    </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span>
+<a id="__codelineno-429-9" name="__codelineno-429-9" href="#__codelineno-429-9"></a><span class="w">    </span><span class="n">Foooooooooooooooooooooooooooooo2</span>
+<a id="__codelineno-429-10" name="__codelineno-429-10" href="#__codelineno-429-10"></a><span class="p">)</span>
+<a id="__codelineno-429-11" name="__codelineno-429-11" href="#__codelineno-429-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-429-12" name="__codelineno-429-12" href="#__codelineno-429-12"></a>
+<a id="__codelineno-429-13" name="__codelineno-429-13" href="#__codelineno-429-13"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
+<a id="__codelineno-429-14" name="__codelineno-429-14" href="#__codelineno-429-14"></a><span class="c1">// entire context receiver list does not fit on a single line.</span>
+<a id="__codelineno-429-15" name="__codelineno-429-15" href="#__codelineno-429-15"></a><span class="c1">// Also, wrap each of it projection types in case a context</span>
+<a id="__codelineno-429-16" name="__codelineno-429-16" href="#__codelineno-429-16"></a><span class="c1">// receiver does not fit on a single line after it has been</span>
+<a id="__codelineno-429-17" name="__codelineno-429-17" href="#__codelineno-429-17"></a><span class="c1">// wrapped.</span>
+<a id="__codelineno-429-18" name="__codelineno-429-18" href="#__codelineno-429-18"></a><span class="n">context</span><span class="p">(</span>
+<a id="__codelineno-429-19" name="__codelineno-429-19" href="#__codelineno-429-19"></a><span class="w">    </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span>
+<a id="__codelineno-429-20" name="__codelineno-429-20" href="#__codelineno-429-20"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-429-21" name="__codelineno-429-21" href="#__codelineno-429-21"></a><span class="w">        </span><span class="n">Bar</span><span class="p">,</span>
+<a id="__codelineno-429-22" name="__codelineno-429-22" href="#__codelineno-429-22"></a><span class="w">        </span><span class="o">&gt;</span>
+<a id="__codelineno-429-23" name="__codelineno-429-23" href="#__codelineno-429-23"></a><span class="p">)</span>
+<a id="__codelineno-429-24" name="__codelineno-429-24" href="#__codelineno-429-24"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-425-1" name="__codelineno-425-1" href="#__codelineno-425-1"></a><span class="c1">// Should be wrapped regardless of whether max line length is set</span>
-<a id="__codelineno-425-2" name="__codelineno-425-2" href="#__codelineno-425-2"></a><span class="n">context</span><span class="p">(</span><span class="n">Foo</span><span class="p">)</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-425-3" name="__codelineno-425-3" href="#__codelineno-425-3"></a>
-<a id="__codelineno-425-4" name="__codelineno-425-4" href="#__codelineno-425-4"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
-<a id="__codelineno-425-5" name="__codelineno-425-5" href="#__codelineno-425-5"></a><span class="c1">// fit on a single line</span>
-<a id="__codelineno-425-6" name="__codelineno-425-6" href="#__codelineno-425-6"></a><span class="n">context</span><span class="p">(</span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span><span class="p">)</span>
-<a id="__codelineno-425-7" name="__codelineno-425-7" href="#__codelineno-425-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-425-8" name="__codelineno-425-8" href="#__codelineno-425-8"></a>
-<a id="__codelineno-425-9" name="__codelineno-425-9" href="#__codelineno-425-9"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
-<a id="__codelineno-425-10" name="__codelineno-425-10" href="#__codelineno-425-10"></a><span class="c1">// fit on a single line. Also, it should wrap each of it projection</span>
-<a id="__codelineno-425-11" name="__codelineno-425-11" href="#__codelineno-425-11"></a><span class="c1">// type in case a context receiver does not fit on a single line </span>
-<a id="__codelineno-425-12" name="__codelineno-425-12" href="#__codelineno-425-12"></a><span class="c1">// after it has been wrapped.</span>
-<a id="__codelineno-425-13" name="__codelineno-425-13" href="#__codelineno-425-13"></a><span class="n">context</span><span class="p">(</span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span><span class="p">)</span>
-<a id="__codelineno-425-14" name="__codelineno-425-14" href="#__codelineno-425-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-430-1" name="__codelineno-430-1" href="#__codelineno-430-1"></a><span class="c1">// Should be wrapped regardless of whether max line length is set</span>
+<a id="__codelineno-430-2" name="__codelineno-430-2" href="#__codelineno-430-2"></a><span class="n">context</span><span class="p">(</span><span class="n">Foo</span><span class="p">)</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-430-3" name="__codelineno-430-3" href="#__codelineno-430-3"></a>
+<a id="__codelineno-430-4" name="__codelineno-430-4" href="#__codelineno-430-4"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
+<a id="__codelineno-430-5" name="__codelineno-430-5" href="#__codelineno-430-5"></a><span class="c1">// fit on a single line</span>
+<a id="__codelineno-430-6" name="__codelineno-430-6" href="#__codelineno-430-6"></a><span class="n">context</span><span class="p">(</span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span><span class="p">)</span>
+<a id="__codelineno-430-7" name="__codelineno-430-7" href="#__codelineno-430-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-430-8" name="__codelineno-430-8" href="#__codelineno-430-8"></a>
+<a id="__codelineno-430-9" name="__codelineno-430-9" href="#__codelineno-430-9"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
+<a id="__codelineno-430-10" name="__codelineno-430-10" href="#__codelineno-430-10"></a><span class="c1">// fit on a single line. Also, it should wrap each of it projection</span>
+<a id="__codelineno-430-11" name="__codelineno-430-11" href="#__codelineno-430-11"></a><span class="c1">// type in case a context receiver does not fit on a single line </span>
+<a id="__codelineno-430-12" name="__codelineno-430-12" href="#__codelineno-430-12"></a><span class="c1">// after it has been wrapped.</span>
+<a id="__codelineno-430-13" name="__codelineno-430-13" href="#__codelineno-430-13"></a><span class="n">context</span><span class="p">(</span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span><span class="p">)</span>
+<a id="__codelineno-430-14" name="__codelineno-430-14" href="#__codelineno-430-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
 </code></pre></div>
 </div>
 </div>
@@ -7221,13 +7274,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-426-1" name="__codelineno-426-1" href="#__codelineno-426-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:context-receiver-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-431-1" name="__codelineno-431-1" href="#__codelineno-431-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:context-receiver-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-427-1" name="__codelineno-427-1" href="#__codelineno-427-1"></a>ktlint_standard_context-receiver-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-432-1" name="__codelineno-432-1" href="#__codelineno-432-1"></a>ktlint_standard_context-receiver-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-428-1" name="__codelineno-428-1" href="#__codelineno-428-1"></a>ktlint_standard_context-receiver-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-433-1" name="__codelineno-433-1" href="#__codelineno-433-1"></a>ktlint_standard_context-receiver-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="context-receiver-list-wrapping">Context receiver list wrapping<a class="headerlink" href="#context-receiver-list-wrapping" title="Permanent link">&para;</a></h3>
@@ -7236,50 +7289,50 @@
 <p>This rule does not affect context receivers. See rule <code>context-receiver-wrapping</code> for wrapping of context receivers.</p>
 </div>
 <p>Wraps the context receiver list containing a context parameter 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>
-<div class="tabbed-set tabbed-alternate" data-tabs="86:2"><input checked="checked" id="__tabbed_86_1" name="__tabbed_86" type="radio" /><input id="__tabbed_86_2" name="__tabbed_86" type="radio" /><div class="tabbed-labels"><label for="__tabbed_86_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_86_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="87:2"><input checked="checked" id="__tabbed_87_1" name="__tabbed_87" type="radio" /><input id="__tabbed_87_2" name="__tabbed_87" type="radio" /><div class="tabbed-labels"><label for="__tabbed_87_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_87_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-429-1" name="__codelineno-429-1" href="#__codelineno-429-1"></a><span class="c1">// Always wrap regardless of whether max line length is set</span>
-<a id="__codelineno-429-2" name="__codelineno-429-2" href="#__codelineno-429-2"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">)</span>
-<a id="__codelineno-429-3" name="__codelineno-429-3" href="#__codelineno-429-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-429-4" name="__codelineno-429-4" href="#__codelineno-429-4"></a>
-<a id="__codelineno-429-5" name="__codelineno-429-5" href="#__codelineno-429-5"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
-<a id="__codelineno-429-6" name="__codelineno-429-6" href="#__codelineno-429-6"></a><span class="c1">// entire context receiver list does not fit on a single line</span>
-<a id="__codelineno-429-7" name="__codelineno-429-7" href="#__codelineno-429-7"></a><span class="n">context</span><span class="p">(</span>
-<a id="__codelineno-429-8" name="__codelineno-429-8" href="#__codelineno-429-8"></a><span class="w">    </span><span class="n">foo1</span><span class="p">:</span><span class="w"> </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span>
-<a id="__codelineno-429-9" name="__codelineno-429-9" href="#__codelineno-429-9"></a><span class="w">    </span><span class="n">foo2</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span>
-<a id="__codelineno-429-10" name="__codelineno-429-10" href="#__codelineno-429-10"></a><span class="p">)</span>
-<a id="__codelineno-429-11" name="__codelineno-429-11" href="#__codelineno-429-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-429-12" name="__codelineno-429-12" href="#__codelineno-429-12"></a>
-<a id="__codelineno-429-13" name="__codelineno-429-13" href="#__codelineno-429-13"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
-<a id="__codelineno-429-14" name="__codelineno-429-14" href="#__codelineno-429-14"></a><span class="c1">// entire context receiver list does not fit on a single line.</span>
-<a id="__codelineno-429-15" name="__codelineno-429-15" href="#__codelineno-429-15"></a><span class="c1">// Also, wrap each of it projection types in case a context</span>
-<a id="__codelineno-429-16" name="__codelineno-429-16" href="#__codelineno-429-16"></a><span class="c1">// receiver does not fit on a single line after it has been</span>
-<a id="__codelineno-429-17" name="__codelineno-429-17" href="#__codelineno-429-17"></a><span class="c1">// wrapped.</span>
-<a id="__codelineno-429-18" name="__codelineno-429-18" href="#__codelineno-429-18"></a><span class="n">context</span><span class="p">(</span>
-<a id="__codelineno-429-19" name="__codelineno-429-19" href="#__codelineno-429-19"></a><span class="w">    </span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span>
-<a id="__codelineno-429-20" name="__codelineno-429-20" href="#__codelineno-429-20"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-429-21" name="__codelineno-429-21" href="#__codelineno-429-21"></a><span class="w">        </span><span class="n">Bar</span><span class="p">,</span>
-<a id="__codelineno-429-22" name="__codelineno-429-22" href="#__codelineno-429-22"></a><span class="w">        </span><span class="o">&gt;</span>
-<a id="__codelineno-429-23" name="__codelineno-429-23" href="#__codelineno-429-23"></a><span class="p">)</span>
-<a id="__codelineno-429-24" name="__codelineno-429-24" href="#__codelineno-429-24"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-434-1" name="__codelineno-434-1" href="#__codelineno-434-1"></a><span class="c1">// Always wrap regardless of whether max line length is set</span>
+<a id="__codelineno-434-2" name="__codelineno-434-2" href="#__codelineno-434-2"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">)</span>
+<a id="__codelineno-434-3" name="__codelineno-434-3" href="#__codelineno-434-3"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-434-4" name="__codelineno-434-4" href="#__codelineno-434-4"></a>
+<a id="__codelineno-434-5" name="__codelineno-434-5" href="#__codelineno-434-5"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
+<a id="__codelineno-434-6" name="__codelineno-434-6" href="#__codelineno-434-6"></a><span class="c1">// entire context receiver list does not fit on a single line</span>
+<a id="__codelineno-434-7" name="__codelineno-434-7" href="#__codelineno-434-7"></a><span class="n">context</span><span class="p">(</span>
+<a id="__codelineno-434-8" name="__codelineno-434-8" href="#__codelineno-434-8"></a><span class="w">    </span><span class="n">foo1</span><span class="p">:</span><span class="w"> </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span>
+<a id="__codelineno-434-9" name="__codelineno-434-9" href="#__codelineno-434-9"></a><span class="w">    </span><span class="n">foo2</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span>
+<a id="__codelineno-434-10" name="__codelineno-434-10" href="#__codelineno-434-10"></a><span class="p">)</span>
+<a id="__codelineno-434-11" name="__codelineno-434-11" href="#__codelineno-434-11"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-434-12" name="__codelineno-434-12" href="#__codelineno-434-12"></a>
+<a id="__codelineno-434-13" name="__codelineno-434-13" href="#__codelineno-434-13"></a><span class="c1">// Wrap each context receiver to a separate line when the</span>
+<a id="__codelineno-434-14" name="__codelineno-434-14" href="#__codelineno-434-14"></a><span class="c1">// entire context receiver list does not fit on a single line.</span>
+<a id="__codelineno-434-15" name="__codelineno-434-15" href="#__codelineno-434-15"></a><span class="c1">// Also, wrap each of it projection types in case a context</span>
+<a id="__codelineno-434-16" name="__codelineno-434-16" href="#__codelineno-434-16"></a><span class="c1">// receiver does not fit on a single line after it has been</span>
+<a id="__codelineno-434-17" name="__codelineno-434-17" href="#__codelineno-434-17"></a><span class="c1">// wrapped.</span>
+<a id="__codelineno-434-18" name="__codelineno-434-18" href="#__codelineno-434-18"></a><span class="n">context</span><span class="p">(</span>
+<a id="__codelineno-434-19" name="__codelineno-434-19" href="#__codelineno-434-19"></a><span class="w">    </span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span>
+<a id="__codelineno-434-20" name="__codelineno-434-20" href="#__codelineno-434-20"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-434-21" name="__codelineno-434-21" href="#__codelineno-434-21"></a><span class="w">        </span><span class="n">Bar</span><span class="p">,</span>
+<a id="__codelineno-434-22" name="__codelineno-434-22" href="#__codelineno-434-22"></a><span class="w">        </span><span class="o">&gt;</span>
+<a id="__codelineno-434-23" name="__codelineno-434-23" href="#__codelineno-434-23"></a><span class="p">)</span>
+<a id="__codelineno-434-24" name="__codelineno-434-24" href="#__codelineno-434-24"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-430-1" name="__codelineno-430-1" href="#__codelineno-430-1"></a><span class="c1">// Should be wrapped regardless of whether max line length is set</span>
-<a id="__codelineno-430-2" name="__codelineno-430-2" href="#__codelineno-430-2"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">)</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-430-3" name="__codelineno-430-3" href="#__codelineno-430-3"></a>
-<a id="__codelineno-430-4" name="__codelineno-430-4" href="#__codelineno-430-4"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
-<a id="__codelineno-430-5" name="__codelineno-430-5" href="#__codelineno-430-5"></a><span class="c1">// fit on a single line</span>
-<a id="__codelineno-430-6" name="__codelineno-430-6" href="#__codelineno-430-6"></a><span class="n">context</span><span class="p">(</span><span class="n">foo1</span><span class="p">:</span><span class="w"> </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span><span class="w"> </span><span class="n">foo2</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span><span class="p">)</span>
-<a id="__codelineno-430-7" name="__codelineno-430-7" href="#__codelineno-430-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
-<a id="__codelineno-430-8" name="__codelineno-430-8" href="#__codelineno-430-8"></a>
-<a id="__codelineno-430-9" name="__codelineno-430-9" href="#__codelineno-430-9"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
-<a id="__codelineno-430-10" name="__codelineno-430-10" href="#__codelineno-430-10"></a><span class="c1">// fit on a single line. Also, it should wrap each of it projection</span>
-<a id="__codelineno-430-11" name="__codelineno-430-11" href="#__codelineno-430-11"></a><span class="c1">// type in case a context receiver does not fit on a single line </span>
-<a id="__codelineno-430-12" name="__codelineno-430-12" href="#__codelineno-430-12"></a><span class="c1">// after it has been wrapped.</span>
-<a id="__codelineno-430-13" name="__codelineno-430-13" href="#__codelineno-430-13"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span><span class="p">)</span>
-<a id="__codelineno-430-14" name="__codelineno-430-14" href="#__codelineno-430-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-435-1" name="__codelineno-435-1" href="#__codelineno-435-1"></a><span class="c1">// Should be wrapped regardless of whether max line length is set</span>
+<a id="__codelineno-435-2" name="__codelineno-435-2" href="#__codelineno-435-2"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foo</span><span class="p">)</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-435-3" name="__codelineno-435-3" href="#__codelineno-435-3"></a>
+<a id="__codelineno-435-4" name="__codelineno-435-4" href="#__codelineno-435-4"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
+<a id="__codelineno-435-5" name="__codelineno-435-5" href="#__codelineno-435-5"></a><span class="c1">// fit on a single line</span>
+<a id="__codelineno-435-6" name="__codelineno-435-6" href="#__codelineno-435-6"></a><span class="n">context</span><span class="p">(</span><span class="n">foo1</span><span class="p">:</span><span class="w"> </span><span class="n">Fooooooooooooooooooo1</span><span class="p">,</span><span class="w"> </span><span class="n">foo2</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooooooooooooooooo2</span><span class="p">)</span>
+<a id="__codelineno-435-7" name="__codelineno-435-7" href="#__codelineno-435-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
+<a id="__codelineno-435-8" name="__codelineno-435-8" href="#__codelineno-435-8"></a>
+<a id="__codelineno-435-9" name="__codelineno-435-9" href="#__codelineno-435-9"></a><span class="c1">// Should be wrapped when the entire context receiver list does not</span>
+<a id="__codelineno-435-10" name="__codelineno-435-10" href="#__codelineno-435-10"></a><span class="c1">// fit on a single line. Also, it should wrap each of it projection</span>
+<a id="__codelineno-435-11" name="__codelineno-435-11" href="#__codelineno-435-11"></a><span class="c1">// type in case a context receiver does not fit on a single line </span>
+<a id="__codelineno-435-12" name="__codelineno-435-12" href="#__codelineno-435-12"></a><span class="c1">// after it has been wrapped.</span>
+<a id="__codelineno-435-13" name="__codelineno-435-13" href="#__codelineno-435-13"></a><span class="n">context</span><span class="p">(</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">Foooooooooooooooo</span><span class="o">&lt;</span><span class="n">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">Bar</span><span class="o">&gt;</span><span class="p">)</span>
+<a id="__codelineno-435-14" name="__codelineno-435-14" href="#__codelineno-435-14"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">fooBar</span><span class="p">()</span>
 </code></pre></div>
 </div>
 </div>
@@ -7306,44 +7359,44 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-431-1" name="__codelineno-431-1" href="#__codelineno-431-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:context-receiver-list-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-436-1" name="__codelineno-436-1" href="#__codelineno-436-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:context-receiver-list-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-432-1" name="__codelineno-432-1" href="#__codelineno-432-1"></a>ktlint_standard_context-receiver-list-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-437-1" name="__codelineno-437-1" href="#__codelineno-437-1"></a>ktlint_standard_context-receiver-list-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-433-1" name="__codelineno-433-1" href="#__codelineno-433-1"></a>ktlint_standard_context-receiver-list-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-438-1" name="__codelineno-438-1" href="#__codelineno-438-1"></a>ktlint_standard_context-receiver-list-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="enum-wrapping">Enum wrapping<a class="headerlink" href="#enum-wrapping" title="Permanent link">&para;</a></h3>
 <p>Each individual enum entry should be on a separate line. Multiple enums cannot be on the same line. In case the enumeration contains enum entries and declarations, those are to be separated by a blank line.</p>
-<div class="tabbed-set tabbed-alternate" data-tabs="87:2"><input checked="checked" id="__tabbed_87_1" name="__tabbed_87" type="radio" /><input id="__tabbed_87_2" name="__tabbed_87" type="radio" /><div class="tabbed-labels"><label for="__tabbed_87_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_87_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="88:2"><input checked="checked" id="__tabbed_88_1" name="__tabbed_88" type="radio" /><input id="__tabbed_88_2" name="__tabbed_88" type="radio" /><div class="tabbed-labels"><label for="__tabbed_88_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_88_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-434-1" name="__codelineno-434-1" href="#__codelineno-434-1"></a><span class="kd">enum</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><span class="w"> </span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">C</span><span class="p">,</span><span class="w"> </span><span class="n">D</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-434-2" name="__codelineno-434-2" href="#__codelineno-434-2"></a>
-<a id="__codelineno-434-3" name="__codelineno-434-3" href="#__codelineno-434-3"></a><span class="kd">enum</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-434-4" name="__codelineno-434-4" href="#__codelineno-434-4"></a><span class="w">    </span><span class="n">A</span><span class="p">,</span>
-<a id="__codelineno-434-5" name="__codelineno-434-5" href="#__codelineno-434-5"></a><span class="w">    </span><span class="n">B</span><span class="p">,</span>
-<a id="__codelineno-434-6" name="__codelineno-434-6" href="#__codelineno-434-6"></a><span class="w">    </span><span class="n">C</span><span class="p">,</span>
-<a id="__codelineno-434-7" name="__codelineno-434-7" href="#__codelineno-434-7"></a><span class="w">    </span><span class="n">D</span><span class="p">,</span>
-<a id="__codelineno-434-8" name="__codelineno-434-8" href="#__codelineno-434-8"></a><span class="w">    </span><span class="p">;</span>
-<a id="__codelineno-434-9" name="__codelineno-434-9" href="#__codelineno-434-9"></a>
-<a id="__codelineno-434-10" name="__codelineno-434-10" href="#__codelineno-434-10"></a><span class="w">    </span><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">&quot;foo&quot;</span>
-<a id="__codelineno-434-11" name="__codelineno-434-11" href="#__codelineno-434-11"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-439-1" name="__codelineno-439-1" href="#__codelineno-439-1"></a><span class="kd">enum</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><span class="w"> </span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">C</span><span class="p">,</span><span class="w"> </span><span class="n">D</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-439-2" name="__codelineno-439-2" href="#__codelineno-439-2"></a>
+<a id="__codelineno-439-3" name="__codelineno-439-3" href="#__codelineno-439-3"></a><span class="kd">enum</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-439-4" name="__codelineno-439-4" href="#__codelineno-439-4"></a><span class="w">    </span><span class="n">A</span><span class="p">,</span>
+<a id="__codelineno-439-5" name="__codelineno-439-5" href="#__codelineno-439-5"></a><span class="w">    </span><span class="n">B</span><span class="p">,</span>
+<a id="__codelineno-439-6" name="__codelineno-439-6" href="#__codelineno-439-6"></a><span class="w">    </span><span class="n">C</span><span class="p">,</span>
+<a id="__codelineno-439-7" name="__codelineno-439-7" href="#__codelineno-439-7"></a><span class="w">    </span><span class="n">D</span><span class="p">,</span>
+<a id="__codelineno-439-8" name="__codelineno-439-8" href="#__codelineno-439-8"></a><span class="w">    </span><span class="p">;</span>
+<a id="__codelineno-439-9" name="__codelineno-439-9" href="#__codelineno-439-9"></a>
+<a id="__codelineno-439-10" name="__codelineno-439-10" href="#__codelineno-439-10"></a><span class="w">    </span><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">&quot;foo&quot;</span>
+<a id="__codelineno-439-11" name="__codelineno-439-11" href="#__codelineno-439-11"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-435-1" name="__codelineno-435-1" href="#__codelineno-435-1"></a><span class="kd">enum</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-435-2" name="__codelineno-435-2" href="#__codelineno-435-2"></a><span class="w">    </span><span class="n">A</span><span class="p">,</span>
-<a id="__codelineno-435-3" name="__codelineno-435-3" href="#__codelineno-435-3"></a><span class="w">    </span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">C</span><span class="p">,</span>
-<a id="__codelineno-435-4" name="__codelineno-435-4" href="#__codelineno-435-4"></a><span class="w">    </span><span class="n">D</span>
-<a id="__codelineno-435-5" name="__codelineno-435-5" href="#__codelineno-435-5"></a><span class="p">}</span>
-<a id="__codelineno-435-6" name="__codelineno-435-6" href="#__codelineno-435-6"></a>
-<a id="__codelineno-435-7" name="__codelineno-435-7" href="#__codelineno-435-7"></a><span class="kd">enum</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-435-8" name="__codelineno-435-8" href="#__codelineno-435-8"></a><span class="w">    </span><span class="n">A</span><span class="p">;</span>
-<a id="__codelineno-435-9" name="__codelineno-435-9" href="#__codelineno-435-9"></a><span class="w">    </span><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">&quot;foo&quot;</span>
-<a id="__codelineno-435-10" name="__codelineno-435-10" href="#__codelineno-435-10"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-440-1" name="__codelineno-440-1" href="#__codelineno-440-1"></a><span class="kd">enum</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-440-2" name="__codelineno-440-2" href="#__codelineno-440-2"></a><span class="w">    </span><span class="n">A</span><span class="p">,</span>
+<a id="__codelineno-440-3" name="__codelineno-440-3" href="#__codelineno-440-3"></a><span class="w">    </span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">C</span><span class="p">,</span>
+<a id="__codelineno-440-4" name="__codelineno-440-4" href="#__codelineno-440-4"></a><span class="w">    </span><span class="n">D</span>
+<a id="__codelineno-440-5" name="__codelineno-440-5" href="#__codelineno-440-5"></a><span class="p">}</span>
+<a id="__codelineno-440-6" name="__codelineno-440-6" href="#__codelineno-440-6"></a>
+<a id="__codelineno-440-7" name="__codelineno-440-7" href="#__codelineno-440-7"></a><span class="kd">enum</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-440-8" name="__codelineno-440-8" href="#__codelineno-440-8"></a><span class="w">    </span><span class="n">A</span><span class="p">;</span>
+<a id="__codelineno-440-9" name="__codelineno-440-9" href="#__codelineno-440-9"></a><span class="w">    </span><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">&quot;foo&quot;</span>
+<a id="__codelineno-440-10" name="__codelineno-440-10" href="#__codelineno-440-10"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -7352,33 +7405,33 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-436-1" name="__codelineno-436-1" href="#__codelineno-436-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:enum-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-441-1" name="__codelineno-441-1" href="#__codelineno-441-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:enum-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-437-1" name="__codelineno-437-1" href="#__codelineno-437-1"></a>ktlint_standard_enum-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-442-1" name="__codelineno-442-1" href="#__codelineno-442-1"></a>ktlint_standard_enum-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-438-1" name="__codelineno-438-1" href="#__codelineno-438-1"></a>ktlint_standard_enum-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-443-1" name="__codelineno-443-1" href="#__codelineno-443-1"></a>ktlint_standard_enum-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="if-else-wrapping">If else wrapping<a class="headerlink" href="#if-else-wrapping" title="Permanent link">&para;</a></h3>
 <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>
-<div class="tabbed-set tabbed-alternate" data-tabs="88:2"><input checked="checked" id="__tabbed_88_1" name="__tabbed_88" type="radio" /><input id="__tabbed_88_2" name="__tabbed_88" type="radio" /><div class="tabbed-labels"><label for="__tabbed_88_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_88_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="89:2"><input checked="checked" id="__tabbed_89_1" name="__tabbed_89" type="radio" /><input id="__tabbed_89_2" name="__tabbed_89" type="radio" /><div class="tabbed-labels"><label for="__tabbed_89_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_89_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-439-1" name="__codelineno-439-1" href="#__codelineno-439-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foobar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-439-2" name="__codelineno-439-2" href="#__codelineno-439-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="n">foo</span><span class="p">()</span>
-<a id="__codelineno-439-3" name="__codelineno-439-3" href="#__codelineno-439-3"></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="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-439-4" name="__codelineno-439-4" href="#__codelineno-439-4"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-444-1" name="__codelineno-444-1" href="#__codelineno-444-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foobar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-444-2" name="__codelineno-444-2" href="#__codelineno-444-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="n">foo</span><span class="p">()</span>
+<a id="__codelineno-444-3" name="__codelineno-444-3" href="#__codelineno-444-3"></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="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-444-4" name="__codelineno-444-4" href="#__codelineno-444-4"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-440-1" name="__codelineno-440-1" href="#__codelineno-440-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foobar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-440-2" name="__codelineno-440-2" href="#__codelineno-440-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="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-440-3" name="__codelineno-440-3" href="#__codelineno-440-3"></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="n">bar</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="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-440-4" name="__codelineno-440-4" href="#__codelineno-440-4"></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><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
-<a id="__codelineno-440-5" name="__codelineno-440-5" href="#__codelineno-440-5"></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="n">bar</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="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-440-6" name="__codelineno-440-6" href="#__codelineno-440-6"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-445-1" name="__codelineno-445-1" href="#__codelineno-445-1"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foobar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-445-2" name="__codelineno-445-2" href="#__codelineno-445-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="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-445-3" name="__codelineno-445-3" href="#__codelineno-445-3"></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="n">bar</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="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-445-4" name="__codelineno-445-4" href="#__codelineno-445-4"></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><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span>
+<a id="__codelineno-445-5" name="__codelineno-445-5" href="#__codelineno-445-5"></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="n">bar</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="k">if</span><span class="w"> </span><span class="p">(</span><span class="kc">false</span><span class="p">)</span><span class="w"> </span><span class="n">foo</span><span class="p">()</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="n">bar</span><span class="p">()</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-445-6" name="__codelineno-445-6" href="#__codelineno-445-6"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -7387,13 +7440,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-441-1" name="__codelineno-441-1" href="#__codelineno-441-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:if-else-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-446-1" name="__codelineno-446-1" href="#__codelineno-446-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:if-else-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-442-1" name="__codelineno-442-1" href="#__codelineno-442-1"></a>ktlint_standard_if-else-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-447-1" name="__codelineno-447-1" href="#__codelineno-447-1"></a>ktlint_standard_if-else-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-443-1" name="__codelineno-443-1" href="#__codelineno-443-1"></a>ktlint_standard_if-else-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-448-1" name="__codelineno-448-1" href="#__codelineno-448-1"></a>ktlint_standard_if-else-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <div class="admonition note">
@@ -7403,24 +7456,24 @@
 <h3 id="multiline-expression-wrapping">Multiline expression wrapping<a class="headerlink" href="#multiline-expression-wrapping" title="Permanent link">&para;</a></h3>
 <p>Multiline expressions 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>
 <p>Setting <code>ktlint_function_signature_body_expression_wrapping</code> of the <code>function-signature</code> rule takes precedence when set to <code>default</code>. This setting keeps the first line of a multiline expression body on the same line as the end of function signature as long as the max line length is not exceeded. In that case, this rule does not wrap the multiline expression. </p>
-<div class="tabbed-set tabbed-alternate" data-tabs="89:2"><input checked="checked" id="__tabbed_89_1" name="__tabbed_89" type="radio" /><input id="__tabbed_89_2" name="__tabbed_89" type="radio" /><div class="tabbed-labels"><label for="__tabbed_89_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_89_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="90:2"><input checked="checked" id="__tabbed_90_1" name="__tabbed_90" type="radio" /><input id="__tabbed_90_2" name="__tabbed_90" type="radio" /><div class="tabbed-labels"><label for="__tabbed_90_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_90_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-444-1" name="__codelineno-444-1" href="#__codelineno-444-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-444-2" name="__codelineno-444-2" href="#__codelineno-444-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-444-3" name="__codelineno-444-3" href="#__codelineno-444-3"></a><span class="w">        </span><span class="n">parameterName</span><span class="w"> </span><span class="o">=</span>
-<a id="__codelineno-444-4" name="__codelineno-444-4" href="#__codelineno-444-4"></a><span class="w">            </span><span class="s">&quot;The quick brown fox &quot;</span>
-<a id="__codelineno-444-5" name="__codelineno-444-5" href="#__codelineno-444-5"></a><span class="w">                </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;jumps &quot;</span><span class="p">)</span>
-<a id="__codelineno-444-6" name="__codelineno-444-6" href="#__codelineno-444-6"></a><span class="w">                </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;over the lazy dog&quot;</span><span class="p">),</span>
-<a id="__codelineno-444-7" name="__codelineno-444-7" href="#__codelineno-444-7"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-449-1" name="__codelineno-449-1" href="#__codelineno-449-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-449-2" name="__codelineno-449-2" href="#__codelineno-449-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-449-3" name="__codelineno-449-3" href="#__codelineno-449-3"></a><span class="w">        </span><span class="n">parameterName</span><span class="w"> </span><span class="o">=</span>
+<a id="__codelineno-449-4" name="__codelineno-449-4" href="#__codelineno-449-4"></a><span class="w">            </span><span class="s">&quot;The quick brown fox &quot;</span>
+<a id="__codelineno-449-5" name="__codelineno-449-5" href="#__codelineno-449-5"></a><span class="w">                </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;jumps &quot;</span><span class="p">)</span>
+<a id="__codelineno-449-6" name="__codelineno-449-6" href="#__codelineno-449-6"></a><span class="w">                </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;over the lazy dog&quot;</span><span class="p">),</span>
+<a id="__codelineno-449-7" name="__codelineno-449-7" href="#__codelineno-449-7"></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-445-1" name="__codelineno-445-1" href="#__codelineno-445-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="p">(</span>
-<a id="__codelineno-445-2" name="__codelineno-445-2" href="#__codelineno-445-2"></a><span class="w">    </span><span class="n">parameterName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;The quick brown fox &quot;</span>
-<a id="__codelineno-445-3" name="__codelineno-445-3" href="#__codelineno-445-3"></a><span class="w">        </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;jumps &quot;</span><span class="p">)</span>
-<a id="__codelineno-445-4" name="__codelineno-445-4" href="#__codelineno-445-4"></a><span class="w">        </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;over the lazy dog&quot;</span><span class="p">),</span>
-<a id="__codelineno-445-5" name="__codelineno-445-5" href="#__codelineno-445-5"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-450-1" name="__codelineno-450-1" href="#__codelineno-450-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="p">(</span>
+<a id="__codelineno-450-2" name="__codelineno-450-2" href="#__codelineno-450-2"></a><span class="w">    </span><span class="n">parameterName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;The quick brown fox &quot;</span>
+<a id="__codelineno-450-3" name="__codelineno-450-3" href="#__codelineno-450-3"></a><span class="w">        </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;jumps &quot;</span><span class="p">)</span>
+<a id="__codelineno-450-4" name="__codelineno-450-4" href="#__codelineno-450-4"></a><span class="w">        </span><span class="p">.</span><span class="na">plus</span><span class="p">(</span><span class="s">&quot;over the lazy dog&quot;</span><span class="p">),</span>
+<a id="__codelineno-450-5" name="__codelineno-450-5" href="#__codelineno-450-5"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -7429,13 +7482,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-446-1" name="__codelineno-446-1" href="#__codelineno-446-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:multiline-expression-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-451-1" name="__codelineno-451-1" href="#__codelineno-451-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:multiline-expression-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-447-1" name="__codelineno-447-1" href="#__codelineno-447-1"></a>ktlint_standard_multiline-expression-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-452-1" name="__codelineno-452-1" href="#__codelineno-452-1"></a>ktlint_standard_multiline-expression-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-448-1" name="__codelineno-448-1" href="#__codelineno-448-1"></a>ktlint_standard_multiline-expression-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-453-1" name="__codelineno-453-1" href="#__codelineno-453-1"></a>ktlint_standard_multiline-expression-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <div class="admonition note">
@@ -7448,58 +7501,58 @@
 <p class="admonition-title">Note</p>
 <p>Wrapping of parameters is also influenced by the <code>function-signature</code> rule.</p>
 </div>
-<div class="tabbed-set tabbed-alternate" data-tabs="90:3"><input checked="checked" id="__tabbed_90_1" name="__tabbed_90" type="radio" /><input id="__tabbed_90_2" name="__tabbed_90" type="radio" /><input id="__tabbed_90_3" name="__tabbed_90" type="radio" /><div class="tabbed-labels"><label for="__tabbed_90_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_90_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.9"/></svg></span></a> Disallowed (ktlint_official)</label><label for="__tabbed_90_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.9"/></svg></span></a> Disallowed (non ktlint_official)</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="91:3"><input checked="checked" id="__tabbed_91_1" name="__tabbed_91" type="radio" /><input id="__tabbed_91_2" name="__tabbed_91" type="radio" /><input id="__tabbed_91_3" name="__tabbed_91" type="radio" /><div class="tabbed-labels"><label for="__tabbed_91_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_91_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.9"/></svg></span></a> Disallowed (ktlint_official)</label><label for="__tabbed_91_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.9"/></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-449-1" name="__codelineno-449-1" href="#__codelineno-449-1"></a><span class="c1">// If `ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals</span>
-<a id="__codelineno-449-2" name="__codelineno-449-2" href="#__codelineno-449-2"></a><span class="c1">// `unset` the parameters are not wrapped as long as they fit on a single line</span>
-<a id="__codelineno-449-3" name="__codelineno-449-3" href="#__codelineno-449-3"></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-449-4" name="__codelineno-449-4" href="#__codelineno-449-4"></a>
-<a id="__codelineno-449-5" name="__codelineno-449-5" href="#__codelineno-449-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-449-6" name="__codelineno-449-6" href="#__codelineno-449-6"></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-449-7" name="__codelineno-449-7" href="#__codelineno-449-7"></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-449-8" name="__codelineno-449-8" href="#__codelineno-449-8"></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-449-9" name="__codelineno-449-9" href="#__codelineno-449-9"></a><span class="p">)</span>
-<a id="__codelineno-449-10" name="__codelineno-449-10" href="#__codelineno-449-10"></a>
-<a id="__codelineno-449-11" name="__codelineno-449-11" href="#__codelineno-449-11"></a><span class="c1">// If `ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals</span>
-<a id="__codelineno-449-12" name="__codelineno-449-12" href="#__codelineno-449-12"></a><span class="c1">// `unset` the parameters are not wrapped as long as they fit on a single line</span>
-<a id="__codelineno-449-13" name="__codelineno-449-13" href="#__codelineno-449-13"></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-449-14" name="__codelineno-449-14" href="#__codelineno-449-14"></a>
-<a id="__codelineno-449-15" name="__codelineno-449-15" href="#__codelineno-449-15"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-449-16" name="__codelineno-449-16" href="#__codelineno-449-16"></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-449-17" name="__codelineno-449-17" href="#__codelineno-449-17"></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-449-18" name="__codelineno-449-18" href="#__codelineno-449-18"></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-449-19" name="__codelineno-449-19" href="#__codelineno-449-19"></a><span class="p">)</span>
-<a id="__codelineno-449-20" name="__codelineno-449-20" href="#__codelineno-449-20"></a>
-<a id="__codelineno-449-21" name="__codelineno-449-21" href="#__codelineno-449-21"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span>
-<a id="__codelineno-449-22" name="__codelineno-449-22" href="#__codelineno-449-22"></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-449-23" name="__codelineno-449-23" href="#__codelineno-449-23"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-454-1" name="__codelineno-454-1" href="#__codelineno-454-1"></a><span class="c1">// If `ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals</span>
+<a id="__codelineno-454-2" name="__codelineno-454-2" href="#__codelineno-454-2"></a><span class="c1">// `unset` the parameters are not wrapped as long as they fit on a single line</span>
+<a id="__codelineno-454-3" name="__codelineno-454-3" href="#__codelineno-454-3"></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-454-4" name="__codelineno-454-4" href="#__codelineno-454-4"></a>
+<a id="__codelineno-454-5" name="__codelineno-454-5" href="#__codelineno-454-5"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-454-6" name="__codelineno-454-6" href="#__codelineno-454-6"></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-454-7" name="__codelineno-454-7" href="#__codelineno-454-7"></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-454-8" name="__codelineno-454-8" href="#__codelineno-454-8"></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-454-9" name="__codelineno-454-9" href="#__codelineno-454-9"></a><span class="p">)</span>
+<a id="__codelineno-454-10" name="__codelineno-454-10" href="#__codelineno-454-10"></a>
+<a id="__codelineno-454-11" name="__codelineno-454-11" href="#__codelineno-454-11"></a><span class="c1">// If `ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals</span>
+<a id="__codelineno-454-12" name="__codelineno-454-12" href="#__codelineno-454-12"></a><span class="c1">// `unset` the parameters are not wrapped as long as they fit on a single line</span>
+<a id="__codelineno-454-13" name="__codelineno-454-13" href="#__codelineno-454-13"></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-454-14" name="__codelineno-454-14" href="#__codelineno-454-14"></a>
+<a id="__codelineno-454-15" name="__codelineno-454-15" href="#__codelineno-454-15"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-454-16" name="__codelineno-454-16" href="#__codelineno-454-16"></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-454-17" name="__codelineno-454-17" href="#__codelineno-454-17"></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-454-18" name="__codelineno-454-18" href="#__codelineno-454-18"></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-454-19" name="__codelineno-454-19" href="#__codelineno-454-19"></a><span class="p">)</span>
+<a id="__codelineno-454-20" name="__codelineno-454-20" href="#__codelineno-454-20"></a>
+<a id="__codelineno-454-21" name="__codelineno-454-21" href="#__codelineno-454-21"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span>
+<a id="__codelineno-454-22" name="__codelineno-454-22" href="#__codelineno-454-22"></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-454-23" name="__codelineno-454-23" href="#__codelineno-454-23"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-450-1" name="__codelineno-450-1" href="#__codelineno-450-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-450-2" name="__codelineno-450-2" href="#__codelineno-450-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-450-3" name="__codelineno-450-3" href="#__codelineno-450-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-450-4" name="__codelineno-450-4" href="#__codelineno-450-4"></a><span class="p">)</span>
-<a id="__codelineno-450-5" name="__codelineno-450-5" href="#__codelineno-450-5"></a>
-<a id="__codelineno-450-6" name="__codelineno-450-6" href="#__codelineno-450-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-450-7" name="__codelineno-450-7" href="#__codelineno-450-7"></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-450-8" name="__codelineno-450-8" href="#__codelineno-450-8"></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-450-9" name="__codelineno-450-9" href="#__codelineno-450-9"></a><span class="p">)</span>
-<a id="__codelineno-450-10" name="__codelineno-450-10" href="#__codelineno-450-10"></a>
-<a id="__codelineno-450-11" name="__codelineno-450-11" href="#__codelineno-450-11"></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-455-1" name="__codelineno-455-1" href="#__codelineno-455-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-455-2" name="__codelineno-455-2" href="#__codelineno-455-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-455-3" name="__codelineno-455-3" href="#__codelineno-455-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-455-4" name="__codelineno-455-4" href="#__codelineno-455-4"></a><span class="p">)</span>
+<a id="__codelineno-455-5" name="__codelineno-455-5" href="#__codelineno-455-5"></a>
+<a id="__codelineno-455-6" name="__codelineno-455-6" href="#__codelineno-455-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-455-7" name="__codelineno-455-7" href="#__codelineno-455-7"></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-455-8" name="__codelineno-455-8" href="#__codelineno-455-8"></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-455-9" name="__codelineno-455-9" href="#__codelineno-455-9"></a><span class="p">)</span>
+<a id="__codelineno-455-10" name="__codelineno-455-10" href="#__codelineno-455-10"></a>
+<a id="__codelineno-455-11" name="__codelineno-455-11" href="#__codelineno-455-11"></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-451-1" name="__codelineno-451-1" href="#__codelineno-451-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
-<a id="__codelineno-451-2" name="__codelineno-451-2" href="#__codelineno-451-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-451-3" name="__codelineno-451-3" href="#__codelineno-451-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-451-4" name="__codelineno-451-4" href="#__codelineno-451-4"></a><span class="p">)</span>
-<a id="__codelineno-451-5" name="__codelineno-451-5" href="#__codelineno-451-5"></a>
-<a id="__codelineno-451-6" name="__codelineno-451-6" href="#__codelineno-451-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
-<a id="__codelineno-451-7" name="__codelineno-451-7" href="#__codelineno-451-7"></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-451-8" name="__codelineno-451-8" href="#__codelineno-451-8"></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-451-9" name="__codelineno-451-9" href="#__codelineno-451-9"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-456-1" name="__codelineno-456-1" href="#__codelineno-456-1"></a><span class="kd">class</span><span class="w"> </span><span class="nc">ClassA</span><span class="p">(</span>
+<a id="__codelineno-456-2" name="__codelineno-456-2" href="#__codelineno-456-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-456-3" name="__codelineno-456-3" href="#__codelineno-456-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-456-4" name="__codelineno-456-4" href="#__codelineno-456-4"></a><span class="p">)</span>
+<a id="__codelineno-456-5" name="__codelineno-456-5" href="#__codelineno-456-5"></a>
+<a id="__codelineno-456-6" name="__codelineno-456-6" href="#__codelineno-456-6"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span>
+<a id="__codelineno-456-7" name="__codelineno-456-7" href="#__codelineno-456-7"></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-456-8" name="__codelineno-456-8" href="#__codelineno-456-8"></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-456-9" name="__codelineno-456-9" href="#__codelineno-456-9"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -7526,57 +7579,57 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-452-1" name="__codelineno-452-1" href="#__codelineno-452-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:parameter-list-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-457-1" name="__codelineno-457-1" href="#__codelineno-457-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:parameter-list-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-453-1" name="__codelineno-453-1" href="#__codelineno-453-1"></a>ktlint_standard_parameter-list-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-458-1" name="__codelineno-458-1" href="#__codelineno-458-1"></a>ktlint_standard_parameter-list-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-454-1" name="__codelineno-454-1" href="#__codelineno-454-1"></a>ktlint_standard_parameter-list-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-459-1" name="__codelineno-459-1" href="#__codelineno-459-1"></a>ktlint_standard_parameter-list-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="parameter-wrapping">Parameter wrapping<a class="headerlink" href="#parameter-wrapping" title="Permanent link">&para;</a></h3>
 <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="91:3"><input checked="checked" id="__tabbed_91_1" name="__tabbed_91" type="radio" /><input id="__tabbed_91_2" name="__tabbed_91" type="radio" /><input id="__tabbed_91_3" name="__tabbed_91" type="radio" /><div class="tabbed-labels"><label for="__tabbed_91_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.53z"/></svg></span></a> Ktlint (ktlint_official)</label><label for="__tabbed_91_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.53z"/></svg></span></a> Ktlint (non ktlint_official)</label><label for="__tabbed_91_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="92:3"><input checked="checked" id="__tabbed_92_1" name="__tabbed_92" type="radio" /><input id="__tabbed_92_2" name="__tabbed_92" type="radio" /><input id="__tabbed_92_3" name="__tabbed_92" type="radio" /><div class="tabbed-labels"><label for="__tabbed_92_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.53z"/></svg></span></a> Ktlint (ktlint_official)</label><label for="__tabbed_92_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.53z"/></svg></span></a> Ktlint (non ktlint_official)</label><label for="__tabbed_92_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-455-1" name="__codelineno-455-1" href="#__codelineno-455-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-455-2" name="__codelineno-455-2" href="#__codelineno-455-2"></a><span class="c1">// at the X character on the right           X</span>
-<a id="__codelineno-455-3" name="__codelineno-455-3" href="#__codelineno-455-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-455-4" name="__codelineno-455-4" href="#__codelineno-455-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-455-5" name="__codelineno-455-5" href="#__codelineno-455-5"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-455-6" name="__codelineno-455-6" href="#__codelineno-455-6"></a><span class="p">)</span>
-<a id="__codelineno-455-7" name="__codelineno-455-7" href="#__codelineno-455-7"></a>
-<a id="__codelineno-455-8" name="__codelineno-455-8" href="#__codelineno-455-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-455-9" name="__codelineno-455-9" href="#__codelineno-455-9"></a><span class="w">    </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-455-10" name="__codelineno-455-10" href="#__codelineno-455-10"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-455-11" name="__codelineno-455-11" href="#__codelineno-455-11"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-460-1" name="__codelineno-460-1" href="#__codelineno-460-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-460-2" name="__codelineno-460-2" href="#__codelineno-460-2"></a><span class="c1">// at the X character on the right           X</span>
+<a id="__codelineno-460-3" name="__codelineno-460-3" href="#__codelineno-460-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
+<a id="__codelineno-460-4" name="__codelineno-460-4" href="#__codelineno-460-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-460-5" name="__codelineno-460-5" href="#__codelineno-460-5"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-460-6" name="__codelineno-460-6" href="#__codelineno-460-6"></a><span class="p">)</span>
+<a id="__codelineno-460-7" name="__codelineno-460-7" href="#__codelineno-460-7"></a>
+<a id="__codelineno-460-8" name="__codelineno-460-8" href="#__codelineno-460-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-460-9" name="__codelineno-460-9" href="#__codelineno-460-9"></a><span class="w">    </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-460-10" name="__codelineno-460-10" href="#__codelineno-460-10"></a><span class="w">        </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-460-11" name="__codelineno-460-11" href="#__codelineno-460-11"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-456-1" name="__codelineno-456-1" href="#__codelineno-456-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-456-2" name="__codelineno-456-2" href="#__codelineno-456-2"></a><span class="c1">// at the X character on the right           X</span>
-<a id="__codelineno-456-3" name="__codelineno-456-3" href="#__codelineno-456-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-456-4" name="__codelineno-456-4" href="#__codelineno-456-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-456-5" name="__codelineno-456-5" href="#__codelineno-456-5"></a><span class="w">    </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-456-6" name="__codelineno-456-6" href="#__codelineno-456-6"></a><span class="p">)</span>
-<a id="__codelineno-456-7" name="__codelineno-456-7" href="#__codelineno-456-7"></a>
-<a id="__codelineno-456-8" name="__codelineno-456-8" href="#__codelineno-456-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-456-9" name="__codelineno-456-9" href="#__codelineno-456-9"></a><span class="w">    </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
-<a id="__codelineno-456-10" name="__codelineno-456-10" href="#__codelineno-456-10"></a><span class="w">    </span><span class="n">Foo</span><span class="p">,</span>
-<a id="__codelineno-456-11" name="__codelineno-456-11" href="#__codelineno-456-11"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-461-1" name="__codelineno-461-1" href="#__codelineno-461-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-461-2" name="__codelineno-461-2" href="#__codelineno-461-2"></a><span class="c1">// at the X character on the right           X</span>
+<a id="__codelineno-461-3" name="__codelineno-461-3" href="#__codelineno-461-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
+<a id="__codelineno-461-4" name="__codelineno-461-4" href="#__codelineno-461-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-461-5" name="__codelineno-461-5" href="#__codelineno-461-5"></a><span class="w">    </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-461-6" name="__codelineno-461-6" href="#__codelineno-461-6"></a><span class="p">)</span>
+<a id="__codelineno-461-7" name="__codelineno-461-7" href="#__codelineno-461-7"></a>
+<a id="__codelineno-461-8" name="__codelineno-461-8" href="#__codelineno-461-8"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-461-9" name="__codelineno-461-9" href="#__codelineno-461-9"></a><span class="w">    </span><span class="n">fooooooooooooooooooooooooTooLong</span><span class="p">:</span>
+<a id="__codelineno-461-10" name="__codelineno-461-10" href="#__codelineno-461-10"></a><span class="w">    </span><span class="n">Foo</span><span class="p">,</span>
+<a id="__codelineno-461-11" name="__codelineno-461-11" href="#__codelineno-461-11"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-457-1" name="__codelineno-457-1" href="#__codelineno-457-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-457-2" name="__codelineno-457-2" href="#__codelineno-457-2"></a><span class="c1">// at the X character on the right           X</span>
-<a id="__codelineno-457-3" name="__codelineno-457-3" href="#__codelineno-457-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
-<a id="__codelineno-457-4" name="__codelineno-457-4" href="#__codelineno-457-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-457-5" name="__codelineno-457-5" href="#__codelineno-457-5"></a><span class="p">)</span>
-<a id="__codelineno-457-6" name="__codelineno-457-6" href="#__codelineno-457-6"></a>
-<a id="__codelineno-457-7" name="__codelineno-457-7" href="#__codelineno-457-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
-<a id="__codelineno-457-8" name="__codelineno-457-8" href="#__codelineno-457-8"></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-457-9" name="__codelineno-457-9" href="#__codelineno-457-9"></a><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-462-1" name="__codelineno-462-1" href="#__codelineno-462-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-462-2" name="__codelineno-462-2" href="#__codelineno-462-2"></a><span class="c1">// at the X character on the right           X</span>
+<a id="__codelineno-462-3" name="__codelineno-462-3" href="#__codelineno-462-3"></a><span class="kd">class</span><span class="w"> </span><span class="nc">Bar</span><span class="p">(</span>
+<a id="__codelineno-462-4" name="__codelineno-462-4" href="#__codelineno-462-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-462-5" name="__codelineno-462-5" href="#__codelineno-462-5"></a><span class="p">)</span>
+<a id="__codelineno-462-6" name="__codelineno-462-6" href="#__codelineno-462-6"></a>
+<a id="__codelineno-462-7" name="__codelineno-462-7" href="#__codelineno-462-7"></a><span class="kd">fun</span><span class="w"> </span><span class="nf">bar</span><span class="p">(</span>
+<a id="__codelineno-462-8" name="__codelineno-462-8" href="#__codelineno-462-8"></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-462-9" name="__codelineno-462-9" href="#__codelineno-462-9"></a><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -7603,30 +7656,30 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-458-1" name="__codelineno-458-1" href="#__codelineno-458-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:parameter-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-463-1" name="__codelineno-463-1" href="#__codelineno-463-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:parameter-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-459-1" name="__codelineno-459-1" href="#__codelineno-459-1"></a>ktlint_standard_parameter-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-464-1" name="__codelineno-464-1" href="#__codelineno-464-1"></a>ktlint_standard_parameter-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-460-1" name="__codelineno-460-1" href="#__codelineno-460-1"></a>ktlint_standard_parameter-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-465-1" name="__codelineno-465-1" href="#__codelineno-465-1"></a>ktlint_standard_parameter-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="property-wrapping">Property wrapping<a class="headerlink" href="#property-wrapping" title="Permanent link">&para;</a></h3>
 <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="92:2"><input checked="checked" id="__tabbed_92_1" name="__tabbed_92" type="radio" /><input id="__tabbed_92_2" name="__tabbed_92" type="radio" /><div class="tabbed-labels"><label for="__tabbed_92_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_92_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="93:2"><input checked="checked" id="__tabbed_93_1" name="__tabbed_93" type="radio" /><input id="__tabbed_93_2" name="__tabbed_93" type="radio" /><div class="tabbed-labels"><label for="__tabbed_93_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_93_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-461-1" name="__codelineno-461-1" href="#__codelineno-461-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-461-2" name="__codelineno-461-2" href="#__codelineno-461-2"></a><span class="c1">// at the X character on the right           X</span>
-<a id="__codelineno-461-3" name="__codelineno-461-3" href="#__codelineno-461-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span>
-<a id="__codelineno-461-4" name="__codelineno-461-4" href="#__codelineno-461-4"></a><span class="w">    </span><span class="kt">String</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-466-1" name="__codelineno-466-1" href="#__codelineno-466-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-466-2" name="__codelineno-466-2" href="#__codelineno-466-2"></a><span class="c1">// at the X character on the right           X</span>
+<a id="__codelineno-466-3" name="__codelineno-466-3" href="#__codelineno-466-3"></a><span class="kd">val</span><span class="w"> </span><span class="nv">aVariableWithALooooooooooooongName</span><span class="p">:</span>
+<a id="__codelineno-466-4" name="__codelineno-466-4" href="#__codelineno-466-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-462-1" name="__codelineno-462-1" href="#__codelineno-462-1"></a><span class="c1">// Assume that the last allowed character is</span>
-<a id="__codelineno-462-2" name="__codelineno-462-2" href="#__codelineno-462-2"></a><span class="c1">// at the X character on the right           X</span>
-<a id="__codelineno-462-3" name="__codelineno-462-3" href="#__codelineno-462-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-467-1" name="__codelineno-467-1" href="#__codelineno-467-1"></a><span class="c1">// Assume that the last allowed character is</span>
+<a id="__codelineno-467-2" name="__codelineno-467-2" href="#__codelineno-467-2"></a><span class="c1">// at the X character on the right           X</span>
+<a id="__codelineno-467-3" name="__codelineno-467-3" href="#__codelineno-467-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>
@@ -7653,47 +7706,47 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-463-1" name="__codelineno-463-1" href="#__codelineno-463-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:property-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-468-1" name="__codelineno-468-1" href="#__codelineno-468-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:property-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-464-1" name="__codelineno-464-1" href="#__codelineno-464-1"></a>ktlint_standard_property-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-469-1" name="__codelineno-469-1" href="#__codelineno-469-1"></a>ktlint_standard_property-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-465-1" name="__codelineno-465-1" href="#__codelineno-465-1"></a>ktlint_standard_property-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-470-1" name="__codelineno-470-1" href="#__codelineno-470-1"></a>ktlint_standard_property-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="statement-wrapping">Statement wrapping<a class="headerlink" href="#statement-wrapping" title="Permanent link">&para;</a></h3>
 <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>
-<div class="tabbed-set tabbed-alternate" data-tabs="93:2"><input checked="checked" id="__tabbed_93_1" name="__tabbed_93" type="radio" /><input id="__tabbed_93_2" name="__tabbed_93" type="radio" /><div class="tabbed-labels"><label for="__tabbed_93_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_93_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="94:2"><input checked="checked" id="__tabbed_94_1" name="__tabbed_94" type="radio" /><input id="__tabbed_94_2" name="__tabbed_94" type="radio" /><div class="tabbed-labels"><label for="__tabbed_94_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_94_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-466-1" name="__codelineno-466-1" href="#__codelineno-466-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-466-2" name="__codelineno-466-2" href="#__codelineno-466-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-466-3" name="__codelineno-466-3" href="#__codelineno-466-3"></a><span class="w">        </span><span class="c1">// do something</span>
-<a id="__codelineno-466-4" name="__codelineno-466-4" href="#__codelineno-466-4"></a><span class="w">    </span><span class="p">}</span>
-<a id="__codelineno-466-5" name="__codelineno-466-5" href="#__codelineno-466-5"></a><span class="p">}</span>
-<a id="__codelineno-466-6" name="__codelineno-466-6" href="#__codelineno-466-6"></a>
-<a id="__codelineno-466-7" name="__codelineno-466-7" href="#__codelineno-466-7"></a><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-466-8" name="__codelineno-466-8" href="#__codelineno-466-8"></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">0</span>
-<a id="__codelineno-466-9" name="__codelineno-466-9" href="#__codelineno-466-9"></a><span class="w">    </span><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span>
-<a id="__codelineno-466-10" name="__codelineno-466-10" href="#__codelineno-466-10"></a><span class="p">}</span>
-<a id="__codelineno-466-11" name="__codelineno-466-11" href="#__codelineno-466-11"></a>
-<a id="__codelineno-466-12" name="__codelineno-466-12" href="#__codelineno-466-12"></a><span class="kd">enum</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar1</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="n">BAR</span><span class="w"> </span><span class="p">}</span>
-<a id="__codelineno-466-13" name="__codelineno-466-13" href="#__codelineno-466-13"></a>
-<a id="__codelineno-466-14" name="__codelineno-466-14" href="#__codelineno-466-14"></a><span class="kd">enum</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar2</span><span class="w"> </span><span class="p">{</span>
-<a id="__codelineno-466-15" name="__codelineno-466-15" href="#__codelineno-466-15"></a><span class="w">    </span><span class="n">FOO</span><span class="p">,</span>
-<a id="__codelineno-466-16" name="__codelineno-466-16" href="#__codelineno-466-16"></a><span class="w">    </span><span class="n">BAR</span><span class="p">,</span>
-<a id="__codelineno-466-17" name="__codelineno-466-17" href="#__codelineno-466-17"></a><span class="p">}</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-471-1" name="__codelineno-471-1" href="#__codelineno-471-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-471-2" name="__codelineno-471-2" href="#__codelineno-471-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-471-3" name="__codelineno-471-3" href="#__codelineno-471-3"></a><span class="w">        </span><span class="c1">// do something</span>
+<a id="__codelineno-471-4" name="__codelineno-471-4" href="#__codelineno-471-4"></a><span class="w">    </span><span class="p">}</span>
+<a id="__codelineno-471-5" name="__codelineno-471-5" href="#__codelineno-471-5"></a><span class="p">}</span>
+<a id="__codelineno-471-6" name="__codelineno-471-6" href="#__codelineno-471-6"></a>
+<a id="__codelineno-471-7" name="__codelineno-471-7" href="#__codelineno-471-7"></a><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-471-8" name="__codelineno-471-8" href="#__codelineno-471-8"></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">0</span>
+<a id="__codelineno-471-9" name="__codelineno-471-9" href="#__codelineno-471-9"></a><span class="w">    </span><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span>
+<a id="__codelineno-471-10" name="__codelineno-471-10" href="#__codelineno-471-10"></a><span class="p">}</span>
+<a id="__codelineno-471-11" name="__codelineno-471-11" href="#__codelineno-471-11"></a>
+<a id="__codelineno-471-12" name="__codelineno-471-12" href="#__codelineno-471-12"></a><span class="kd">enum</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar1</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="n">BAR</span><span class="w"> </span><span class="p">}</span>
+<a id="__codelineno-471-13" name="__codelineno-471-13" href="#__codelineno-471-13"></a>
+<a id="__codelineno-471-14" name="__codelineno-471-14" href="#__codelineno-471-14"></a><span class="kd">enum</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nc">FooBar2</span><span class="w"> </span><span class="p">{</span>
+<a id="__codelineno-471-15" name="__codelineno-471-15" href="#__codelineno-471-15"></a><span class="w">    </span><span class="n">FOO</span><span class="p">,</span>
+<a id="__codelineno-471-16" name="__codelineno-471-16" href="#__codelineno-471-16"></a><span class="w">    </span><span class="n">BAR</span><span class="p">,</span>
+<a id="__codelineno-471-17" name="__codelineno-471-17" href="#__codelineno-471-17"></a><span class="p">}</span>
 </code></pre></div>
 </div>
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-467-1" name="__codelineno-467-1" href="#__codelineno-467-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><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-467-2" name="__codelineno-467-2" href="#__codelineno-467-2"></a><span class="w">        </span><span class="c1">// do something</span>
-<a id="__codelineno-467-3" name="__codelineno-467-3" href="#__codelineno-467-3"></a><span class="w">    </span><span class="p">}</span>
-<a id="__codelineno-467-4" name="__codelineno-467-4" href="#__codelineno-467-4"></a><span class="p">}</span>
-<a id="__codelineno-467-5" name="__codelineno-467-5" href="#__codelineno-467-5"></a>
-<a id="__codelineno-467-6" name="__codelineno-467-6" href="#__codelineno-467-6"></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="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">0</span>
-<a id="__codelineno-467-7" name="__codelineno-467-7" href="#__codelineno-467-7"></a><span class="w">    </span><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="w"> </span><span class="o">=</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-472-1" name="__codelineno-472-1" href="#__codelineno-472-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><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-472-2" name="__codelineno-472-2" href="#__codelineno-472-2"></a><span class="w">        </span><span class="c1">// do something</span>
+<a id="__codelineno-472-3" name="__codelineno-472-3" href="#__codelineno-472-3"></a><span class="w">    </span><span class="p">}</span>
+<a id="__codelineno-472-4" name="__codelineno-472-4" href="#__codelineno-472-4"></a><span class="p">}</span>
+<a id="__codelineno-472-5" name="__codelineno-472-5" href="#__codelineno-472-5"></a>
+<a id="__codelineno-472-6" name="__codelineno-472-6" href="#__codelineno-472-6"></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="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">0</span>
+<a id="__codelineno-472-7" name="__codelineno-472-7" href="#__codelineno-472-7"></a><span class="w">    </span><span class="kd">val</span><span class="w"> </span><span class="nv">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="p">}</span>
 </code></pre></div>
 </div>
 </div>
@@ -7702,33 +7755,33 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-468-1" name="__codelineno-468-1" href="#__codelineno-468-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:statement-wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-473-1" name="__codelineno-473-1" href="#__codelineno-473-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:statement-wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-469-1" name="__codelineno-469-1" href="#__codelineno-469-1"></a>ktlint_standard_statement-wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-474-1" name="__codelineno-474-1" href="#__codelineno-474-1"></a>ktlint_standard_statement-wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-470-1" name="__codelineno-470-1" href="#__codelineno-470-1"></a>ktlint_standard_statement-wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-475-1" name="__codelineno-475-1" href="#__codelineno-475-1"></a>ktlint_standard_statement-wrapping = disabled
 </code></pre></div></li>
 </ol>
 <h3 id="wrapping_1">Wrapping<a class="headerlink" href="#wrapping_1" title="Permanent link">&para;</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="94:2"><input checked="checked" id="__tabbed_94_1" name="__tabbed_94" type="radio" /><input id="__tabbed_94_2" name="__tabbed_94" type="radio" /><div class="tabbed-labels"><label for="__tabbed_94_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_94_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.9"/></svg></span></a> Disallowed</label></div>
+<div class="tabbed-set tabbed-alternate" data-tabs="95:2"><input checked="checked" id="__tabbed_95_1" name="__tabbed_95" type="radio" /><input id="__tabbed_95_2" name="__tabbed_95" type="radio" /><div class="tabbed-labels"><label for="__tabbed_95_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.53z"/></svg></span></a> Ktlint</label><label for="__tabbed_95_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.9"/></svg></span></a> Disallowed</label></div>
 <div class="tabbed-content">
 <div class="tabbed-block">
-<div class="highlight"><pre><span></span><code><a id="__codelineno-471-1" name="__codelineno-471-1" href="#__codelineno-471-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-471-2" name="__codelineno-471-2" href="#__codelineno-471-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
-<a id="__codelineno-471-3" name="__codelineno-471-3" href="#__codelineno-471-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-471-4" name="__codelineno-471-4" href="#__codelineno-471-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span>
-<a id="__codelineno-471-5" name="__codelineno-471-5" href="#__codelineno-471-5"></a><span class="w">        </span><span class="n">c</span><span class="p">,</span>
-<a id="__codelineno-471-6" name="__codelineno-471-6" href="#__codelineno-471-6"></a><span class="w">    </span><span class="p">)</span>
+<div class="highlight"><pre><span></span><code><a id="__codelineno-476-1" name="__codelineno-476-1" href="#__codelineno-476-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-476-2" name="__codelineno-476-2" href="#__codelineno-476-2"></a><span class="w">    </span><span class="n">foo</span><span class="p">(</span>
+<a id="__codelineno-476-3" name="__codelineno-476-3" href="#__codelineno-476-3"></a><span class="w">        </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-476-4" name="__codelineno-476-4" href="#__codelineno-476-4"></a><span class="w">        </span><span class="n">b</span><span class="p">,</span>
+<a id="__codelineno-476-5" name="__codelineno-476-5" href="#__codelineno-476-5"></a><span class="w">        </span><span class="n">c</span><span class="p">,</span>
+<a id="__codelineno-476-6" name="__codelineno-476-6" href="#__codelineno-476-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-472-1" name="__codelineno-472-1" href="#__codelineno-472-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="p">(</span>
-<a id="__codelineno-472-2" name="__codelineno-472-2" href="#__codelineno-472-2"></a><span class="w">    </span><span class="n">a</span><span class="p">,</span>
-<a id="__codelineno-472-3" name="__codelineno-472-3" href="#__codelineno-472-3"></a><span class="w">    </span><span class="n">b</span><span class="p">,</span>
-<a id="__codelineno-472-4" name="__codelineno-472-4" href="#__codelineno-472-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-477-1" name="__codelineno-477-1" href="#__codelineno-477-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="p">(</span>
+<a id="__codelineno-477-2" name="__codelineno-477-2" href="#__codelineno-477-2"></a><span class="w">    </span><span class="n">a</span><span class="p">,</span>
+<a id="__codelineno-477-3" name="__codelineno-477-3" href="#__codelineno-477-3"></a><span class="w">    </span><span class="n">b</span><span class="p">,</span>
+<a id="__codelineno-477-4" name="__codelineno-477-4" href="#__codelineno-477-4"></a><span class="w">    </span><span class="n">c</span><span class="p">)</span>
 </code></pre></div>
 </div>
 </div>
@@ -7755,13 +7808,13 @@
 <p class="annotate">Suppress or disable rule (1)</p>
 <ol>
 <li>Suppress rule in code with annotation below:
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-473-1" name="__codelineno-473-1" href="#__codelineno-473-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:wrapping&quot;</span><span class="p">)</span>
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-478-1" name="__codelineno-478-1" href="#__codelineno-478-1"></a><span class="nd">@Suppress</span><span class="p">(</span><span class="s">&quot;ktlint:standard:wrapping&quot;</span><span class="p">)</span>
 </code></pre></div>
    Enable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-474-1" name="__codelineno-474-1" href="#__codelineno-474-1"></a>ktlint_standard_wrapping = enabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-479-1" name="__codelineno-479-1" href="#__codelineno-479-1"></a>ktlint_standard_wrapping = enabled
 </code></pre></div>
    Disable rule via <code>.editorconfig</code>
-    <div class="highlight"><pre><span></span><code><a id="__codelineno-475-1" name="__codelineno-475-1" href="#__codelineno-475-1"></a>ktlint_standard_wrapping = disabled
+    <div class="highlight"><pre><span></span><code><a id="__codelineno-480-1" name="__codelineno-480-1" href="#__codelineno-480-1"></a>ktlint_standard_wrapping = disabled
 </code></pre></div></li>
 </ol>
 
diff --git a/dev-snapshot/search/search_index.json b/dev-snapshot/search/search_index.json
index cfd05b4..9de9237 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 &amp; 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/#what-are-the-maven-coordinates-in-ktlint-1x","title":"What are the Maven coordinates in Ktlint 1.x?","text":"<p>With the release of ktlint <code>1.0</code> the Maven coordinates of most modules have been changed. Now all ktlint modules are published in Maven group <code>com.pinterest.ktlint</code>. Also, the artifact id's of some modules have been changed.</p> <p>The Maven coordinates of modules below have been changed:</p> Old Maven coordinates New Maven coordinates <code>com.pinterest:ktlint</code> <code>com.pinterest.ktlint:ktlint-cli</code> <code>com.pinterest.ktlint:ktlint-reporter-baseline</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-baseline</code> <code>com.pinterest.ktlint:ktlint-reporter-checkstyle</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-checkstyle</code> <code>com.pinterest.ktlint:ktlint-cli-reporter</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-core</code> <code>com.pinterest.ktlint:ktlint-reporter-format</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-format</code> <code>com.pinterest.ktlint:ktlint-reporter-html</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-html</code> <code>com.pinterest.ktlint:ktlint-reporter-json</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-json</code> <code>com.pinterest.ktlint:ktlint-reporter-plain</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-plain</code> <code>com.pinterest.ktlint:ktlint-reporter-plain-summary</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-plain-summary</code> <code>com.pinterest.ktlint:ktlint-reporter-sarif</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-sarif</code>"},{"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/#why-is-a-rule-skipped-when-i-disable-some-other-rule","title":"Why is a rule skipped when I disable some other rule?","text":"<p>Most rules in ktlint can be executed independently of other rules. However, some rules can only be executed in case one or more other rules are also loaded and/or enabled. Dependencies between rules are introduced to reduce complexity in ktlint. Similar logic in different rules has to be avoided as this might result in formatting conflicts between different rules, which could result in endless loops of formatting and reformatting by a set of rules.</p> <p>In case, you disable a rule, you might run into an <code>IllegalStateException</code> like below:</p> <pre><code>java.lang.IllegalStateException: Skipping rule(s) which are depending on a rule which is not loaded. Please check if you need to add additional rule sets before creating an issue.\n  - Rule with id 'RuleId(value=standard:string-template-indent)' requires rule with id 'RuleId(value=standard:multiline-expression-wrapping)' to be loaded\n</code></pre> <p>For the example above, the <code>string-template-indent</code> rule depends on the <code>multiline-expression-wrapping</code> so that the former rule does not need to know, how to wrap a multiline string that is not yet wrapped: <pre><code>val foo = \"\"\"\n    some text\n   \"\"\".trimIndent()\n</code></pre></p>"},{"location":"faq/#why-does-ktlint-discourage-certain-comment-locations","title":"Why does ktlint discourage certain comment locations?","text":"<p>Kotlin has three different type of comments. Although the KDoc and the block comment look similar in code, their internal PSI structure is different. The EOL comment is yet very different.</p> <p>In Kotlin, it is possible to insert a comment everywhere. It is very challenging, and time-consuming, to make each rule fully resilient for each possible comment location, even in case such locations will (almost) never by used.</p> <p>For example, in sample below it is unclear whether the comment applies to the <code>if</code> block, or to the <code>else</code> block without interpreting the comment itself.</p>  Unclear comment Clear comment <pre><code>if (someCondition) {\n    doTrue()\n} // comment\nelse {\n    doFalse()\n}\n</code></pre> <pre><code>if (someCondition) {\n    doTrue()\n} else { \n    // comment\n    doFalse()\n}\n</code></pre> <p>In other cases, a comment location is more widely used but semantically still incorrect. For example, in sample below the EOL comment is placed after the comma, but it obviously is related to the part before the comma:</p>  Unclear comment Clear comment <pre><code>fun fooBar(\n    foo: Foo, // foo-comment\n    bar: Bar, // bar-comment\n) {}\n</code></pre> <pre><code>fun fooBar(\n    // foo-comment\n    foo: Foo,\n    // bar-comment\n    bar: Bar,\n) {}\n</code></pre> <p>By forbidding certain comment locations, the logic in the rules becomes a bit easier.</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 antipatterns, 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> <p>Warning</p> <p>Import statements can not be annotated in Kotlin. The rules related to import statements can be suppressed with file annotations only.</p>  Allowed <pre><code>// Suppressing all rules for the entire file\n@file:Suppress(\"ktlint\")\n\n// Suppressing specific rules for the entire file\n// Rules related to import statements can only be suppressed using file annotations\n@file:Suppress(\"ktlint:standard:no-wildcard-imports\", \"ktlint:custom-rule-set-id:custom-rule-id\")\n\n// Suppress all rules for the annotated construct\n@Suppress(\"ktlint\")\nclass Foo {}\n\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</code></pre>"},{"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:ktlint-cli</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 {\n  ServiceLoader\n      .load(RuleSetProviderV2::class.java)\n      .flatMapTo(this) { it.getRuleProviders() }\n}\nval ktLintRuleEngine = KtLintRuleEngine(\n  ruleProviders = ruleProviders,\n  editorConfigDefaults = 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(\n  ktLintRuleEngine.format(\n    Code.CodeSnippet(\n      stringBuilder.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":"faq/#how-do-i-disable-ktlint-for-generated-code","title":"How do I disable ktlint for generated code?","text":"<p>Running ktlint on generated code is not useful. Fixing lint and format errors on generated code is a waste of time as errors will be re-introduced once that code is generated again. Given that generated code is located in a separate directory, you can disable ktlint for such directory by adding a glob for that directory: <pre><code>[some/path/to/generated/code/**/*]\nktlint = disabled\n</code></pre></p> <p>Warning</p> <p>The <code>ec4j</code> library used by ktlint does not seem to work with globs starting with <code>**</code> followed by a chain of multiple directories (for example <code>**/path/to/generated/**/*</code>). But both <code>some/path/to/generated/**/*</code> and <code>**/generated/**/*</code> work fine.</p>"},{"location":"quick-start/","title":"Quick start","text":"<p>Follow steps below for a quick start with latest ktlint release.</p>"},{"location":"quick-start/#step-1-install-with-brew","title":"Step 1: Install with brew","text":"<p><pre><code>brew install ktlint\n</code></pre> See download and verification from GitHub or other package managers for alternative ways of installing ktlint. Or, use one of the integrations like maven and gradle plugins.</p>"},{"location":"quick-start/#step-2-lint-and-format-your-code","title":"Step 2: Lint and format your code","text":"<p>All files with extension <code>.kt</code> and <code>.kts</code> in the current directory and below will be scanned. Problems will be fixed automatically when possible. Autocorrect style violations<pre><code>ktlint --format\n# or\nktlint -F\n</code></pre> See cli usage for a more extensive description on using ktlint.</p>"},{"location":"readme/","title":"Build &amp; 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>[![ktlint](https://img.shields.io/badge/ktlint%20code--style-%E2%9D%A4-FF4081)](https://pinterest.github.io/ktlint/)\n</code></pre>"},{"location":"api/custom-integration/","title":"Custom integration","text":""},{"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 =\n  KtLintRuleEngine(\n    ruleProviders = 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 your own custom rules, or a combination of both. Creating a set of RuleProviders<pre><code>val KTLINT_API_CONSUMER_RULE_PROVIDERS =\n  setOf(\n    // Can provide custom rules\n    RuleProvider { NoVarRule() },\n    // but also reuse rules from KtLint rulesets\n    RuleProvider { IndentationRule() },\n  )\n</code></pre></p>"},{"location":"api/custom-integration/#editor-config-defaults-overrides","title":"Editor config: defaults &amp; 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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigOverride = EditorConfigOverride.from(\n      INDENT_STYLE_PROPERTY to IndentConfig.IndentStyle.SPACE,\n      INDENT_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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigDefaults = EditorConfigDefaults.load(\n      path = Paths.get(\"/some/path/to/editorconfig/file/or/directory\"),\n      propertyTypes = 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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigDefaults = EditorConfigDefaults(\n      org.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 &amp; format","text":"<p>Once the <code>KtLintRuleEngine</code> has been defined, it is ready to be invoked for code that has to be linted or formatted. 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(\n    File(\"/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 an optional lambda. Once linting is complete, the lambda will be called for each <code>LintError</code> which is found. Invoking lint<pre><code>ktLintRuleEngine\n    .lint(code) { lintError -&gt;\n        // handle\n    }\n</code></pre></p> <p>The <code>format</code> function is invoked with a lambda. The lambda is called for each <code>LintError</code> which is found. If the <code>LintError</code> can be autocorrected, the return value of the lambda instructs the rule whether this specific <code>LintError</code> is to be autocorrected, or not. If the <code>LintError</code> can not be autocorrected, the return result of the lambda is ignored. The formatted code is returned as result of the function.</p> <p>The new <code>format</code> function allows the API Consumer to decide which LintError is to be autocorrected, or not. This is most interesting for API Consumers that let their user interactively decide per <code>LintError</code> how it has to be handled. For example see the <code>ktlint-intellij-plugin</code> which in 'manual' mode displays all lint violations, which allows the user to decide which <code>LintError</code> is to be autocorrected.</p> <p>Note</p> <p>The difference with the legacy version of the <code>format</code> is subtle. It takes two parameters (a <code>LintError</code> and <code>Boolean</code> denoting whether the <code>LintError</code> is corrected), and it does not return a value.</p> Invoke format (preferred, starting from Ktlint 1.3)<pre><code>val formattedCode =\n    ktLintRuleEngine\n      .format(code) { lintError -&gt;\n          if (lintError.canBeAutoCorrected) {\n              // Return AutocorrectDecision.ALLOW_AUTOCORRECT to execute the autocorrect of this lintError if this is supported by the rule.\n              // Return AutocorrectDecision.NO_AUTOCORRECT if the LintError should not be corrected even if is supported by the rule.\n          } else {\n              // In case the LintError can not be autocorrected, the return value of the lambda will be ignored.\n              // For clarity reasons it is advised to return AutocorrectDecision.NO_AUTOCORRECT in case the LintError can not be autocorrected.\n              AutocorrectDecision.NO_AUTOCORRECT\n          }\n      }\n</code></pre> <p>Warning</p> <p>Rules need to implement the interface <code>RuleAutocorrectApproveHandler</code> in order to let the API Consumer decide whether a <code>LintError</code> is to be autocorrected, or not. This interface is implemented for all rules provided via the Ktlint project starting from version 1.3. However, external rulesets may not have implemented this interface on their rulesets though. Contact the maintainer of such a ruleset to implement this interface.</p> <p>The (legacy) <code>format</code> function is invoked with an optional lambda. Once formatting is complete, the lambda will be called for each <code>LintError</code> which is found. The (legacy) <code>format</code> function fixes all <code>LintErrors</code> for which an autocorrect is available. The formatted code is returned as result of the function.</p> Invoke format (deprecated as of Ktlint 1.3, will be removed in Ktlint 2.0)<pre><code>// Up until Ktlint 1.2.1 the format was invoked with a lambda having two parameters and not returning a result. This function will be removed in Ktlint 2.0 \nval formattedCode =\n    ktLintRuleEngine\n        .format(code) { lintError, corrected -&gt;\n            // handle\n        }\n</code></pre>"},{"location":"api/custom-integration/#rule-ruleautocorrectapprovehandler","title":"Rule &amp; RuleAutocorrectApproveHandler","text":"<p>Note</p> <p>Providers of custom rules are strongly encouraged to implement <code>RuleAutocorrectApproveHandler</code> interface as described below. The <code>ktlint-intellij-plugin</code>, which will be updated soon after the 1.3 release of Ktlint, make use of this new functionality. If your ruleset is used by users of the plugin, it is very likely that they want to be able to autocorrect individual <code>LintErrors</code> or to format a block of code (e.g. a selection) in a file. This functionality will only be available for rules that have implemented this interface.</p> <p>In Ktlint 1.3 the <code>RuleAutocorrectApproveHandler</code> interface is added. This interface adds the ability that the API Consumer decides per <code>LintError</code> whether it needs to autocorrected, or not. In Ktlint 2.0 the methods <code>beforeVisitChildNodes</code> and <code>afterVisitChildNodes</code> of the <code>Rule</code> class will be replaced with the new versions which are now added to the <code>RuleAutocorrectApproveHandler</code> interface as is shown below (the signature for <code>afterVisitChildNodes</code> is changed similarly):</p> Deprecated signature in `Rule` class<pre><code>public open fun beforeVisitChildNodes(\n    node: ASTNode,\n    autoCorrect: Boolean,\n    emit: (\n        offset: Int,\n        errorMessage: String,\n        canBeAutoCorrected: Boolean\n    ) -&gt; Unit,\n)  \n</code></pre> New signature in `RuleAutocorrectApproveHandler` interface<pre><code>public fun beforeVisitChildNodes(\n    node: ASTNode,\n    emit: (\n        offset: Int,\n        errorMessage: String,\n        canBeAutoCorrected: Boolean\n    ) -&gt; AutocorrectDecision,\n)\n</code></pre> <p>The <code>autoCorrect</code> parameter is no longer passed to the method. Instead, the <code>emit</code> lambda now returns the value <code>AutocorrectDecision.ALLOW_AUTOCORRECT</code> or <code>AutocorrectDecision.NO_AUTOCORRECT</code>.</p> <p>In case a <code>LintError</code> is detected, and can be autocorrected, the <code>LintError</code> can be processed as shown below:</p> <pre><code>emit(node.startOffset, \"some detail message\", true)\n   .ifAutocorrectAllowed {\n       // Autocorrect the LintError\n   }\n</code></pre> <p>In case the <code>LintError</code> can not be autocorrected, if suffices to emit the violation only:  <pre><code>emit(node.startOffset, \"some detail message\", false)\n</code></pre></p>"},{"location":"api/custom-integration/#logging","title":"Logging","text":"<p>Ktlint uses the <code>io.github.oshai: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 (3<sup>rd</sup> 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>You can provide custom rules via a separate ruleset to Ktlint. A ruleset is a JAR containing one or more Rules. </p> <p>A complete sample project is included in this repo under the ktlint-ruleset-template directory. This directory can be cloned, and used as a starting point for a new project containing your custom ruleset.</p>"},{"location":"api/custom-rule-set/#ktlint-ruleset-template","title":"ktlint-ruleset-template","text":""},{"location":"api/custom-rule-set/#gradle-build","title":"Gradle build","text":"<p>The Gradle build file of the sample project includes the setup for:</p> <ul> <li>publishing the custom ruleset artifact to Maven</li> <li>the custom Gradle task 'ktlintCheck' that is using the Ktlint CLI to run the rules provided by the ktlint project, as well as the custom rule(s) from this project on the project itself (dogfood principle).</li> </ul>"},{"location":"api/custom-rule-set/#rule","title":"Rule","text":"<p>The Rule contains the logic for linting and formatting the code. For example, see NoVarRuleTest. </p> <p>A rule has to implement one or more of hooks below:</p> <ul> <li><code>Rule.beforeFirstNode</code></li> <li><code>RuleAutocorrectApproveHandler.beforeVisitChildNodes</code></li> <li><code>RuleAutocorrectApproveHandler.afterVisitChildNodes</code></li> <li><code>Rule.afterLastNode</code></li> </ul> <p>Tip</p> <p>See <code>ktlint-ruleset-standard</code> for examples of rules that implement the hooks above.</p> <p>Upon traversal of the Abstract Syntax Tree (AST), the hooks of the Rule are visited as indicated by their names. The Jetbrains PsiViewer plugin for IntelliJ IDEA is a convenient tool to inspect the AST for any piece of code.</p> <p></p>"},{"location":"api/custom-rule-set/#rule-set-provider","title":"Rule Set Provider","text":"<p>The RuleSetProvider provides new instances of the rule, see CustomRuleSetProvider for an example.</p> <p><code>ktlint</code> is relying on the ServiceLoader to discover all available \"RuleSet\"s on the classpath. For this, the RuleSetProvider needs to be registered in file <code>resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3</code>, see Registration for Java ServiceLoader.</p>"},{"location":"api/custom-rule-set/#building-the-project","title":"Building the project","text":"Building the ktlint-ruleset-template<pre><code>$ cd ktlint-ruleset-template/\n$ ../gradlew build\n</code></pre>"},{"location":"api/custom-rule-set/#running-ktlint-cli-with-the-custom-ruleset","title":"Running Ktlint CLI with the custom ruleset","text":"Provide code sample that violates rule `custom:no-var<pre><code>$ echo 'var v = 0' &gt; 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, \n           - standard:final-newline, \n           - standard:chain-wrapping, \n           - standard:colon-spacing, \n           - standard:comma-spacing, \n           - standard:comment-spacing, \n           - standard:curly-spacing, \n           - standard:dot-spacing, \n           - standard:import-ordering, \n           - standard:keyword-spacing, \n           - standard:modifier-order, \n           - standard:no-blank-line-before-rbrace, \n           - standard:no-consecutive-blank-lines, \n           - standard:no-empty-class-body, \n           - standard:no-line-break-after-else, \n           - standard:no-line-break-before-assignment, \n           - standard:no-multi-spaces, \n           - standard:no-semi, \n           - standard:no-trailing-spaces, \n           - standard:no-unit-return, \n           - standard:no-unused-imports, \n           - standard:no-wildcard-imports, \n           - standard:op-spacing, \u00a1\n           - standard:pa\u00a1rameter-list-wrapping, \n           - standard:paren-spacing, \n           - standard:range-spacing, \n           - standard:string-template, \n           - custom:no-var, \n           - standard:indent, \n           - 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/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 &amp;&amp; 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 -&gt; Open....      </li> <li>You'll also need to set the \"Project language level\" to 8 in \"Project Settings\" (File -&gt; Project Structure... -&gt; Project).    </li> <li>To run <code>ktlint</code> - right-click on <code>ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt</code> -&gt; Run.</li> </ul>"},{"location":"install/cli/","title":"Command line","text":"<p>Command Line usage</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/1.7.1/ktlint &amp;&amp; chmod a+x ktlint &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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>"},{"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 rules from the standard ruleset. Hidden folders will be skipped.</p> Default validation with standard ruleset<pre><code>ktlint\n</code></pre> <p>Note</p> <p>The experimental rules in the standard rule set will only be run when <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> is set.</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.</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\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</code> file 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># Specify the code style (ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig\nktlint generateEditorConfig --code-style ktlint_official\n# or\nktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig --code-style android_studio\n</code></pre> <p>Normally the <code>.editorconfig</code> 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>Overrides '.editorconfig' in project directory\" in KtLint 0.46 and older</p> <p>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 &amp;&amp; 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>Suppress logging and error output</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&gt; /dev/null</code> to the end of the command line. Otherwise, specify a reporter to write the error output to a file.</p> <p>If input from <code>stdin</code> represents the contents of a file, the file path can be supplied with <code>stdin-path</code>. This path is made available for rules to use, the <code>--format</code> option will not modify this file. </p> file path from stdin-path<pre><code>ktlint --stdin --stdin-path /path/to/file/Foo.kt\n</code></pre>"},{"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>--color</code> and <code>--color-name=&lt;colorName&gt;</code>: Make output colorful and optionally set the color name to use.</p> <p><code>-h</code> or <code>--help</code>: Prints help information.</p> <p><code>--limit=&lt;limit&gt;</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[=&lt;delimiter&gt;]</code>: Reads additional patterns from <code>stdin</code>, where the patterns are separated by <code>&lt;delimiter&gt;</code>. If <code>=&lt;delimiter&gt;</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>&lt;plugins&gt;</code> section in the <code>pom.xml</code>:</p> <ul> <li>The <code>ktlint</code> task is bound to the Maven compile lifecycle and will be executed each time the <code>mvn compile</code> is executed. It can also be executed with command <code>mvn exec:exec@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&lt;plugin&gt;\n  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;\n  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;\n  &lt;version&gt;3.5.0&lt;/version&gt;\n  &lt;executions&gt;\n    &lt;execution&gt;\n      &lt;!--\n      Format and autocorrect lint errors when possible during compile. This helps in committing autocorrect changes in the\n      same commit as where the original code changes were made.\n      --&gt;\n      &lt;id&gt;ktlint-format&lt;/id&gt;\n      &lt;phase&gt;compile&lt;/phase&gt;\n      &lt;goals&gt;\n        &lt;goal&gt;exec&lt;/goal&gt;\n      &lt;/goals&gt;\n    &lt;/execution&gt;\n  &lt;/executions&gt;\n  &lt;configuration&gt;\n    &lt;includePluginDependencies&gt;true&lt;/includePluginDependencies&gt;\n    &lt;executable&gt;java&lt;/executable&gt;\n    &lt;arguments&gt;\n      &lt;argument&gt;-classpath&lt;/argument&gt;\n      &lt;!-- automatically creates the classpath using all project dependencies, also adding the project build directory --&gt;\n      &lt;classpath/&gt;\n      &lt;argument&gt;com.pinterest.ktlint.Main&lt;/argument&gt;\n      &lt;!-- Actual wanted arguments to run ktlint with formatting --&gt;\n      &lt;argument&gt;--format&lt;/argument&gt;\n      &lt;argument&gt;--relative&lt;/argument&gt;\n    &lt;/arguments&gt;\n  &lt;/configuration&gt;\n  &lt;dependencies&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;com.pinterest.ktlint&lt;/groupId&gt;\n      &lt;artifactId&gt;ktlint-cli&lt;/artifactId&gt;\n      &lt;version&gt;1.7.1&lt;/version&gt;\n      &lt;!-- Use fat jar of ktlint-cli --&gt;\n      &lt;classifier&gt;all&lt;/classifier&gt;\n      &lt;type&gt;jar&lt;/type&gt;\n    &lt;/dependency&gt;\n    &lt;!-- additional 3rd party ruleset(s) can be specified here --&gt;\n  &lt;/dependencies&gt;\n&lt;/plugin&gt;\n...\n</code></pre> <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)\n\nplugins {\n    id 'java'\n}\n\nrepositories {\n    mavenCentral()\n}\n\nconfigurations {\n    ktlint\n}\n\ndependencies {\n    ktlint(\"com.pinterest.ktlint:ktlint-cli:1.7.1\") {\n        attributes {\n            attribute(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}\n\ntasks.register(\"ktlintCheck\", JavaExec) {\n    group = \"verification\"\n    description = \"Check Kotlin code style.\"\n    classpath = configurations.ktlint\n    mainClass = \"com.pinterest.ktlint.Main\"\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\n\ntasks.named(\"check\") {\n    dependsOn tasks.named(\"ktlintCheck\")\n}\n\ntasks.register(\"ktlintFormat\", JavaExec) {\n    group = \"formatting\"\n    description = \"Fix Kotlin code style deviations.\"\n    classpath = configurations.ktlint\n    mainClass = \"com.pinterest.ktlint.Main\"\n    // Suppress \"sun.misc.Unsafe::objectFieldOffset\" on Java24 (warning) (https://github.com/pinterest/ktlint/issues/2973)\n    // jvmArgs(\"--sun-misc-unsafe-memory-access=allow\") // Java 24+\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args \"-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\n\ndependencies {\n    ktlint(\"com.pinterest.ktlint:ktlint-cli:1.7.1\") {\n        attributes {\n            attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))\n        }\n    }\n    // ktlint(project(\":custom-ktlint-ruleset\")) // in case of custom ruleset\n}\n\nval ktlintCheck by tasks.registering(JavaExec::class) {\n    group = LifecycleBasePlugin.VERIFICATION_GROUP\n    description = \"Check Kotlin code style\"\n    classpath = ktlint\n    mainClass.set(\"com.pinterest.ktlint.Main\")\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args(\n        \"**/src/**/*.kt\",\n        \"**.kts\",\n        \"!**/build/**\",\n    )\n}\n\ntasks.check {\n    dependsOn(ktlintCheck)\n}\n\ntasks.register&lt;JavaExec&gt;(\"ktlintFormat\") {\n    group = LifecycleBasePlugin.VERIFICATION_GROUP\n    description = \"Check Kotlin code style and format\"\n    classpath = ktlint\n    mainClass.set(\"com.pinterest.ktlint.Main\")\n    // Suppress \"sun.misc.Unsafe::objectFieldOffset\" on Java24 (warning) (https://github.com/pinterest/ktlint/issues/2973)\n    jvmArgs(\"--sun-misc-unsafe-memory-access=allow\") // Java 24+\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args(\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/#tca-integration","title":"TCA integration","text":"<p>Tencent Cloud Code Analysis (TCA for short, code-named CodeDog inside the company early) is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis tools in various programming languages.</p> <ul> <li>Homepage: http://tca.tencent.com/</li> <li>Source code: https://github.com/Tencent/CodeAnalysis</li> <li>Documentation: https://tencent.github.io/CodeAnalysis</li> </ul>"},{"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/setup/","title":"Recommended setup","text":"<p>Ktlint can be installed in a lot of different ways. It depends on your situation what works best for you.</p> <p>As maintainer of Ktlint, I advise setup below to maximize your productivity, and get feedback early according to the failing fast principle.</p> <ol> <li><code>ktlint-intellij-plugin</code> for direct feedback while coding</li> <li>Git pre-commit hook for feedback when committing</li> <li>Build pipeline as last defence</li> </ol>"},{"location":"install/setup/#ktlint-intellij-plugin-for-direct-feedback-while-coding","title":"<code>ktlint-intellij-plugin</code> for direct feedback while coding","text":"<p>Tip</p> <p>Ensure to install version <code>0.20.0</code> (or later) of the Ktlint plugin via the Intellij Plugin Marketplace to get benefits described below.</p> <p>The <code>ktlint-intellij-plugin</code> gives direct feedback while writing code. The plugin can be used in 'distract free' and 'manual' mode, or be disabled entirely. This is a per-project setting.</p> <p></p> <p>In <code>distract free</code> mode, the plugin only shows the violations which need to be manually corrected. Ktlint formatting will be applied automatically after apply Intellij IDEA format, or on save of the file. This works bests for projects for which the <code>.editorconfig</code> already has been set up properly for the project.</p> <p></p> <p>Note that image above also shows a warning that 'Ktlint found 5 violations which can be autocorrected'. Reformatting the file, or simply save the file, results in:</p> <p></p> <p>In 'manual' mode, or in 'distract free' mode after selecting 'Show all Ktlint violations in file', each individual violation is shown as error. This allows for suppressing errors that can be autocorrected, but for which this is unwanted.</p> <p></p> <p>Violations reported by ktlint can be suppressed by adding a <code>@Suppress</code> annotation via the quick fix:</p> <p></p> <p>As of Ktlint <code>1.1.0</code> the maintainer of Ktlint has joined the ktlint-intellij-plugin project to ensure that the plugin stays up to date with releases of ktlint and releases of Intellij IDEA.</p> <p>The <code>ktlint-intellij-plugin</code> can be installed as plugin in Intellij IDEA.</p>"},{"location":"install/setup/#git-pre-commit-hook-for-feedback-when-committing","title":"Git pre-commit hook for feedback when committing","text":"<p>The git pre-commit hook, protects against committing code containing lint violations. From the perspective of code reviewing it is important that the code is already formatted in the style of the project. This is especially valuable after refactorings (for example search and replace) have been applied on files that are not opened in the editor and as of that might not have been updated by the <code>ktlint-intellij-plugin</code>.</p> <p>Ktlint CLI can generate a pre-commit hook, or you can find it here.</p>"},{"location":"install/setup/#build-pipeline-as-last-defence","title":"Build pipeline as last defence","text":"<p>As last defence, to ensure that the code base does not contain lint violations, <code>ktlint-cli</code> is run in the (local and remote) build pipeline (see integrations). </p> <p>For example, in my maven projects I have bound the ktlint (linting) task to the maven <code>compile</code> lifecycle. If after compile a lint violation is found the build is failed. This circumvents that developers disable running of the git hooks on their local machine. And in case that the code was not build locally, the remote build pipeline fails as last resort.</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 the version of ktlint to <code>&lt;latest-version&gt;-SNAPSHOT</code>, and adding the Sonatype snapshot repository location.</p> <p>Important</p> <p>Snapshots are kept until 90 days after being published. Due to some bug at sonatype, it is currently not possible to browse the snapshot directories. But, building against a snapshot version is possible.</p>"},{"location":"install/snapshot-build/#maven","title":"Maven","text":"<pre><code>...\n&lt;repository&gt;\n    &lt;id&gt;sonatype-snapshots&lt;/id&gt;\n    &lt;url&gt;https://central.sonatype.com/repository/maven-snapshots/&lt;/url&gt;\n    &lt;snapshots&gt;\n        &lt;enabled&gt;true&lt;/enabled&gt;\n    &lt;/snapshots&gt;\n    &lt;releases&gt;\n        &lt;enabled&gt;false&lt;/enabled&gt;\n    &lt;/releases&gt;\n&lt;/repository&gt;\n...\n</code></pre>"},{"location":"install/snapshot-build/#gradle","title":"Gradle","text":"<pre><code>repositories {\n  maven {\n    url \"https://central.sonatype.com/repository/maven-snapshots/\"\n  }\n}\n</code></pre>"},{"location":"install/snapshot-build/#kotlin-development-version-snapshot","title":"Kotlin development version snapshot","text":"<p>Additionally, the project publishes snapshots build against the latest kotlin development version. To use them, change the version of ktlint to <code>&lt;latest-version&gt;-kotlin-dev-SNAPSHOT</code>.</p>"},{"location":"rules/","title":"Index","text":"<p>= Rules</p>"},{"location":"rules/code-styles/","title":"Code styles","text":"<p>Starting from version <code>1.0</code>, <code>ktlint_official</code> is the default code style. If you want to revert to another code style, then set the <code>.editorconfig</code> property <code>ktlint_code_style</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = intellij_idea # or android_studio or ktlint_official (default)\n</code></pre> <p>The <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> <ul> <li> <p>The <code>intellij_idea</code> (formerly <code>official</code>) code style aims to be compatible with default formatter of IntelliJ IDEA. This code style is based on Kotlin Coding conventions.</p> </li> <li> <p>The <code>android_studio</code> (formerly <code>android</code>) aims to be compatible with default formatter of Android Studio. This code style is based on Android's Kotlin styleguide.</p> </li> </ul>"},{"location":"rules/configuration-intellij-idea/","title":"Intellij IDEA configuration","text":"<p><code>ktlint</code> strives to prevent code formatting conflicts with IntelliJ IDEA / Android Studio as much as possible. In some cases, <code>ktlint</code> deliberately deviates from IDEA formatting.</p>"},{"location":"rules/configuration-intellij-idea/#preventing-conflicts","title":"Preventing conflicts","text":"<p>Many conflicts can be prevented by setting following <code>.editorconfig</code> settings: <pre><code>root = true\n\n[*]\ninsert_final_newline = true\n\n[{*.kt,*.kts}]\nij_kotlin_code_style_defaults = KOTLIN_OFFICIAL\n\n#  Disable wildcard imports entirely\nij_kotlin_name_count_to_use_star_import = 2147483647\nij_kotlin_name_count_to_use_star_import_for_members = 2147483647\nij_kotlin_packages_to_use_import_on_demand = unset\n</code></pre></p> <p>Conflicts between <code>ktlint</code> and IDEA formatting can also be resolved by using the ktlint-intellij-plugin (or install via Intellij IDEA plugin marketplace) in <code>distract free</code> mode. In this mode, the plugin formats your code with <code>ktlint</code> while you're editing the code.</p>"},{"location":"rules/configuration-intellij-idea/#cleaning-up-old-xml-configuration-settings","title":"Cleaning up old XML configuration settings","text":"<p>Projects which have been created with (old)er versions of Intellij IDEA might still contain XML configuration regarding code styling. It is advised to remove the directory <code>.idea/codeStyles</code> whenever it still exists in your project directory.</p>"},{"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>ktlint_official</code> code style is applied. Alternatively, the code style can be set to <code>intellij_idea</code> or <code>android_studio</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre>"},{"location":"rules/configuration-ktlint/#disable-rules","title":"Disable rule(s)","text":"<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>[*.{kt,kts}]\nktlint_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 run unless explicitly enabled: <pre><code>[*.{kt,kts}]\nktlint_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>[*.{kt,kts}]\nktlint_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/#rule-specific-configuration-settings","title":"Rule specific configuration settings","text":"<p>The configuration settings below are used to configure the behavior of a specific rule. As of that, those settings only take effect when the corresponding rule is enabled. See the description of the specific rule for more information about the setting.</p> Configuration setting Rule ij_kotlin_allow_trailing_comma trailing-comma-on-declaration-site ij_kotlin_allow_trailing_comma_on_call_site trailing-comma-on-call-site ij_kotlin_imports_layout import-ordering ij_kotlin_packages_to_use_import_on_demand no-wildcard-imports indent_size indent indent_style indent insert_final_newline final-newline ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than chain-method-continuation ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than class-signature ktlint_ignore_back_ticked_identifier max-line-length ktlint_function_naming_ignore_when_annotated_with function-naming ktlint_function_signature_body_expression_wrapping function-signature ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than function-signature max_line_length max-line-length and several other rules"},{"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\n[api/*.{kt,kts}]\nktlint_standard_indent = disabled\n</code></pre></p> <p>Note: In the example above 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 cases, however, this is 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/#blank-line-between-when-conditions","title":"Blank line between when-conditions","text":"<p>Consistently add or remove a blank line between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed.</p> <p>Note</p> <p>Ktlint uses <code>.editorconfig</code> property <code>ij_kotlin_line_break_after_multiline_when_entry</code> but applies it also on single line entries to increase consistency.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true\nval foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        // BAR2 comment\n        BAR2 -&gt; \"bar2\"\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = false\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; null\n    }\n</code></pre> <pre><code>// ij_kotlin_line_break_after_multiline_when_entry = true | false (no blank lines in simple when-statement)\nval foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        BAR2 -&gt; \"bar2\"\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true (missing newline after BAR1)\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true (missing newline after BAR1, and BAR2)\nval foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        // BAR2 comment\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = false (unexpected newline after BAR2)\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_line_break_after_multiline_when_entry</code>Despite its name, forces a blank line between single line and multiline when-entries when at least one multiline when-entry is found in the when-statement. <code>true</code> <code>true</code> <code>true</code> <p>Rule id: <code>standard:blank-line-between-when-conditions</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:blank-line-between-when-conditions\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-between-when-conditions = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-between-when-conditions = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#expression-operand-wrapping","title":"Expression operand wrapping","text":"<p>Wraps each operand in a multiline expression to a separate line.</p>  Ktlint Disallowed <pre><code>val foo1 = bar || baz\nval foo2 =\n    bar1 ||\n        bar2 ||\n        baz1 ||\n        (baz2 &amp;&amp; baz3)\nval foo3 = bar + baz\nval foo4 =\n    bar1 -\n        bar2 -\n        baz1 -\n        (baz2 * baz3)\n</code></pre> <pre><code>val foo =\n  multiLineOperand(\n      \"bar\"\n  ) || baz\nif (bar1 || bar2 ||\n    baz1 || (baz2 &amp;&amp; baz3)\n) {\n   // do something\n}\n</code></pre> <p>Rule id: <code>standard:expression-operand-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:expression-operand-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_expression-operand-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_expression-operand-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#kdoc","title":"KDoc","text":"<p>KDoc's should only be used on elements for which KDoc is to be transformed to documentation. Normal block comments should be used in other cases.</p> <p>!!! note: Access modifiers are ignored. Strictly speaking, one could argue that private declarations should not have a KDoc as no documentation will be generated for it. However, for internal use of developers, the KDoc still serves documentation purposes.</p>  Ktlint Disallowed <pre><code>/** some KDoc */\nclass FooBar(\n    /** some KDoc */\n    val foo: Foo\n) {\n    /**\n     * Some bar KDoc\n     */\n    constructor() : this()\n\n    /** some KDoc */\n    val bar: Bar\n}\n\nenum class Foo {\n    /** some KDoc */\n    BAR\n}\n\n/** some KDoc */\ninterface Foo\n/** some KDoc */\nfun foo()\n/** some KDoc */\nval foo: Foo\n/** some KDoc */\nobject foo: Foo\n/** some KDoc */\ntypealias FooBar = (Foo) -&gt; Bar\n</code></pre> <pre><code>/**\n * Some dangling Kdoc (e.g. not followed by a declaration)\n */\n\nval foo /** Some KDoc */ = \"foo\"\n\nclass Foo(\n    /** some dangling KDoc inside a parameter list */\n)\n</code></pre> <p>Rule id: <code>standard:kdoc</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:kdoc\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#mixed-condition-operators","title":"Mixed condition operators","text":"<p>Conditions cannot use both <code>&amp;&amp;</code> and <code>||</code> operators between operators at the same level. By using parenthesis the expression is to be clarified.</p>  Ktlint Disallowed <pre><code>val foo = bar1 &amp;&amp; (bar2 || bar3) &amp;&amp; bar4\n</code></pre> <pre><code>val foo = bar1 &amp;&amp;\n    bar2 ||\n    bar3\nval foo = bar1 &amp;&amp; (bar2 || bar3 &amp;&amp; bar4) &amp;&amp; bar5\n</code></pre> <p>Rule id: <code>standard:mixed-condition-operators</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:mixed-condition-operators\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_mixed-condition-operators = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_mixed-condition-operators = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#square-brackets-spacing","title":"Square brackets spacing","text":"<p>Checks for spacing around square brackets.</p>  Ktlint Disallowed <pre><code>val foo1 = bar[1]\nval foo2 =\n   bar[\n       1,\n       2,\n   ]\n\n@Foo(\n    fooBar = [\"foo\", \"bar\"],\n    fooBaz = [\n        \"foo\",\n        \"baz\",\n    ],\n)\nfun foo() {}\n</code></pre> <pre><code>val foo1 = bar [1]\nval foo2 = bar[ 1]\nval foo3 = bar[1 ]\n</code></pre> <p>Rule id: <code>standard:square-brackets-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:square-brackets-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_square-brackets-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_square-brackets-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#when-entry-bracing","title":"When-entry bracing","text":"<p>Enforces consistent usages of braces inside the when-statement. All when-entries in the when-statement should use braces around their bodies in case at least one when-entry has a multiline body, or when the body is surrounded by braces.</p> <p>Braces are helpful for following reasons:</p> <ul> <li>Bodies of the when-conditions are all aligned at same column position</li> <li>Closing braces helps in separating the when-conditions</li> </ul> <p>This rule is not incorporated in the Kotlin Coding conventions, nor in the Android Kotlin Styleguide. It is based on similar behavior in enforcing consistent use of braces in if-else statements. As of that the rule is only enabled automatically for code style <code>ktlint_official</code>. It can be enabled explicitly for other code styles.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; {\n            \"bar1\"\n        }\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; {\n            null\n        }\n    }\n</code></pre> <pre><code>val foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; null\n    }\n\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt;\n            \"bar2\"\n        else -&gt; null\n    }\n</code></pre> <p>Rule id: <code>standard:when-entry-bracing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:when-entry-bracing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_when-entry-bracing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_when-entry-bracing = disabled\n</code></pre></li> </ol>"},{"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 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\n    @Test fun bar() {}\n}\n\n// A class or function parameter may have a single annotation with parameter(s) on the same line\nclass Foo(\n    @Path(\"fooId\") val fooId: String,\n    @NotNull(\"bar\") bar: String,\n)\n\n// Multiple annotations (without parameters) are allowed on the same line\n@Foo @Bar\nclass FooBar {\n    @Foo @Bar\n    var foo: String\n\n    @Foo @Bar\n    fun bar() {}\n}\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\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> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_annotation_handle_annotations_with_parameters_same_as_annotations_without_parameters</code>Handle listed annotations identical to annotations without parameters. Value is a comma separated list of names without the <code>@</code> prefix. Use <code>*</code> for all annotations with parameters. <code>unset</code> <code>unset</code> <code>unset</code> <p>Rule id: <code>standard:annotation</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:annotation\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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\n    if ((leftHandSideExpression &amp;&amp; rightHandSideExpression) ||\n        (\n            leftHandSideLongExpression &amp;&amp;\n                rightHandSideExpression\n        )\n    ) {\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\n    if ((leftHandSideExpression &amp;&amp; rightHandSideExpression) ||\n        (leftHandSideLongExpression &amp;&amp; rightHandSideExpression)\n    ) {\n        // do something\n    }\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:binary-expression-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:binary-expression-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_binary-expression-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_binary-expression-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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 FOO_1 = \"foo1\"\n\nclass FooBar {\n    val foo2 = \"foo2\"\n    val foo3 = \"foo3\"\n\n    fun bar1() {\n        val foo4 = \"foo4\"\n        val foo5 = \"foo5\"\n    }\n\n    fun bar2() = \"bar\"\n\n    val foo6 = \"foo3\"\n    val foo7 = \"foo4\"\n\n    enum class Foo\n}\n</code></pre> <pre><code>const val FOO_1 = \"foo1\"\n\nclass FooBar {\n    val foo2 = \"foo2\"\n    val foo3 = \"foo3\"\n    fun bar1() {\n        val foo4 = \"foo4\"\n        val foo5 = \"foo5\"\n    }\n    fun bar2() = \"bar\"\n    val foo6 = \"foo3\"\n    val foo7 = \"foo4\"\n    enum class Foo\n}\n</code></pre> <p>Rule id: <code>standard:blank-line-before-declaration</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:blank-line-before-declaration\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-before-declaration = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-before-declaration = disabled\n</code></pre></li> </ol> <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/standard/#block-comment-initial-star-alignment","title":"Block comment initial star alignment","text":"<p>Lines in a block comment which (excluding 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>standard:block-comment-initial-star-alignment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:block-comment-initial-star-alignment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_block-comment-initial-star-alignment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_block-comment-initial-star-alignment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#chain-method-continuation","title":"Chain method continuation","text":"<p>In a multiline method chain, the chain operators (<code>.</code> or <code>?.</code>) have to be aligned with each other.</p> <p>Multiple chained methods on a single line are allowed as long as the maximum line length, and the maximum number of chain operators are not exceeded. Under certain conditions, it is allowed that the expression before the first and/or the expression after the last chain operator is a multiline expression.</p> <p>The <code>.</code> in <code>java.class</code> is ignored when wrapping on chain operators.</p> <p>Warning</p> <p>A binary expression for which the left and/or right operand consist of a method chain are currently being ignored by this rule. Please reach out, if you can help to determine what the best strategy is to deal with such kind of expressions.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    listOf(1, 2, 3)\n        .filter { it &gt; 2 }!!\n        .takeIf { it &gt; 2 }\n        .map {\n            it * it\n        }?.map {\n            it * it\n        }\nval foo2 =\n    listOf(1, 2, 3)\n        .filter {\n            it &gt; 2\n        }.map {\n            2 * it\n        }?.map {\n            2 * it\n        }\nval foo3 =\n    foo().bar().map {\n        it.foobar()\n    }\nval foo4 =\n    \"\"\"\n    Some text\n    \"\"\".trimIndent().foo().bar()\n</code></pre> <pre><code>val foo1 =\n    listOf(1, 2, 3).\n        filter { it &gt; 2 }!!.\n        takeIf { it &gt; 2 }.\n        map {\n            it * it\n        }?.\n        map {\n            it * it\n        }\nval foo2 =\n    listOf(1, 2, 3)\n        .filter {\n            it &gt; 2\n        }\n        .map {\n            2 * it\n        }\n        ?.map {\n            2 * it\n        }\nval foo3 = \n    foo()\n    .bar().map {\n        it.foobar()\n    }\nval foo4 =\n    \"\"\"\n    Some text\n    \"\"\".trimIndent().foo()\n        .bar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than</code>Force wrapping of chained methods in case an expression contains at least the specified number of chain operators. If a chained method contains nested expressions, the chain operators of the inner expression are not taken into account. Use value <code>unset</code> (default) to disable this setting. 4 4 4 <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:chain-method-continuation</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:chain-method-continuation\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-method-continuation = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-method-continuation = disabled\n</code></pre></li> </ol> <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/standard/#class-signature","title":"Class signature","text":"<p>Rewrites the class signature to a consistent format respecting the <code>.editorconfig</code> property <code>max_line_length</code> if set. In the <code>ktlint_official</code> code style all class parameters are wrapped by default. Set <code>.editorconfig</code> property <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> to a value greater than 1 to allow classes with a few parameters to be placed on a single line. The other code styles allow an infinite amount of parameters on the same line (as long as the <code>max_line_length</code> is not exceeded) unless <code>.editorconfig</code> property <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> is set explicitly.</p>  Ktlint (ktlint_official) Disallowed (ktlint_official) Ktlint (non ktlint_official) Disallowed (non ktlint_official) <pre><code>// Assume that max_line_length is not exceeded when written as single line\nclass Foo0\n\nclass Foo1(\n    a: Any,\n)\n\nclass Foo2(\n    a: Any,\n    b: Any,\n)\n\nclass Foo3(\n    @Foo a: Any,\n    b: Any,\n    c: Any,\n)\n\nclass Foo4(\n    a: Any,\n    b: Any,\n    c: Any,\n) : FooBar(a, c)\n\nclass Foo5 :\n    FooBar(\n        \"bar1\",\n        \"bar2\",\n    ) {\n    // body\n}\n\nclass Foo6(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n        bar1,\n        bar2,\n    ) {\n    // body\n}\n\nclass Foo7(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n        bar1,\n        bar2,\n    ),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo8\n    constructor(\n        val bar1: Bar,\n        val bar2: Bar,\n    ) : FooBar(bar1, bar2),\n        BarFoo1,\n        BarFoo2 {\n        // body\n    }\n</code></pre> <pre><code>// Assume that max_line_length is not exceeded when written as single line\nclass Foo0()\n\nclass Foo1(a: Any)\n\nclass Foo2(a: Any, b: Any)\n\nclass Foo3(@Foo a: Any, b: Any, c: Any)\n\nclass Foo4(a: Any, b: Any, c: Any) : FooBar(a, c)\n\nclass Foo5 : FooBar(\n    \"bar1\",\n    \"bar2\",\n) {\n    // body\n}\n\nclass Foo6(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n    bar1,\n    bar2,\n) {\n    // body\n}\n\nclass Foo7(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n    bar1,\n    bar2,\n),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo8\nconstructor(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(bar1, bar2),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Foo0\n\n// Entire class signature does not fit on single line\nclass Foo1(\n    aVeryLonggggggggggggggggggggggg: Any\n)\n\n// Entire class signature does fit on single line\nclass Foo2(a: Any)\n\n// Entire class signature does not fit on single line\nclass Foo3(\n    aVeryLonggggggggggggggg: Any,\n    b: Any\n)\n\n// Entire class signature does fit on single line\nclass Foo4(a: Any, b: Any)\n\n// Entire class signature does fit on single line\nclass Foo5(@Foo a: Any, b: Any, c: Any)\n\n// Entire class signature does fit on single line\nclass Foo6(a: Any, b: Any, c: Any) :\n    FooBar(a, c)\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo7 :\n    FooBar(\n        \"bar1\",\n        \"bar2\"\n    ) {\n    // body\n}\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo8(val bar1: Bar, val bar2: Bar) :\n    FooBar(\n        bar1,\n        bar2\n    ) {\n    // body\n}\n\n// Entire class signature (without constructor invocation) does not fit on single line\nclass Foo9(\n    val aVeryLonggggggggggggggg: Bar,\n    val bar2: Bar\n) : FooBar(\n    bar1,\n    bar2\n) {\n    // body\n}\n\nclass Foo10(val bar1: Bar, val bar2: Bar) :\n    FooBar(\n        bar1,\n        bar2\n    ),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo11\nconstructor(\n    val bar1: Bar,\n    val bar2: Bar\n) : FooBar(bar1, bar2),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Foo0()\n\nclass Foo6(a: Any, b: Any, c: Any) : FooBar(a, c)\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo7 : FooBar(\n    \"bar1\",\n    \"bar2\",\n) {\n    // body\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code>Force wrapping of the parameters of the class signature in case it contains at least the specified number of parameters, even in case the entire class signature would fit on a single line. Use value <code>unset</code> to disable this setting. 1 <code>unset</code> <code>unset</code> <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:class-signature</code></p> <p>Warn</p> <p>For code styles <code>android_studio</code> and <code>intellij_idea</code> this rule rewrites multiline class signature to a single line class signature in case the entire class signature fits on a single line by default. In case you want to leave it to the discretion of the developer to decider whether a single or a multiline class signature is used, please suppress or disable this rule.</p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:class-signature\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-signature = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-signature = disabled\n</code></pre></li> </ol>"},{"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 {\n    FOO,\n    Foo,\n    FOO_BAR,\n    FooBar,\n}\n</code></pre> <pre><code>enum class Bar {\n    foo,\n    bAr,\n    Foo_Bar,\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_enum_entry_name_casing</code>Choose any of <code>upper_cases</code> (an enum entry may only contain uppercases, and underscores, and digits, and diacritics on letters and strokes), <code>camel_cases</code> (an enum entry may only contain CamelCase values, including digits, and diacritics on letters and strokes), or <code>upper_or_camel_case</code> (allows mixing of uppercase and CamelCase entries as per Kotlin Coding Conventions). <code>upper_or_camel_cases</code> <code>upper_or_camel_cases</code> <code>upper_or_camel_cases</code> <p>Rule id: <code>standard:enum-entry-name-case</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:enum-entry-name-case\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-entry-name-case = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-entry-name-case = disabled\n</code></pre></li> </ol>"},{"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>standard:filename</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:filename\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_filename = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_filename = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#final-newline","title":"Final newline","text":"<p>Ensures consistent usage of a newline at the end of each file.</p> Configuration setting ktlint_official intellij_idea android_studio <code>insert_final_newline</code> <code>true</code> <code>true</code> <code>true</code> <p>Rule id: <code>standard:final-newline</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:final-newline\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_final-newline = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_final-newline = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-expression-body","title":"Function expression body","text":"<p>Rewrites a function body only containing a <code>return</code> or <code>throw</code> expression to an expression body.</p> <p>Note</p> <p>If the function body contains a comment, it is not rewritten to an expression body.</p>  Ktlint Disallowed <pre><code>fun foo1() = \"foo\"\n\nfun foo2(): String = \"foo\"\n\nfun foo3(): Unit = throw IllegalArgumentException(\"some message\")\n\nfun foo4(): Foo = throw IllegalArgumentException(\"some message\")\n\nfun foo5() {\n    return \"foo\" // some comment\n}\n\nfun foo6(): String {\n    /* some comment */\n    return \"foo\"\n}\n\nfun foo7() {\n    throw IllegalArgumentException(\"some message\")\n    /* some comment */\n}\n\nfun foo8(): Foo {\n    throw IllegalArgumentException(\"some message\")\n    // some comment\n}\n</code></pre> <pre><code>fun foo1() {\n    return \"foo\"\n}\n\nfun foo2(): String {\n    return \"foo\"\n}\n\nfun foo3() {\n    throw IllegalArgumentException(\"some message\")\n}\n\nfun foo4(): Foo {\n    throw IllegalArgumentException(\"some message\")\n}\n</code></pre> <p>Rule id: <code>standard:function-expression-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-expression-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-expression-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-expression-body = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-literal","title":"Function literal","text":"<p>Enforces the parameters of a function literal and the arrow to be written on the same line as the opening brace if the maximum line length is not exceeded. In case the parameters are wrapped to multiple lines then this is respected.</p> <p>If the function literal contains multiple parameters and at least one parameter other than the first parameter starts on a new line than all parameters and the arrow are wrapped to separate lines.</p>  Ktlint (ktlint_official) Ktlint (non ktlint_official) Disallowed <pre><code>val foobar1 = { foo + bar }\nval foobar2 =\n    {\n        foo + bar\n    }\nval foobar3 =\n    { foo: Foo -&gt;\n        foo.repeat(2)\n    }\nval foobar4 =\n    { foo: Foo, bar: Bar -&gt;\n        foo + bar\n    }\nval foobar5 = { foo: Foo, bar: Bar -&gt; foo + bar }\nval foobar6 =\n    {\n        foo: Foo,\n        bar: Bar,\n        -&gt;\n        foo + bar\n    }\n\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { \n        fooooooooooooooo: Foo\n        -&gt;\n        foo.repeat(2)\n    }\n</code></pre> <pre><code>val foobar6 =\n    {\n            foo: Foo,\n            bar: Bar,\n        -&gt;\n        foo + bar\n    }\n\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { \n            fooooooooooooooo: Foo\n        -&gt;\n        foo.repeat(2)\n    }\n</code></pre> <pre><code>val foobar3 =\n    {\n        foo: Foo -&gt;\n        foo.repeat(2)\n    }\nval foobar6 =\n    { foo: Foo,\n      bar: Bar -&gt;\n        foo + bar\n    }\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { fooooooooooooooo: Foo -&gt;\n        foo.repeat(2)\n    }\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-literal</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-literal\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-literal = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-literal = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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.</p> <p>Note</p> <p>Wrapping of parameters is also influenced by the <code>parameter-list-wrapping</code> rule.</p>  Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nfun foooooooo(\n    a: Any,\n    b: Any,\n    c: Any,\n): String {\n    // body\n}\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\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\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\n// Assume that the last allowed character is\n// at the X character on the right           X\nfun bar(\n    a: Any,\n    b: Any,\n    c: Any\n): String {\n    // body\n}\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\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> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_function_signature_body_expression_wrapping</code>Determines how to wrap the body of function in case it is an expression. Use <code>default</code> to wrap the body expression only when the first line of the expression does not fit on the same line as the function signature. Use <code>multiline</code> to force wrapping of body expressions that consists of multiple lines. Use <code>always</code> to force wrapping of body expression always. <code>multiline</code> <code>default</code> <code>default</code> <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. 2 <code>unset</code> <code>unset</code>  default multiline always <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is 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<pre><code>// Given that the function signature has to be written as a single line\n// function signature and that the function has a multiline body expression\nfun someFunction(a: Any, b: Any): String = \"some-result\"\n    .uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun someFunction(\n    a: Any,\n    b: Any\n): String = \"some-result\"\n    .uppercase()\n</code></pre> <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is 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 that the function signature has to be written as a single line\n// function signature and that the function has a single line body expression\n// that fits on the same line as the function signature.\nfun someFunction(a: Any, b: Any): String = \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a single line body expression\n// that fits on the same line as the function signature.\nfun someFunction(\n    a: Any,\n    b: Any\n): String = \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a single line\n// function signature and that the function has a multiline body expression\nfun someFunction(a: Any, b: Any): String =\n    \"some-result\"\n         .uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun someFunction(\n    a: Any,\n    b: Any\n): String =\n    \"some-result\"\n       .uppercase()\n</code></pre> <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is  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>// Given that the function signature has to be written as a single line\n// function signature and that the function has a single line body expression\nfun someFunction(a: Any, b: Any): String =\n    \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun functionWithAVeryLongName(\n    a: Any,\n    b: Any\n): String =\n    \"some-result\"\n        .uppercase()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-signature</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-signature\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-signature = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-signature = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-type-modifier-spacing","title":"Function type modifier spacing","text":"<p>Enforce a single whitespace between the modifier list and the function type.</p>  Ktlint Disallowed <pre><code>val foo: suspend () -&gt; Unit = {}\n\nsuspend fun bar(baz: suspend () -&gt; Unit) = baz()\n</code></pre> <pre><code>val foo: suspend() -&gt; Unit = {}\n\nsuspend fun bar(baz: suspend   () -&gt; Unit) = baz()\n</code></pre> <p>Rule id: <code>standard:function-type-modifier-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-type-modifier-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-modifier-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-modifier-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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) {\n    if (value &gt; 0) {\n        doSomething()\n    } else if (value &lt; 0) {\n        doSomethingElse()\n    } else {\n        doSomethingElse2()\n    }\n}\n</code></pre> <pre><code>fun foo(value: Int) {\n    if (value &gt; 0)\n        doSomething()\n    else if (value &lt; 0) {\n        doSomethingElse()\n    } else\n        doSomethingElse2()\n}\n</code></pre> <p>Rule id: <code>standard:if-else-bracing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:if-else-bracing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-bracing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-bracing = disabled\n</code></pre></li> </ol> <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/standard/#import-ordering","title":"Import ordering","text":"<p>Ensures that imports are ordered consistently.</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> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_imports_layout</code>Defines imports order layout for Kotlin files. For more details see below table. ,java.,javax.,kotlin.*,^ &lt;1&gt; ,java.,javax.,kotlin.*,^ &lt;1&gt; * &lt;2&gt;"},{"location":"rules/standard/#ij_kotlin_packages_to_use_import_on_demand","title":"ij_kotlin_packages_to_use_import_on_demand","text":"<p>This property holds 0 or more import paths. The import path can be a full path, e.g. \"java.util.List.\" as well as wildcard path, e.g. \"kotlin.*\".</p> <p>Imports can be grouped by composing the layout with symbols below:</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>Imports in the same group are sorted alphabetical with capital letters before lower case letters (e.g. Z before a).</p> <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> <p>Rule id: <code>standard:import-ordering</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:import-ordering\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_import-ordering = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_import-ordering = disabled\n</code></pre></li> </ol>"},{"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() {\n    foobar(\n        a,\n        b,\n        c,\n    )\n}\n</code></pre> <pre><code>fun main() {\n    foobar(\n          a,\n          b,\n          c,\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> Configuration setting ktlint_official intellij_idea android_studio <code>indent_size</code>The size of an indentation level when <code>indent_style</code> is set to <code>space</code>. Use value <code>unset</code> to ignore indentation. 4 4 4 <code>indent_style</code>Style of indentation. Set this value to <code>space</code> or <code>tab</code>. <code>space</code> <code>space</code> <code>space</code> <code>ij_kotlin_indent_before_arrow_on_new_line</code>Indent the arrow in a when-entry if the arrow starts on a new line. Set this value to <code>true</code> or <code>false</code>. Starting from IDEA version <code>2024.2</code> or above this value needs to be set to <code>true</code> to maintain compatibility with IDEA formatting. <code>false</code> <code>false</code> <code>false</code> <p>Rule id: <code>standard:indent</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:indent\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_indent = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_indent = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#naming","title":"Naming","text":""},{"location":"rules/standard/#backing-property-naming","title":"Backing property naming","text":"<p>Allows property names to start with <code>_</code> in case the property is a backing property. <code>ktlint_official</code> and <code>android_studio</code> code styles require the correlated property/function to be defined as <code>public</code>.</p>  Ktlint Disallowed <pre><code>class Bar {\n    // Backing property as normal class member\n    private val _elementList = mutableListOf&lt;Element&gt;()\n    val elementList: List&lt;Element&gt;\n        get() = _elementList\n\n    // Backing property defined in companion object\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n\n    companion object {\n        private val _elementList2 = mutableListOf&lt;Element&gt;()\n    }\n}\n</code></pre> <pre><code>class Bar {\n    // Incomplete backing property as public property 'elementList1' is missing\n    private val _elementList1 = mutableListOf&lt;Element&gt;()\n\n    // Invalid backing property as '_elementList2' is not a private property\n    val _elementList2 = mutableListOf&lt;Element&gt;()\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n}\n</code></pre> <p>Rule id: <code>standard:backing-property-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:backing-property-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_backing-property-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_backing-property-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#class-naming","title":"Class naming","text":"<p>Enforce naming of class and objects.</p>  Ktlint Ktlint JUnit Test Disallowed <pre><code>class Foo\n\nclass Foo1\n\nclass `class` // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>@Nested\ninner class `Some descriptive class name` {\n    @Test\n    fun `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>standard:class-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:class-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-naming","title":"Function naming","text":"<p>Enforce naming of function.</p>  Ktlint Ktlint Test Disallowed <pre><code>fun foo() {}\n\nfun fooBar() {}\n\nfun `fun`() {} // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>@Test\nfun `Some name`() {}\n\n@Test\nfun do_something() {}\n</code></pre> <pre><code>fun Foo() {}\nfun Foo_Bar() {}\nfun `Some name`() {}\nfun do_something() {}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_function_naming_ignore_when_annotated_with</code>Ignore functions that are annotated with values in this setting. This value is a comma separated list of names without the '@' prefix. <code>unset</code> <code>unset</code> <code>unset</code> <p>Note</p> <p>When using Compose, you might want to configure the <code>function-naming</code> rule with <code>.editorconfig</code> property <code>ktlint_function_naming_ignore_when_annotated_with=Composable</code>. Furthermore, you can use a dedicated ktlint ruleset like Compose Rules for checking naming conventions for Composable functions. </p> <p>Note</p> <p>Functions in files which import a class from package <code>io.kotest</code>, <code>junit.framework</code>, <code>kotlin.test</code>, <code>org.junit</code>, or <code>org.testng</code> are considered to be test functions. Functions in such classes are allowed to have underscores in the name. Also, function names enclosed between backticks 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>standard:function-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-naming = disabled\n</code></pre></li> </ol>"},{"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>standard:package-name</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:package-name\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_package-name = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_package-name = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#property-naming","title":"Property naming","text":"<p>Enforce naming of property.</p> <p>Note</p> <p>This rule can not reliably detect all situations in which incorrect property naming is used. So it only detects in which it is certain that naming is incorrect.</p>  Ktlint Disallowed <pre><code>val foo1 = Foo() // In case developers want to tell that Foo is mutable\nval FOO1 = Foo() // In case developers want to tell that Foo is deeply immutable\n\nconst val FOO_BAR = \"FOO-BAR\" // By definition deeply immutable\n\nvar foo2: Foo = Foo() // By definition not immutable\n\nclass Bar {\n    val foo1 = \"foo1\" // Class properties always start with lowercase, const is not allowed\n\n    const val FOO_BAR = \"FOO-BAR\" // By definition deeply immutable\n\n    var foo2: Foo = Foo() // By definition not immutable\n\n    // Backing property\n    private val _elementList = mutableListOf&lt;Element&gt;()\n    val elementList: List&lt;Element&gt;\n        get() = _elementList\n\n    companion object {\n        val foo1 = Foo() // In case developer want to communicate that Foo is mutable\n        val FOO1 = Foo() // In case developer want to communicate that Foo is deeply immutable\n    }\n}\n\nvar `package` = \"foo\" // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>const val fooBar = \"FOO-BAR\" // By definition deeply immutable\n\nvar FOO2: Foo = Foo() // By definition not immutable\n\nclass Bar {\n    val FOO_BAR = \"FOO-BAR\" // Class properties always start with lowercase, const is not allowed\n\n    // Incomplete backing property as public property 'elementList1' is missing\n    private val _elementList1 = mutableListOf&lt;Element&gt;()\n\n    // Invalid backing property as '_elementList2' is not a private property\n    val _elementList2 = mutableListOf&lt;Element&gt;()\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n}\n</code></pre> <p>This rule is suppressed whenever the IntelliJ IDEA inspection suppression <code>PropertyName</code>, <code>ConstPropertyName</code>, <code>ObjectPropertyName</code> or <code>PrivatePropertyName</code> is used.</p> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_property_naming_constant_naming</code>The naming style ('screaming_snake_case', or 'pascal_case') to be applied on constant properties. <code>screaming_snake_case</code> <code>screaming_snake_case</code> <code>screaming_snake_case</code> <p>Note</p> <p>When using Compose, you might want to configure the <code>ktlint_property_naming_constant_naming-naming</code> rule with <code>.editorconfig</code> property <code>ktlint_property_naming_constant_naming = pascal_case</code>.</p> <p>Rule id: <code>standard:property-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:property-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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 :\n    Foo,\n    Bar {\n    // body\n}\n</code></pre> <pre><code>class FooBar :\n\n    Foo,\n\n    Bar\n\n{\n    // body\n}\n</code></pre> <p>Type argument list</p>  Ktlint Disallowed <pre><code>val foobar: FooBar&lt;\n    Foo,\n    Bar,\n    &gt; = FooBar(Foo(), Bar())\n</code></pre> <pre><code>val foobar: FooBar&lt;\n\n    Foo,\n\n    Bar,\n\n    &gt; = FooBar(Foo(), Bar())\n</code></pre> <p>Type constraint list</p>  Ktlint Disallowed <pre><code>class BiAdapter&lt;C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2&gt;(\n    val adapter1: A1,\n    val adapter2: A2,\n) : RecyclerView.Adapter&lt;C&gt;()\n    where A1 : RecyclerView.Adapter&lt;V1&gt;, A1 : ComposableAdapter.ViewTypeProvider,\n          A2 : RecyclerView.Adapter&lt;V2&gt;, A2 : ComposableAdapter.ViewTypeProvider {\n    // body\n}\n</code></pre> <pre><code>class BiAdapter&lt;C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2&gt;(\n    val adapter1: A1,\n    val adapter2: A2\n) : RecyclerView.Adapter&lt;C&gt;()\n    where\n          A1 : RecyclerView.Adapter&lt;V1&gt;, A1 : ComposableAdapter.ViewTypeProvider,\n\n          A2 : RecyclerView.Adapter&lt;V2&gt;, A2 : ComposableAdapter.ViewTypeProvider\n{\n    // body\n}\n</code></pre> <p>Type parameter list</p>  Ktlint Disallowed <pre><code>fun &lt;\n    Foo,\n    Bar,\n    &gt; foobar()\n</code></pre> <pre><code>fun &lt;\n\n    Foo,\n\n    Bar,\n\n    &gt; foobar()\n</code></pre> <p>Value argument list</p>  Ktlint Disallowed <pre><code>val foobar =\n    foobar(\n        \"foo\",\n        \"bar\",\n    )\n</code></pre> <pre><code>val foobar = \n    foobar(\n\n      \"foo\",\n\n      \"bar\",\n\n  )\n</code></pre> <p>Value parameter list</p>  Ktlint Disallowed <pre><code>fun foobar(\n    foo: String,\n    bar: String,\n)\n</code></pre> <pre><code>fun foobar(\n\n    foo: String,\n\n    bar: String,\n\n)\n</code></pre> <p>Rule id: <code>standard:no-blank-line-in-list</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-line-in-list\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-in-list = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-in-list = disabled\n</code></pre></li> </ol> <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/standard/#no-consecutive-comments","title":"No consecutive comments","text":"<p>Consecutive comments are disallowed in following cases:</p> <ul> <li> <p>Any mix of a consecutive kdoc, a block comment or an EOL comment unless separated by a blank line in between</p> </li> <li> <p>Consecutive KDocs (even when separated by a blank line)</p> </li> <li> <p>Consecutive block comments (even when separated by a blank line)</p> </li> </ul> <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\n// Different comment types (including KDoc) may be consecutive ..\n\n/*\n * ... but do need to be separated by a blank line ...\n */\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\n/**\n  * A KDoc can not be followed by a block comment or an EOL comment or another KDOC\n  */\n\n// ... even not when separated by a new line.\n</code></pre> <p>Rule id: <code>standard:no-consecutive-comments</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-consecutive-comments\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-comments = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-comments = disabled\n</code></pre></li> </ol> <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/standard/#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>standard:no-empty-file</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-file\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-file = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-file = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-empty-first-line-at-start-in-class-body","title":"No empty first line at start in class body","text":"<p>Detect blank lines at the start of a class body.</p>  Ktlint Disallowed <pre><code>class Foo {\n    val foo = \"foo\"\n}\n</code></pre> <pre><code>class Foo {\n\n    val foo = \"foo\"\n}\n</code></pre> <p>Rule id: <code>standard:no-empty-first-line-in-class-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-first-line-in-class-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-class-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-class-body = disabled\n</code></pre></li> </ol> <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/standard/#no-single-line-block-comment","title":"No single line block comment","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>standard:no-single-line-block-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-single-line-block-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-single-line-block-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-single-line-block-comment = disabled\n</code></pre></li> </ol>"},{"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\")\n\nclass FooBar {\n    @Suppress(\"ktlint:standard:max-line-length\")\n    val foo = \"some longggggggggggggggggggg text\"\n\n    fun bar() =\n        @Suppress(\"ktlint:standard:no-multi-spaces\")\n        listOf(\n            \"1   One\", \n            \"10  Ten\", \n            \"100 Hundred\", \n        )\n}\n</code></pre> <pre><code>/* ktlint-disable standard:no-wildcard-imports */\n\nclass FooBar {\n    val foo = \"some longggggggggggggggggggg text\" // ktlint-disable standard:max-line-length\n\n    fun bar() =\n        listOf(\n            /* ktlint-disable standard:no-multi-spaces */\n            \"1   One\", \n            \"10  Ten\", \n            \"100 Hundred\", \n            /* ktlint-enable standard:no-multi-spaces */\n        )\n}\n</code></pre> <p>Rule id: <code>standard:ktlint-suppression</code></p> <p>Note</p> <p>This rule cannot be suppressed via <code>@Suppress</code> or 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 maximum length of a line as specified in <code>.editorconfig</code> property <code>max_line_length</code>.</p> <p>This rule does not apply in a number of situations. 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\n\nval foo1 =\n    \"\"\"\n    fooooooooooooooooooooooooooooooooooooooooo\n    \"\"\"\n\nval foo2 =\n    \"fooooooooooooooooooooooooooooooooooooooo\"\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 foo = \"foo\" + \"ooooooooooooooooooooooooooo\"\nval foooooooooooooo = \"foooooooooooooooooooo\" // some comment\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_ignore_back_ticked_identifier</code>Defines whether the backticked identifier (``) should be ignored. <code>false</code> <code>false</code> <code>false</code> <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:max-line-length</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:max-line-length\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_max-line-length = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_max-line-length = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#modifier-order","title":"Modifier order","text":"<p>Requires consistent order of modifiers.</p>  Ktlint Disallowed <pre><code>abstract class A {\n    protected open val v = \"\"\n\n    internal open suspend fun f(v: Any): Any = \"\"\n\n    protected lateinit var lv: String\n}\n</code></pre> <pre><code>abstract class A {\n    open protected val v = \"\"\n\n    open suspend internal fun f(v: Any): Any = \"\"\n\n    lateinit protected var lv: String\n}\n</code></pre> <p>Rule id: <code>standard:modifier-order</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:modifier-order\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-order = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-order = disabled\n</code></pre></li> </ol>"},{"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 =\n    if (true) {\n        return 0\n    } else {\n        return 1\n    }\n</code></pre> <pre><code>val foo =\n    if (true)\n        return 0\n    else\n        return 1\n</code></pre> <p>Rule id: <code>standard:multiline-if-else</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-if-else\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-if-else = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-if-else = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#multiline-loop","title":"Multiline loop","text":"<p>Braces required for multiline for, while, and do statements.</p>  Ktlint Disallowed <pre><code>for (i in 1..10) {\n    println(i)\n}\n</code></pre> <pre><code>for (i in 1..10)\n    println(i)\n</code></pre> <p>Rule id: <code>standard:multiline-loop</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-loop\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-loop = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-loop = disabled\n</code></pre></li> </ol>"},{"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() {\n    fun a() {\n    }\n\n    fun b()\n}\n</code></pre> <pre><code>fun main() {\n    fun a() {\n\n    }\n    fun b()\n\n}\n</code></pre> <p>Rule id: <code>standard:no-blank-line-before-rbrace</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-line-before-rbrace\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-before-rbrace = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-before-rbrace = disabled\n</code></pre></li> </ol>"},{"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) {\n    inputText\n        .lowercase(Locale.getDefault())\n}\n</code></pre> <pre><code>fun foo(inputText: String) {\n    inputText\n\n        .lowercase(Locale.getDefault())\n}\n</code></pre> <p>Rule id: <code>standard:no-blank-lines-in-chained-method-calls</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-lines-in-chained-method-calls\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-lines-in-chained-method-calls = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-lines-in-chained-method-calls = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-consecutive-blank-lines","title":"No consecutive blank lines","text":"Ktlint Disallowed <pre><code>package com.test\n\nimport com.test.util\n\nval a = \"a\"\n\nfun b() {\n}\n\nfun c()\n</code></pre> <pre><code>package com.test\n\n\nimport com.test.util\n\n\nval a = \"a\"\n\n\nfun b() {\n}\n\n\nfun c()\n</code></pre> <p>Rule id: <code>standard:no-consecutive-blank-lines</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-consecutive-blank-lines\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-blank-lines = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-blank-lines = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-empty-class-bodies","title":"No empty (<code>{}</code>) class bodies","text":"Ktlint Disallowed <pre><code>class C\n\ndata class DC(val v: Any)\n\ninterface I\n\nobject O\n</code></pre> <pre><code>class C {}\n\ndata class DC(val v: Any) { }\n\ninterface I {\n}\n\nobject O{}\n</code></pre> <p>Rule id: <code>standard:no-empty-class-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-class-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-class-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-class-body = disabled\n</code></pre></li> </ol>"},{"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() {\n   val a = 2\n}\n</code></pre> <pre><code>fun bar() {\n\n   val a = 2\n}\n</code></pre> <p>Rule id: <code>standard:no-empty-first-line-in-method-block</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-first-line-in-method-block\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-method-block = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-method-block = disabled\n</code></pre></li> </ol>"},{"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() {\n    if (conditionA()) {\n        doSomething()\n    } else if (conditionB()) {\n        doAnotherThing()\n    }\n}\n</code></pre> <pre><code>fun funA() {\n    if (conditionA()) {\n        doSomething()\n    } else\n    if (conditionB()) {\n        doAnotherThing()\n    }\n}\n</code></pre> <p>Rule id: <code>standard:no-line-break-after-else</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-line-break-after-else\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-after-else = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-after-else = disabled\n</code></pre></li> </ol>"},{"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>standard:no-line-break-before-assignment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-line-break-before-assignment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-before-assignment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-before-assignment = disabled\n</code></pre></li> </ol>"},{"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() {\n    x(1, 3)\n}\n</code></pre> <pre><code>fun  main()  {\n    x(1,  3)\n}\n</code></pre> <p>Rule id: <code>standard:no-multi-spaces</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-multi-spaces\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-multi-spaces = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-multi-spaces = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-semicolons","title":"No semicolons","text":"<p>Avoid using unnecessary semicolons.</p>  Ktlint Disallowed <pre><code>fun foo() {\n    bar()\n\n    bar()\n}\n</code></pre> <pre><code>fun foo() {\n    ;\n    bar()\n    ;\n\n    bar()\n\n    ;\n}\n</code></pre> <p>Rule id: <code>standard:no-semi</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-semi\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-semi = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-semi = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-trailing-whitespaces","title":"No trailing whitespaces","text":"<p>Rule id: <code>standard:no-trailing-spaces</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-trailing-spaces\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-trailing-spaces = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-trailing-spaces = disabled\n</code></pre></li> </ol>"},{"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.</p>  Ktlint Disallowed <pre><code>fun fn() {}\n</code></pre> <pre><code>fun fn(): Unit {}\n</code></pre> <p>Rule id: <code>standard:no-unit-return</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-unit-return\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unit-return = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unit-return = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-unused-imports","title":"No unused imports","text":"<p>Important</p> <p>Starting from KtLint <code>1.7.0</code> this rule no longer runs by default. In some cases the rule marks imports as unused, while after removal of the import the code no longer compiles. This rule will be removed in KtLint <code>2.0</code>. See issue for more background.  If you insist on running the rule despite its shortcomings, you need to enable the rule in the <code>.editorconfig</code> by adding: <pre><code>ktlint_standard_no-unused-imports = enabled\n</code></pre></p> <p>Rule id: <code>standard:no-unused-imports</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-unused-imports\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unused-imports = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unused-imports = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-wildcard-imports","title":"No wildcard imports","text":"<p>No wildcard imports except whitelisted imports.</p>  Ktlint Disallowed <pre><code>import foobar.Bar\nimport foobar.Foo\n</code></pre> <pre><code>import foobar.*\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_packages_to_use_import_on_demand</code>Defines allowed wildcard imports as a comma separated list. - <code>java.util.*,</code><code>kotlinx.android.synthetic.**</code> <code>java.util.*,</code><code>kotlinx.android.synthetic.**</code> <p>Warning</p> <p>In case property <code>ij_kotlin_packages_to_use_import_on_demand</code> is not explicitly set, Intellij IDEA allows wildcards imports like <code>java.util.*</code> which lead to conflicts with the <code>no-wildcard-imports</code> rule. See Intellij IDEA configuration to prevent such conflicts.</p> <p>Rule id: <code>standard:no-wildcard-imports</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-wildcard-imports\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-wildcard-imports = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-wildcard-imports = disabled\n</code></pre></li> </ol>"},{"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&lt;Int, String&gt; = mapOf()\nval b: Map&lt;Int, String&gt; = mapOf()\nval c: Map&lt;Int, String&gt; = mapOf()\n</code></pre> <pre><code>val a: Map&lt; Int, String&gt; = mapOf()\nval b: Map&lt;Int, String &gt; = mapOf()\nval c: Map &lt;Int, String&gt; = mapOf()\n</code></pre> <p>Rule id: <code>standard:spacing-around-angle-brackets</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-around-angle-brackets\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-around-angle-brackets = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-around-angle-brackets = disabled\n</code></pre></li> </ol>"},{"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/**\n * block comment\n */\n@Foo @Bar\nclass FooBar {\n}\n</code></pre> <pre><code>@JvmField\n\nfun foo() {}\n\n@Foo @Bar\n/**\n * block comment\n */\nclass FooBar {\n}\n</code></pre> <p>Rule id: <code>standard:annotation-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:annotation-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation-spacing = disabled\n</code></pre></li> </ol>"},{"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\n@Bar\nfun b()\n</code></pre> <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <p>Rule id: <code>standard:spacing-between-declarations-with-annotations</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-declarations-with-annotations\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-annotations = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-annotations = disabled\n</code></pre></li> </ol>"},{"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/*\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>standard:spacing-between-declarations-with-comments</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-declarations-with-comments\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-comments = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-comments = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#colon-spacing","title":"Colon spacing","text":"<p>Consistent spacing around colon.</p>  Ktlint Disallowed <pre><code>class A : B\n\nclass A2 : B2\n</code></pre> <pre><code>class A:B\n\nclass A2  :  B2\n</code></pre> <p>Rule id: <code>standard:colon-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:colon-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_colon-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_colon-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:comma-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comma-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comma-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comma-spacing = disabled\n</code></pre></li> </ol>"},{"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\n\nfun main() {\n    System.out.println(\n        // comment\n        \"test\",\n    )\n} // comment\n</code></pre> <pre><code>//comment\nvar debugging = false// comment\nvar debugging = false //comment\nvar debugging = false//comment\n\nfun main() {\n    System.out.println(\n         //123\n        \"test\"\n    )\n}//comment\n</code></pre> <p>Rule id: <code>standard:comment-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comment-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#curly-spacing","title":"Curly spacing","text":"<p>Consistent spacing around curly braces.</p>  Ktlint Disallowed <pre><code>val foo = bar { foo() }\n</code></pre> <pre><code>val foo = bar{foo()}\n</code></pre> <p>Rule id: <code>standard:curly-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:curly-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_curly-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_curly-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:dot-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:dot-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_dot-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_dot-spacing = disabled\n</code></pre></li> </ol>"},{"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::\n    class\n</code></pre> <p>Rule id: <code>standard:double-colon-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:double-colon-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_double-colon-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_double-colon-spacing = disabled\n</code></pre></li> </ol>"},{"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\"\n\nfun foo2():  String = \"some-result\"\n\nfun foo3():String = \"some-result\"\n\nfun foo4():\n    String = \"some-result\"\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-return-type-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-return-type-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-return-type-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-return-type-spacing = disabled\n</code></pre></li> </ol>"},{"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>// In case `ktlint_function_signature_body_expression_wrapping` is set to `default` or `multiline`\nfun foo1() = \"some-result\"\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `always`\nfun foo2() =\n    \"some-result\"\n\nfun foo3() {\n    // do something\n}\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `default` or `multiline`\nfun bar1(): String = \"some-result\"\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `always`\nfun bar2(): String =\n    \"some-result\"\n\nfun bar3(): String {\n    doSomething()\n    return \"some-result\"\n}\n</code></pre> <pre><code>fun foo1()= \"some-result\"\n\nfun foo2()\n    = \"some-result\"\n\nfun foo3()\n{\n    // do something\n}\n\nfun bar1(): String= \"some-result\"\n\nfun bar2(): String\n    = \"some-result\"\n\nfun bar3(): String\n{\n    return \"some-result\"\n}\n</code></pre> <p>Rule id: <code>standard:function-start-of-body-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-start-of-body-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-start-of-body-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-start-of-body-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:function-type-reference-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-type-reference-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-reference-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-reference-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:fun-keyword-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:fun-keyword-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_fun-keyword-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_fun-keyword-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:kdoc-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:kdoc-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#keyword-spacing","title":"Keyword spacing","text":"<p>Requires consistent spacing around keywords.</p>  Ktlint Disallowed <pre><code>fun main() {\n    if (true) {\n        doSomething()\n    }\n}\n</code></pre> <pre><code>fun main() {\n    if(true) {\n        doSomething()\n    }\n}\n</code></pre> <p>Rule id: <code>standard:keyword-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:keyword-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_keyword-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_keyword-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#modifier-list-spacing","title":"Modifier list spacing","text":"<p>Requires consistent spacing between modifiers in and after the last modifier in a modifier list.</p>  Ktlint Disallowed <pre><code>abstract class Foo {\n    protected abstract suspend fun execute()\n}\n</code></pre> <pre><code>abstract  class Foo {\n    protected  abstract  suspend  fun execute()\n}\nabstract\nclass Foo {\n    protected\n    abstract\n    suspend\n    fun execute()\n}\n</code></pre> <p>Rule id: <code>standard:modifier-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:modifier-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#nullable-type-spacing","title":"Nullable type spacing","text":"<p>Disallows spaces in a nullable type.</p>  Ktlint Disallowed <pre><code>val foo: String? = null\nval foo: List&lt;String?&gt; = listOf(null)\n</code></pre> <pre><code>val foo: String ? = null\nval foo: List&lt;String ?&gt; = listOf(null)\n</code></pre> <p>Rule id: <code>standard:nullable-type-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:nullable-type-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_nullable-type-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_nullable-type-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#operator-spacing","title":"Operator spacing","text":"<p>Requires 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>standard:op-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:op-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_op-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_op-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#parameter-list-spacing","title":"Parameter list spacing","text":"<p>Requires consistent spacing inside the parameter list.</p>  Ktlint Disallowed <pre><code>fun foo(a: Any) = \"some-result\"\n\nfun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo( a : Any ) = \"some-result\"\nfun foo(\n) = \"some-result\"\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:parameter-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#parenthesis-spacing","title":"Parenthesis spacing","text":"<p>Requires consistent spacing around parenthesis.</p>  Ktlint Disallowed <pre><code>class Foo : Bar {\n    constructor(string: String) : super()\n}\n\nval foo1 = ((1 + 2) / 3)\n</code></pre> <pre><code>class Foo : Bar {\n    constructor(string: String) : super ()\n}\n\nval foo1 = ( (1 + 2 ) / 3)\n</code></pre> <p>Rule id: <code>standard:paren-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:paren-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_paren-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_paren-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#range-spacing","title":"Range spacing","text":"<p>Requires 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>standard:range-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:range-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_range-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_range-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#spacing-between-function-name-and-opening-parenthesis","title":"Spacing between function name and opening parenthesis","text":"<p>Requires 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>standard:spacing-between-function-name-and-opening-parenthesis</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-function-name-and-opening-parenthesis\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-function-name-and-opening-parenthesis = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-function-name-and-opening-parenthesis = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#try-catch-finally-spacing","title":"Try catch finally spacing","text":"<p>Enforces consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p>  Ktlint Disallowed <pre><code>fun foo() =\n    try {\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() = \n    try {\n        // do something\n    }\n    catch (exception: Exception) {\n        // handle exception\n    }\n    finally {\n        // clean up\n    }\n</code></pre> <p>Rule id: <code>standard:try-catch-finally-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:try-catch-finally-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_try-catch-finally-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_try-catch-finally-spacing = disabled\n</code></pre></li> </ol> <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/standard/#type-argument-list-spacing","title":"Type argument list spacing","text":"<p>Disallows spacing before and after the angle brackets of a type argument list.</p>  Ktlint Disallowed <pre><code>val res = ArrayList&lt;LintError&gt;()\n\nclass B&lt;T&gt; : A&lt;T&gt;() {\n    override fun x() = super&lt;A&gt;.x()\n}\n</code></pre> <pre><code>val res = ArrayList &lt; LintError &gt; ()\n\nclass B&lt;T&gt; : A&lt; T &gt;() {\n    override fun x() = super&lt; A &gt;.x()\n}\n</code></pre> <p>Rule id: <code>standard:type-argument-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-argument-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-parameter-list-spacing","title":"Type parameter list spacing","text":"<p>Disallows spacing after a type parameter list in function and class declarations.</p>  Ktlint Disallowed <pre><code>fun &lt;T&gt; foo1(t: T) = \"some-result\"\n\nfun &lt;T&gt; foo2(t: T) = \"some-result\"\n\nfun &lt;T&gt; foo3(t: T) = \"some-result\"\n</code></pre> <pre><code>fun&lt;T&gt; foo1(t: T) = \"some-result\"\n\nfun &lt;T&gt;foo2(t: T) = \"some-result\"\n\nfun&lt;T&gt;foo3(t: T) = \"some-result\"\n</code></pre> <p>Rule id: <code>standard:type-parameter-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-parameter-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#unary-operator-spacing","title":"Unary operator spacing","text":"<p>Disallows spaces around unary operators.</p>  Ktlint Disallowed <pre><code>fun foo1(i: Int) = i++\n\nfun foo2(i: Int) = ++i\n\nfun foo3(i: Int) = ++i\n</code></pre> <pre><code>fun foo1(i: Int) = i ++\n\nfun foo2(i: Int) = ++ i\n\nfun foo3(i: Int) = ++\n    i\n</code></pre> <p>Rule id: <code>standard:unary-op-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:unary-op-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unary-op-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unary-op-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#string-template","title":"String template","text":"<p>Enforces 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>standard:string-template</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:string-template\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#string-template-indent","title":"String template indent","text":"<p>Enforces 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()\n\nfun foo() {\n    // The opening \"\"\" can not be wrapped to next line as that would result in a compilation error\n    return \"\"\"\n        line1\n        line2\n        \"\"\".trimIndent()\n}\n</code></pre> <pre><code>val foo = \"\"\"\n          line1\n          line2\n          \"\"\".trimIndent()\n\nfun foo() {\n    return \"\"\"\n        line1\n        line2\n    \"\"\".trimIndent()\n}\n</code></pre> <p>Rule id: <code>standard:string-template-indent</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:string-template-indent\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template-indent = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template-indent = disabled\n</code></pre></li> </ol> <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/standard/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>Enforces consistent removal (default) or adding of trailing commas on call site.</p>  Ktlint Disallowed <pre><code>val foo =\n    FooWrapper(\n        Foo(\n            a = 3,\n            b = 4,\n        ),\n    )\n</code></pre> <pre><code>val foo =\n    FooWrapper(Foo(\n        a = 3,\n        b = 4,\n    ),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_allow_trailing_comma_on_call_site</code>Defines whether a trailing comma (or no trailing comma) should be enforced on the calling site, e.g. argument-list, when-entries, lambda-arguments, indices, etc. When set, IntelliJ IDEA uses this property to allow usage of a trailing comma by discretion of the developer. KtLint however uses this setting to enforce consistent usage of the trailing comma when set. <code>true</code> <code>true</code> <code>false</code> <p>Note</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>KtLint values consistent formatting more than a per-situation decision, and therefore uses this setting to enforce/disallow usage of trailing comma's on the calling site.</p> <p>Rule id: <code>standard:trailing-comma-on-call-site</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:trailing-comma-on-call-site\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-call-site = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-call-site = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>Enforces consistent removal (default) or adding of trailing commas on declaration site.</p>  Ktlint Disallowed <pre><code>class FooWrapper(\n    val foo = Foo(\n        a = 3,\n        b = 4,\n    ),\n)\n</code></pre> <pre><code>class FooWrapper(val foo = Foo(\n    a = 3,\n    b = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_allow_trailing_comma</code>Defines whether a trailing comma (or no trailing comma) should be enforced on the defining site, e.g. parameter-list, type-argument-list, lambda-value-parameters, enum-entries, etc. When set, IntelliJ IDEA uses this property to allow usage of a trailing comma by discretion of the developer. KtLint however uses this setting to enforce consistent usage of the trailing comma when set. <code>true</code> <code>true</code> <code>false</code> <p>Note</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>KtLint values consistent formatting more than a per-situation decision, and therefore uses this setting to enforce/disallow usage of trailing comma's in declarations.</p> <p>Rule id: <code>standard:trailing-comma-on-declaration-site</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:trailing-comma-on-declaration-site\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-declaration-site = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-declaration-site = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-argument-comment","title":"Type argument comment","text":"<p>Disallows comments to be placed at certain locations inside a type argument.</p>  Ktlint Disallowed <pre><code>fun Foo&lt;\n    /* some comment */ \n    out Any\n    &gt;.foo() {}\nfun Foo&lt;\n    // some comment \n    out Any\n    &gt;.foo() {}\n</code></pre> <pre><code>fun Foo&lt;out /* some comment */ Any&gt;.foo() {}\nfun Foo&lt;\n    out Any, // some comment\n    &gt;.foo() {}\n</code></pre> <p>Note</p> <p>In some projects it is an accepted practice to use EOL comments to document the parameter before the comma as is shown below: <pre><code>fun Foo&lt;\n    out Bar1, // some comment\n    out Bar2, // some other comment\n&gt;.foo() {}\n</code></pre> Although this code sample might look ok, it is semantically and programmatically unclear to which type <code>some comment</code> refers. From the developer perspective it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p> <p>Rule id: <code>standard:type-argument-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-argument-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-parameter-comment","title":"Type parameter comment","text":"<p>Disallows comments to be placed at certain locations inside a type parameter.</p>  Ktlint Disallowed <pre><code>class Foo1&lt;\n    /* some comment */ \n    out Bar\n    &gt;\nclass Foo2&lt;\n    // some comment \n    out Bar\n    &gt;\n</code></pre> <pre><code>class Foo1&lt;in /* some comment */ Bar&gt;\nclass Foo2&lt;\n    in Bar, // some comment\n    &gt;\n</code></pre> <p>Note</p> <p>In some projects, it is an accepted practice to use EOL comments to document the parameter before the comma as is shown below: <pre><code>class Foo&lt;\n    out Bar1, // some comment\n    out Bar2, // some other comment\n&gt;\n</code></pre></p> <p>Although this code sample might look ok, it is semantically and programmatically unclear on which parameter <code>some comment</code> refers. From the developer perspective, it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p> <p>Rule id: <code>standard:type-parameter-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:type-parameter-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-comment = disabled\n</code></pre></li> </ol>"},{"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>val foo = \"some-string\".count { it == '-' }\n</code></pre> <pre><code>val foo = \"some-string\".count() { it == '-' }\n</code></pre> <p>Rule id: <code>standard:unnecessary-parentheses-before-trailing-lambda</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:unnecessary-parentheses-before-trailing-lambda\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#value-argument-comment","title":"Value argument comment","text":"<p>Disallows comments to be placed at certain locations inside a value argument.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    foo(\n        /* some comment */\n        bar = \"bar\"\n    )\nval foo2 =\n    foo(\n        // some comment\n        bar = \"bar\"\n    )\n</code></pre> <pre><code>val foo1 = foo(bar /* some comment */ = \"bar\")\nval foo2 = \n    foo(\n        bar = // some comment\n            \"bar\"\n    )\n</code></pre> <p>Rule id: <code>standard:value-argument-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:value-argument-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-argument-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-argument-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#value-parameter-comment","title":"Value parameter comment","text":"<p>Disallows comments to be placed at certain locations inside a value argument.</p>  Ktlint Disallowed <pre><code>class Foo1(\n    /** some kdoc */\n    bar = \"bar\"\n)\nclass Foo2(\n    /* some comment */\n    bar = \"bar\"\n)\nclass Foo3(\n    // some comment\n    bar = \"bar\"\n)\n</code></pre> <pre><code>class Foo1(\n   bar = /** some kdoc */ \"bar\"\n)\nclass Foo2(\n   bar = /* some comment */ \"bar\"\n)\nclass Foo3(\n    bar =\n       // some comment\n       \"bar\"\n)\n</code></pre> <p>Rule id: <code>standard:value-parameter-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:value-parameter-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-parameter-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-parameter-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#wrapping","title":"Wrapping","text":""},{"location":"rules/standard/#argument-list-wrapping","title":"Argument list wrapping","text":"<p>All arguments should either be on the same line, or on a separate line.</p>  Ktlint Disallowed <pre><code>val foo =\n    foo(\n        a,\n        b,\n        c,\n    )\n</code></pre> <pre><code>val foo =\n    foo(\n        a,\n        b, c,\n    )\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than</code> <code>unset</code> 8 8 <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:argument-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:argument-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_argument-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_argument-list-wrapping = disabled\n</code></pre></li> </ol>"},{"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 =\n    listOf(1, 2, 3)\n        .filter { it &gt; 2 }!!\n        .takeIf { it.count() &gt; 100 }\n        ?.sum()\nval foobar =\n    foo()\n        ?: bar\n</code></pre> <pre><code>val foo =\n    listOf(1, 2, 3).\n        filter { it &gt; 2 }!!.\n        takeIf { it.count() &gt; 100 }?.\n        sum()\nval foobar =\n    foo() ?:\n        bar\n</code></pre> <p>Rule id: <code>standard:chain-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:chain-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#comment-wrapping","title":"Comment wrapping","text":"<p>A block comment must 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 */ } \n</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>standard:comment-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comment-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#context-receiver-wrapping","title":"Context receiver wrapping","text":"<p>Important</p> <p>Context receivers are deprecated starting from Kotlin 2.2.0 and will be removed in a future version. Once KtLint is upgraded to a Kotlin version that no longer supports context receivers, then you will not be able to use that KtLint version as long as your code still contains context receiver.</p> <p>Tip</p> <p>This rule does not affect context parameters. See rule <code>context-receiver-list-wrapping</code> for wrapping of context parameters.</p> <p>Wraps the context receiver list containing a context receiver 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\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\n    Fooooooooooooooooooo1,\n    Foooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n\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(\n    Foooooooooooooooo&lt;\n        Foo,\n        Bar,\n        &gt;\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(Foo) fun fooBar()\n\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(Fooooooooooooooooooo1, Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n\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&lt;Foo, Bar&gt;)\nfun fooBar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:context-receiver-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:context-receiver-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#context-receiver-list-wrapping","title":"Context receiver list wrapping","text":"<p>Tip</p> <p>This rule does not affect context receivers. See rule <code>context-receiver-wrapping</code> for wrapping of context receivers.</p> <p>Wraps the context receiver list containing a context parameter 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\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\n    foo1: Fooooooooooooooooooo1,\n    foo2: Foooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n\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(\n    _: Foooooooooooooooo&lt;\n        Foo,\n        Bar,\n        &gt;\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(_: Foo) fun fooBar()\n\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(foo1: Fooooooooooooooooooo1, foo2: Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n\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&lt;Foo, Bar&gt;)\nfun fooBar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:context-receiver-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:context-receiver-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-list-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#enum-wrapping","title":"Enum wrapping","text":"<p>Each individual enum entry should be on a separate line. Multiple enums cannot be on the same 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 }\n\nenum class Foo {\n    A,\n    B,\n    C,\n    D,\n    ;\n\n    fun foo() = \"foo\"\n}\n</code></pre> <pre><code>enum class Foo {\n    A,\n    B, C,\n    D\n}\n\nenum class Foo {\n    A;\n    fun foo() = \"foo\"\n}\n</code></pre> <p>Rule id: <code>standard:enum-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:enum-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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() {\n    if (true) foo()\n    if (true) foo() else bar()\n}\n</code></pre> <pre><code>fun foobar() {\n    if (true) if (false) foo() else bar()\n    if (true) bar() else if (false) foo() else bar()\n    if (true) { foo() } else bar()\n    if (true) bar() else { if (false) foo() else bar() }\n}\n</code></pre> <p>Rule id: <code>standard:if-else-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:if-else-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-wrapping = disabled\n</code></pre></li> </ol> <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/standard/#multiline-expression-wrapping","title":"Multiline expression wrapping","text":"<p>Multiline expressions 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> <p>Setting <code>ktlint_function_signature_body_expression_wrapping</code> of the <code>function-signature</code> rule takes precedence when set to <code>default</code>. This setting keeps the first line of a multiline expression body on the same line as the end of function signature as long as the max line length is not exceeded. In that case, this rule does not wrap the multiline expression. </p>  Ktlint Disallowed <pre><code>val foo =\n    foo(\n        parameterName =\n            \"The quick brown fox \"\n                .plus(\"jumps \")\n                .plus(\"over the lazy dog\"),\n    )\n</code></pre> <pre><code>val foo = foo(\n    parameterName = \"The quick brown fox \"\n        .plus(\"jumps \")\n        .plus(\"over the lazy dog\"),\n)\n</code></pre> <p>Rule id: <code>standard:multiline-expression-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-expression-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-expression-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-expression-wrapping = disabled\n</code></pre></li> </ol> <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/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> <p>Note</p> <p>Wrapping of parameters is also influenced by the <code>function-signature</code> rule.</p>  Ktlint Disallowed (ktlint_official) Disallowed (non ktlint_official) <pre><code>// If `ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals\n// `unset` the parameters are not wrapped as long as they fit on a single line\nclass ClassA(paramA: String, paramB: String, paramC: String)\n\nclass ClassA(\n    paramA: String,\n    paramB: String,\n    paramC: String\n)\n\n// If `ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals\n// `unset` the parameters are not wrapped as long as they fit on a single line\nfun f(a: Any, b: Any, c: Any)\n\nfun f(\n    a: Any,\n    b: Any,\n    c: Any\n)\n\nfun foo(\n    @Bar fooBar: FooBar\n)\n</code></pre> <pre><code>class ClassA(\n    paramA: String, paramB: String,\n    paramC: String\n)\n\nfun f(\n    a: Any,\n    b: Any, c: Any\n)\n\nfun foo(@Bar fooBar: FooBar)\n</code></pre> <pre><code>class ClassA(\n    paramA: String, paramB: String,\n    paramC: String\n)\n\nfun f(\n    a: Any,\n    b: Any, c: Any\n)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:parameter-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-wrapping = disabled\n</code></pre></li> </ol>"},{"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(\n    val fooooooooooooooooooooooooTooLong:\n        Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooTooLong:\n        Foo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Bar(\n    val fooooooooooooooooooooooooTooLong:\n    Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooTooLong:\n    Foo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Bar(\n    val fooooooooooooooooooooooooTooLong: Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooooooTooLong: Foo,\n)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:parameter-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-wrapping = disabled\n</code></pre></li> </ol>"},{"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:\n    String\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> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:property-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:property-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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() {\n    if (true) {\n        // do something\n    }\n}\n\nclass A {\n    val a = 0\n    val b = 1\n}\n\nenum class FooBar1 { FOO, BAR }\n\nenum class FooBar2 {\n    FOO,\n    BAR,\n}\n</code></pre> <pre><code>fun foo() { if (true) {\n        // do something\n    }\n}\n\nclass A { val a = 0\n    val b = 1 }\n</code></pre> <p>Rule id: <code>standard:statement-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:statement-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_statement-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_statement-wrapping = disabled\n</code></pre></li> </ol>"},{"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 foo =\n    foo(\n        a,\n        b,\n        c,\n    )\n</code></pre> <pre><code>val foo = foo(\n    a,\n    b,\n    c)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_wrapping = disabled\n</code></pre></li> </ol>"}]}
\ 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 &amp; 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/#what-are-the-maven-coordinates-in-ktlint-1x","title":"What are the Maven coordinates in Ktlint 1.x?","text":"<p>With the release of ktlint <code>1.0</code> the Maven coordinates of most modules have been changed. Now all ktlint modules are published in Maven group <code>com.pinterest.ktlint</code>. Also, the artifact id's of some modules have been changed.</p> <p>The Maven coordinates of modules below have been changed:</p> Old Maven coordinates New Maven coordinates <code>com.pinterest:ktlint</code> <code>com.pinterest.ktlint:ktlint-cli</code> <code>com.pinterest.ktlint:ktlint-reporter-baseline</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-baseline</code> <code>com.pinterest.ktlint:ktlint-reporter-checkstyle</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-checkstyle</code> <code>com.pinterest.ktlint:ktlint-cli-reporter</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-core</code> <code>com.pinterest.ktlint:ktlint-reporter-format</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-format</code> <code>com.pinterest.ktlint:ktlint-reporter-html</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-html</code> <code>com.pinterest.ktlint:ktlint-reporter-json</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-json</code> <code>com.pinterest.ktlint:ktlint-reporter-plain</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-plain</code> <code>com.pinterest.ktlint:ktlint-reporter-plain-summary</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-plain-summary</code> <code>com.pinterest.ktlint:ktlint-reporter-sarif</code> <code>com.pinterest.ktlint:ktlint-cli-reporter-sarif</code>"},{"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/#why-is-a-rule-skipped-when-i-disable-some-other-rule","title":"Why is a rule skipped when I disable some other rule?","text":"<p>Most rules in ktlint can be executed independently of other rules. However, some rules can only be executed in case one or more other rules are also loaded and/or enabled. Dependencies between rules are introduced to reduce complexity in ktlint. Similar logic in different rules has to be avoided as this might result in formatting conflicts between different rules, which could result in endless loops of formatting and reformatting by a set of rules.</p> <p>In case, you disable a rule, you might run into an <code>IllegalStateException</code> like below:</p> <pre><code>java.lang.IllegalStateException: Skipping rule(s) which are depending on a rule which is not loaded. Please check if you need to add additional rule sets before creating an issue.\n  - Rule with id 'RuleId(value=standard:string-template-indent)' requires rule with id 'RuleId(value=standard:multiline-expression-wrapping)' to be loaded\n</code></pre> <p>For the example above, the <code>string-template-indent</code> rule depends on the <code>multiline-expression-wrapping</code> so that the former rule does not need to know, how to wrap a multiline string that is not yet wrapped: <pre><code>val foo = \"\"\"\n    some text\n   \"\"\".trimIndent()\n</code></pre></p>"},{"location":"faq/#why-does-ktlint-discourage-certain-comment-locations","title":"Why does ktlint discourage certain comment locations?","text":"<p>Kotlin has three different type of comments. Although the KDoc and the block comment look similar in code, their internal PSI structure is different. The EOL comment is yet very different.</p> <p>In Kotlin, it is possible to insert a comment everywhere. It is very challenging, and time-consuming, to make each rule fully resilient for each possible comment location, even in case such locations will (almost) never by used.</p> <p>For example, in sample below it is unclear whether the comment applies to the <code>if</code> block, or to the <code>else</code> block without interpreting the comment itself.</p>  Unclear comment Clear comment <pre><code>if (someCondition) {\n    doTrue()\n} // comment\nelse {\n    doFalse()\n}\n</code></pre> <pre><code>if (someCondition) {\n    doTrue()\n} else { \n    // comment\n    doFalse()\n}\n</code></pre> <p>In other cases, a comment location is more widely used but semantically still incorrect. For example, in sample below the EOL comment is placed after the comma, but it obviously is related to the part before the comma:</p>  Unclear comment Clear comment <pre><code>fun fooBar(\n    foo: Foo, // foo-comment\n    bar: Bar, // bar-comment\n) {}\n</code></pre> <pre><code>fun fooBar(\n    // foo-comment\n    foo: Foo,\n    // bar-comment\n    bar: Bar,\n) {}\n</code></pre> <p>By forbidding certain comment locations, the logic in the rules becomes a bit easier.</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 antipatterns, 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> <p>Warning</p> <p>Import statements can not be annotated in Kotlin. The rules related to import statements can be suppressed with file annotations only.</p>  Allowed <pre><code>// Suppressing all rules for the entire file\n@file:Suppress(\"ktlint\")\n\n// Suppressing specific rules for the entire file\n// Rules related to import statements can only be suppressed using file annotations\n@file:Suppress(\"ktlint:standard:no-wildcard-imports\", \"ktlint:custom-rule-set-id:custom-rule-id\")\n\n// Suppress all rules for the annotated construct\n@Suppress(\"ktlint\")\nclass Foo {}\n\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</code></pre>"},{"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:ktlint-cli</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 {\n  ServiceLoader\n      .load(RuleSetProviderV2::class.java)\n      .flatMapTo(this) { it.getRuleProviders() }\n}\nval ktLintRuleEngine = KtLintRuleEngine(\n  ruleProviders = ruleProviders,\n  editorConfigDefaults = 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(\n  ktLintRuleEngine.format(\n    Code.CodeSnippet(\n      stringBuilder.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":"faq/#how-do-i-disable-ktlint-for-generated-code","title":"How do I disable ktlint for generated code?","text":"<p>Running ktlint on generated code is not useful. Fixing lint and format errors on generated code is a waste of time as errors will be re-introduced once that code is generated again. Given that generated code is located in a separate directory, you can disable ktlint for such directory by adding a glob for that directory: <pre><code>[some/path/to/generated/code/**/*]\nktlint = disabled\n</code></pre></p> <p>Warning</p> <p>The <code>ec4j</code> library used by ktlint does not seem to work with globs starting with <code>**</code> followed by a chain of multiple directories (for example <code>**/path/to/generated/**/*</code>). But both <code>some/path/to/generated/**/*</code> and <code>**/generated/**/*</code> work fine.</p>"},{"location":"quick-start/","title":"Quick start","text":"<p>Follow steps below for a quick start with latest ktlint release.</p>"},{"location":"quick-start/#step-1-install-with-brew","title":"Step 1: Install with brew","text":"<p><pre><code>brew install ktlint\n</code></pre> See download and verification from GitHub or other package managers for alternative ways of installing ktlint. Or, use one of the integrations like maven and gradle plugins.</p>"},{"location":"quick-start/#step-2-lint-and-format-your-code","title":"Step 2: Lint and format your code","text":"<p>All files with extension <code>.kt</code> and <code>.kts</code> in the current directory and below will be scanned. Problems will be fixed automatically when possible. Autocorrect style violations<pre><code>ktlint --format\n# or\nktlint -F\n</code></pre> See cli usage for a more extensive description on using ktlint.</p>"},{"location":"readme/","title":"Build &amp; 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>[![ktlint](https://img.shields.io/badge/ktlint%20code--style-%E2%9D%A4-FF4081)](https://pinterest.github.io/ktlint/)\n</code></pre>"},{"location":"api/custom-integration/","title":"Custom integration","text":""},{"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 =\n  KtLintRuleEngine(\n    ruleProviders = 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 your own custom rules, or a combination of both. Creating a set of RuleProviders<pre><code>val KTLINT_API_CONSUMER_RULE_PROVIDERS =\n  setOf(\n    // Can provide custom rules\n    RuleProvider { NoVarRule() },\n    // but also reuse rules from KtLint rulesets\n    RuleProvider { IndentationRule() },\n  )\n</code></pre></p>"},{"location":"api/custom-integration/#editor-config-defaults-overrides","title":"Editor config: defaults &amp; 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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigOverride = EditorConfigOverride.from(\n      INDENT_STYLE_PROPERTY to IndentConfig.IndentStyle.SPACE,\n      INDENT_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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigDefaults = EditorConfigDefaults.load(\n      path = Paths.get(\"/some/path/to/editorconfig/file/or/directory\"),\n      propertyTypes = 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 =\n  KtLintRuleEngine(\n    ruleProviders = KTLINT_API_CONSUMER_RULE_PROVIDERS,\n    editorConfigDefaults = EditorConfigDefaults(\n      org.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 &amp; format","text":"<p>Once the <code>KtLintRuleEngine</code> has been defined, it is ready to be invoked for code that has to be linted or formatted. 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(\n    File(\"/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 an optional lambda. Once linting is complete, the lambda will be called for each <code>LintError</code> which is found. Invoking lint<pre><code>ktLintRuleEngine\n    .lint(code) { lintError -&gt;\n        // handle\n    }\n</code></pre></p> <p>The <code>format</code> function is invoked with a lambda. The lambda is called for each <code>LintError</code> which is found. If the <code>LintError</code> can be autocorrected, the return value of the lambda instructs the rule whether this specific <code>LintError</code> is to be autocorrected, or not. If the <code>LintError</code> can not be autocorrected, the return result of the lambda is ignored. The formatted code is returned as result of the function.</p> <p>The new <code>format</code> function allows the API Consumer to decide which LintError is to be autocorrected, or not. This is most interesting for API Consumers that let their user interactively decide per <code>LintError</code> how it has to be handled. For example see the <code>ktlint-intellij-plugin</code> which in 'manual' mode displays all lint violations, which allows the user to decide which <code>LintError</code> is to be autocorrected.</p> <p>Note</p> <p>The difference with the legacy version of the <code>format</code> is subtle. It takes two parameters (a <code>LintError</code> and <code>Boolean</code> denoting whether the <code>LintError</code> is corrected), and it does not return a value.</p> Invoke format (preferred, starting from Ktlint 1.3)<pre><code>val formattedCode =\n    ktLintRuleEngine\n      .format(code) { lintError -&gt;\n          if (lintError.canBeAutoCorrected) {\n              // Return AutocorrectDecision.ALLOW_AUTOCORRECT to execute the autocorrect of this lintError if this is supported by the rule.\n              // Return AutocorrectDecision.NO_AUTOCORRECT if the LintError should not be corrected even if is supported by the rule.\n          } else {\n              // In case the LintError can not be autocorrected, the return value of the lambda will be ignored.\n              // For clarity reasons it is advised to return AutocorrectDecision.NO_AUTOCORRECT in case the LintError can not be autocorrected.\n              AutocorrectDecision.NO_AUTOCORRECT\n          }\n      }\n</code></pre> <p>Warning</p> <p>Rules need to implement the interface <code>RuleAutocorrectApproveHandler</code> in order to let the API Consumer decide whether a <code>LintError</code> is to be autocorrected, or not. This interface is implemented for all rules provided via the Ktlint project starting from version 1.3. However, external rulesets may not have implemented this interface on their rulesets though. Contact the maintainer of such a ruleset to implement this interface.</p> <p>The (legacy) <code>format</code> function is invoked with an optional lambda. Once formatting is complete, the lambda will be called for each <code>LintError</code> which is found. The (legacy) <code>format</code> function fixes all <code>LintErrors</code> for which an autocorrect is available. The formatted code is returned as result of the function.</p> Invoke format (deprecated as of Ktlint 1.3, will be removed in Ktlint 2.0)<pre><code>// Up until Ktlint 1.2.1 the format was invoked with a lambda having two parameters and not returning a result. This function will be removed in Ktlint 2.0 \nval formattedCode =\n    ktLintRuleEngine\n        .format(code) { lintError, corrected -&gt;\n            // handle\n        }\n</code></pre>"},{"location":"api/custom-integration/#rule-ruleautocorrectapprovehandler","title":"Rule &amp; RuleAutocorrectApproveHandler","text":"<p>Note</p> <p>Providers of custom rules are strongly encouraged to implement <code>RuleAutocorrectApproveHandler</code> interface as described below. The <code>ktlint-intellij-plugin</code>, which will be updated soon after the 1.3 release of Ktlint, make use of this new functionality. If your ruleset is used by users of the plugin, it is very likely that they want to be able to autocorrect individual <code>LintErrors</code> or to format a block of code (e.g. a selection) in a file. This functionality will only be available for rules that have implemented this interface.</p> <p>In Ktlint 1.3 the <code>RuleAutocorrectApproveHandler</code> interface is added. This interface adds the ability that the API Consumer decides per <code>LintError</code> whether it needs to autocorrected, or not. In Ktlint 2.0 the methods <code>beforeVisitChildNodes</code> and <code>afterVisitChildNodes</code> of the <code>Rule</code> class will be replaced with the new versions which are now added to the <code>RuleAutocorrectApproveHandler</code> interface as is shown below (the signature for <code>afterVisitChildNodes</code> is changed similarly):</p> Deprecated signature in `Rule` class<pre><code>public open fun beforeVisitChildNodes(\n    node: ASTNode,\n    autoCorrect: Boolean,\n    emit: (\n        offset: Int,\n        errorMessage: String,\n        canBeAutoCorrected: Boolean\n    ) -&gt; Unit,\n)  \n</code></pre> New signature in `RuleAutocorrectApproveHandler` interface<pre><code>public fun beforeVisitChildNodes(\n    node: ASTNode,\n    emit: (\n        offset: Int,\n        errorMessage: String,\n        canBeAutoCorrected: Boolean\n    ) -&gt; AutocorrectDecision,\n)\n</code></pre> <p>The <code>autoCorrect</code> parameter is no longer passed to the method. Instead, the <code>emit</code> lambda now returns the value <code>AutocorrectDecision.ALLOW_AUTOCORRECT</code> or <code>AutocorrectDecision.NO_AUTOCORRECT</code>.</p> <p>In case a <code>LintError</code> is detected, and can be autocorrected, the <code>LintError</code> can be processed as shown below:</p> <pre><code>emit(node.startOffset, \"some detail message\", true)\n   .ifAutocorrectAllowed {\n       // Autocorrect the LintError\n   }\n</code></pre> <p>In case the <code>LintError</code> can not be autocorrected, if suffices to emit the violation only:  <pre><code>emit(node.startOffset, \"some detail message\", false)\n</code></pre></p>"},{"location":"api/custom-integration/#logging","title":"Logging","text":"<p>Ktlint uses the <code>io.github.oshai: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 (3<sup>rd</sup> 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>You can provide custom rules via a separate ruleset to Ktlint. A ruleset is a JAR containing one or more Rules. </p> <p>A complete sample project is included in this repo under the ktlint-ruleset-template directory. This directory can be cloned, and used as a starting point for a new project containing your custom ruleset.</p>"},{"location":"api/custom-rule-set/#ktlint-ruleset-template","title":"ktlint-ruleset-template","text":""},{"location":"api/custom-rule-set/#gradle-build","title":"Gradle build","text":"<p>The Gradle build file of the sample project includes the setup for:</p> <ul> <li>publishing the custom ruleset artifact to Maven</li> <li>the custom Gradle task 'ktlintCheck' that is using the Ktlint CLI to run the rules provided by the ktlint project, as well as the custom rule(s) from this project on the project itself (dogfood principle).</li> </ul>"},{"location":"api/custom-rule-set/#rule","title":"Rule","text":"<p>The Rule contains the logic for linting and formatting the code. For example, see NoVarRuleTest. </p> <p>A rule has to implement one or more of hooks below:</p> <ul> <li><code>Rule.beforeFirstNode</code></li> <li><code>RuleAutocorrectApproveHandler.beforeVisitChildNodes</code></li> <li><code>RuleAutocorrectApproveHandler.afterVisitChildNodes</code></li> <li><code>Rule.afterLastNode</code></li> </ul> <p>Tip</p> <p>See <code>ktlint-ruleset-standard</code> for examples of rules that implement the hooks above.</p> <p>Upon traversal of the Abstract Syntax Tree (AST), the hooks of the Rule are visited as indicated by their names. The Jetbrains PsiViewer plugin for IntelliJ IDEA is a convenient tool to inspect the AST for any piece of code.</p> <p></p>"},{"location":"api/custom-rule-set/#rule-set-provider","title":"Rule Set Provider","text":"<p>The RuleSetProvider provides new instances of the rule, see CustomRuleSetProvider for an example.</p> <p><code>ktlint</code> is relying on the ServiceLoader to discover all available \"RuleSet\"s on the classpath. For this, the RuleSetProvider needs to be registered in file <code>resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3</code>, see Registration for Java ServiceLoader.</p>"},{"location":"api/custom-rule-set/#building-the-project","title":"Building the project","text":"Building the ktlint-ruleset-template<pre><code>$ cd ktlint-ruleset-template/\n$ ../gradlew build\n</code></pre>"},{"location":"api/custom-rule-set/#running-ktlint-cli-with-the-custom-ruleset","title":"Running Ktlint CLI with the custom ruleset","text":"Provide code sample that violates rule `custom:no-var<pre><code>$ echo 'var v = 0' &gt; 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, \n           - standard:final-newline, \n           - standard:chain-wrapping, \n           - standard:colon-spacing, \n           - standard:comma-spacing, \n           - standard:comment-spacing, \n           - standard:curly-spacing, \n           - standard:dot-spacing, \n           - standard:import-ordering, \n           - standard:keyword-spacing, \n           - standard:modifier-order, \n           - standard:no-blank-line-before-rbrace, \n           - standard:no-consecutive-blank-lines, \n           - standard:no-empty-class-body, \n           - standard:no-line-break-after-else, \n           - standard:no-line-break-before-assignment, \n           - standard:no-multi-spaces, \n           - standard:no-semi, \n           - standard:no-trailing-spaces, \n           - standard:no-unit-return, \n           - standard:no-unused-imports, \n           - standard:no-wildcard-imports, \n           - standard:op-spacing, \u00a1\n           - standard:pa\u00a1rameter-list-wrapping, \n           - standard:paren-spacing, \n           - standard:range-spacing, \n           - standard:string-template, \n           - custom:no-var, \n           - standard:indent, \n           - 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/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 &amp;&amp; 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 -&gt; Open....      </li> <li>You'll also need to set the \"Project language level\" to 8 in \"Project Settings\" (File -&gt; Project Structure... -&gt; Project).    </li> <li>To run <code>ktlint</code> - right-click on <code>ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt</code> -&gt; Run.</li> </ul>"},{"location":"install/cli/","title":"Command line","text":"<p>Command Line usage</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/1.7.1/ktlint &amp;&amp; chmod a+x ktlint &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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>"},{"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 rules from the standard ruleset. Hidden folders will be skipped.</p> Default validation with standard ruleset<pre><code>ktlint\n</code></pre> <p>Note</p> <p>The experimental rules in the standard rule set will only be run when <code>.editorconfig</code> property <code>ktlint_experimental = enabled</code> is set.</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.</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\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</code> file 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># Specify the code style (ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig\nktlint generateEditorConfig --code-style ktlint_official\n# or\nktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig --code-style android_studio\n</code></pre> <p>Normally the <code>.editorconfig</code> 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>Overrides '.editorconfig' in project directory\" in KtLint 0.46 and older</p> <p>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 &amp;&amp; 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>Suppress logging and error output</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&gt; /dev/null</code> to the end of the command line. Otherwise, specify a reporter to write the error output to a file.</p> <p>If input from <code>stdin</code> represents the contents of a file, the file path can be supplied with <code>stdin-path</code>. This path is made available for rules to use, the <code>--format</code> option will not modify this file. </p> file path from stdin-path<pre><code>ktlint --stdin --stdin-path /path/to/file/Foo.kt\n</code></pre>"},{"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>--color</code> and <code>--color-name=&lt;colorName&gt;</code>: Make output colorful and optionally set the color name to use.</p> <p><code>-h</code> or <code>--help</code>: Prints help information.</p> <p><code>--limit=&lt;limit&gt;</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[=&lt;delimiter&gt;]</code>: Reads additional patterns from <code>stdin</code>, where the patterns are separated by <code>&lt;delimiter&gt;</code>. If <code>=&lt;delimiter&gt;</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>&lt;plugins&gt;</code> section in the <code>pom.xml</code>:</p> <ul> <li>The <code>ktlint</code> task is bound to the Maven compile lifecycle and will be executed each time the <code>mvn compile</code> is executed. It can also be executed with command <code>mvn exec:exec@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&lt;plugin&gt;\n  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;\n  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;\n  &lt;version&gt;3.5.0&lt;/version&gt;\n  &lt;executions&gt;\n    &lt;execution&gt;\n      &lt;!--\n      Format and autocorrect lint errors when possible during compile. This helps in committing autocorrect changes in the\n      same commit as where the original code changes were made.\n      --&gt;\n      &lt;id&gt;ktlint-format&lt;/id&gt;\n      &lt;phase&gt;compile&lt;/phase&gt;\n      &lt;goals&gt;\n        &lt;goal&gt;exec&lt;/goal&gt;\n      &lt;/goals&gt;\n    &lt;/execution&gt;\n  &lt;/executions&gt;\n  &lt;configuration&gt;\n    &lt;includePluginDependencies&gt;true&lt;/includePluginDependencies&gt;\n    &lt;executable&gt;java&lt;/executable&gt;\n    &lt;arguments&gt;\n      &lt;argument&gt;-classpath&lt;/argument&gt;\n      &lt;!-- automatically creates the classpath using all project dependencies, also adding the project build directory --&gt;\n      &lt;classpath/&gt;\n      &lt;argument&gt;com.pinterest.ktlint.Main&lt;/argument&gt;\n      &lt;!-- Actual wanted arguments to run ktlint with formatting --&gt;\n      &lt;argument&gt;--format&lt;/argument&gt;\n      &lt;argument&gt;--relative&lt;/argument&gt;\n    &lt;/arguments&gt;\n  &lt;/configuration&gt;\n  &lt;dependencies&gt;\n    &lt;dependency&gt;\n      &lt;groupId&gt;com.pinterest.ktlint&lt;/groupId&gt;\n      &lt;artifactId&gt;ktlint-cli&lt;/artifactId&gt;\n      &lt;version&gt;1.7.1&lt;/version&gt;\n      &lt;!-- Use fat jar of ktlint-cli --&gt;\n      &lt;classifier&gt;all&lt;/classifier&gt;\n      &lt;type&gt;jar&lt;/type&gt;\n    &lt;/dependency&gt;\n    &lt;!-- additional 3rd party ruleset(s) can be specified here --&gt;\n  &lt;/dependencies&gt;\n&lt;/plugin&gt;\n...\n</code></pre> <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)\n\nplugins {\n    id 'java'\n}\n\nrepositories {\n    mavenCentral()\n}\n\nconfigurations {\n    ktlint\n}\n\ndependencies {\n    ktlint(\"com.pinterest.ktlint:ktlint-cli:1.7.1\") {\n        attributes {\n            attribute(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}\n\ntasks.register(\"ktlintCheck\", JavaExec) {\n    group = \"verification\"\n    description = \"Check Kotlin code style.\"\n    classpath = configurations.ktlint\n    mainClass = \"com.pinterest.ktlint.Main\"\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args \"src/**/*.kt\", \"**.kts\", \"!**/build/**\"\n}\n\ntasks.named(\"check\") {\n    dependsOn tasks.named(\"ktlintCheck\")\n}\n\ntasks.register(\"ktlintFormat\", JavaExec) {\n    group = \"formatting\"\n    description = \"Fix Kotlin code style deviations.\"\n    classpath = configurations.ktlint\n    mainClass = \"com.pinterest.ktlint.Main\"\n    // Suppress \"sun.misc.Unsafe::objectFieldOffset\" on Java24 (warning) (https://github.com/pinterest/ktlint/issues/2973)\n    // jvmArgs(\"--sun-misc-unsafe-memory-access=allow\") // Java 24+\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args \"-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\n\ndependencies {\n    ktlint(\"com.pinterest.ktlint:ktlint-cli:1.7.1\") {\n        attributes {\n            attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))\n        }\n    }\n    // ktlint(project(\":custom-ktlint-ruleset\")) // in case of custom ruleset\n}\n\nval ktlintCheck by tasks.registering(JavaExec::class) {\n    group = LifecycleBasePlugin.VERIFICATION_GROUP\n    description = \"Check Kotlin code style\"\n    classpath = ktlint\n    mainClass.set(\"com.pinterest.ktlint.Main\")\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args(\n        \"**/src/**/*.kt\",\n        \"**.kts\",\n        \"!**/build/**\",\n    )\n}\n\ntasks.check {\n    dependsOn(ktlintCheck)\n}\n\ntasks.register&lt;JavaExec&gt;(\"ktlintFormat\") {\n    group = LifecycleBasePlugin.VERIFICATION_GROUP\n    description = \"Check Kotlin code style and format\"\n    classpath = ktlint\n    mainClass.set(\"com.pinterest.ktlint.Main\")\n    // Suppress \"sun.misc.Unsafe::objectFieldOffset\" on Java24 (warning) (https://github.com/pinterest/ktlint/issues/2973)\n    jvmArgs(\"--sun-misc-unsafe-memory-access=allow\") // Java 24+\n    // see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information\n    args(\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/#tca-integration","title":"TCA integration","text":"<p>Tencent Cloud Code Analysis (TCA for short, code-named CodeDog inside the company early) is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis tools in various programming languages.</p> <ul> <li>Homepage: http://tca.tencent.com/</li> <li>Source code: https://github.com/Tencent/CodeAnalysis</li> <li>Documentation: https://tencent.github.io/CodeAnalysis</li> </ul>"},{"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/setup/","title":"Recommended setup","text":"<p>Ktlint can be installed in a lot of different ways. It depends on your situation what works best for you.</p> <p>As maintainer of Ktlint, I advise setup below to maximize your productivity, and get feedback early according to the failing fast principle.</p> <ol> <li><code>ktlint-intellij-plugin</code> for direct feedback while coding</li> <li>Git pre-commit hook for feedback when committing</li> <li>Build pipeline as last defence</li> </ol>"},{"location":"install/setup/#ktlint-intellij-plugin-for-direct-feedback-while-coding","title":"<code>ktlint-intellij-plugin</code> for direct feedback while coding","text":"<p>Tip</p> <p>Ensure to install version <code>0.20.0</code> (or later) of the Ktlint plugin via the Intellij Plugin Marketplace to get benefits described below.</p> <p>The <code>ktlint-intellij-plugin</code> gives direct feedback while writing code. The plugin can be used in 'distract free' and 'manual' mode, or be disabled entirely. This is a per-project setting.</p> <p></p> <p>In <code>distract free</code> mode, the plugin only shows the violations which need to be manually corrected. Ktlint formatting will be applied automatically after apply Intellij IDEA format, or on save of the file. This works bests for projects for which the <code>.editorconfig</code> already has been set up properly for the project.</p> <p></p> <p>Note that image above also shows a warning that 'Ktlint found 5 violations which can be autocorrected'. Reformatting the file, or simply save the file, results in:</p> <p></p> <p>In 'manual' mode, or in 'distract free' mode after selecting 'Show all Ktlint violations in file', each individual violation is shown as error. This allows for suppressing errors that can be autocorrected, but for which this is unwanted.</p> <p></p> <p>Violations reported by ktlint can be suppressed by adding a <code>@Suppress</code> annotation via the quick fix:</p> <p></p> <p>As of Ktlint <code>1.1.0</code> the maintainer of Ktlint has joined the ktlint-intellij-plugin project to ensure that the plugin stays up to date with releases of ktlint and releases of Intellij IDEA.</p> <p>The <code>ktlint-intellij-plugin</code> can be installed as plugin in Intellij IDEA.</p>"},{"location":"install/setup/#git-pre-commit-hook-for-feedback-when-committing","title":"Git pre-commit hook for feedback when committing","text":"<p>The git pre-commit hook, protects against committing code containing lint violations. From the perspective of code reviewing it is important that the code is already formatted in the style of the project. This is especially valuable after refactorings (for example search and replace) have been applied on files that are not opened in the editor and as of that might not have been updated by the <code>ktlint-intellij-plugin</code>.</p> <p>Ktlint CLI can generate a pre-commit hook, or you can find it here.</p>"},{"location":"install/setup/#build-pipeline-as-last-defence","title":"Build pipeline as last defence","text":"<p>As last defence, to ensure that the code base does not contain lint violations, <code>ktlint-cli</code> is run in the (local and remote) build pipeline (see integrations). </p> <p>For example, in my maven projects I have bound the ktlint (linting) task to the maven <code>compile</code> lifecycle. If after compile a lint violation is found the build is failed. This circumvents that developers disable running of the git hooks on their local machine. And in case that the code was not build locally, the remote build pipeline fails as last resort.</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 the version of ktlint to <code>&lt;latest-version&gt;-SNAPSHOT</code>, and adding the Sonatype snapshot repository location.</p> <p>Important</p> <p>Snapshots are kept until 90 days after being published. Due to some bug at sonatype, it is currently not possible to browse the snapshot directories. But, building against a snapshot version is possible.</p>"},{"location":"install/snapshot-build/#maven","title":"Maven","text":"<pre><code>...\n&lt;repository&gt;\n    &lt;id&gt;sonatype-snapshots&lt;/id&gt;\n    &lt;url&gt;https://central.sonatype.com/repository/maven-snapshots/&lt;/url&gt;\n    &lt;snapshots&gt;\n        &lt;enabled&gt;true&lt;/enabled&gt;\n    &lt;/snapshots&gt;\n    &lt;releases&gt;\n        &lt;enabled&gt;false&lt;/enabled&gt;\n    &lt;/releases&gt;\n&lt;/repository&gt;\n...\n</code></pre>"},{"location":"install/snapshot-build/#gradle","title":"Gradle","text":"<pre><code>repositories {\n  maven {\n    url \"https://central.sonatype.com/repository/maven-snapshots/\"\n  }\n}\n</code></pre>"},{"location":"install/snapshot-build/#kotlin-development-version-snapshot","title":"Kotlin development version snapshot","text":"<p>Additionally, the project publishes snapshots build against the latest kotlin development version. To use them, change the version of ktlint to <code>&lt;latest-version&gt;-kotlin-dev-SNAPSHOT</code>.</p>"},{"location":"rules/","title":"Index","text":"<p>= Rules</p>"},{"location":"rules/code-styles/","title":"Code styles","text":"<p>Starting from version <code>1.0</code>, <code>ktlint_official</code> is the default code style. If you want to revert to another code style, then set the <code>.editorconfig</code> property <code>ktlint_code_style</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = intellij_idea # or android_studio or ktlint_official (default)\n</code></pre> <p>The <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> <ul> <li> <p>The <code>intellij_idea</code> (formerly <code>official</code>) code style aims to be compatible with default formatter of IntelliJ IDEA. This code style is based on Kotlin Coding conventions.</p> </li> <li> <p>The <code>android_studio</code> (formerly <code>android</code>) aims to be compatible with default formatter of Android Studio. This code style is based on Android's Kotlin styleguide.</p> </li> </ul>"},{"location":"rules/configuration-intellij-idea/","title":"Intellij IDEA configuration","text":"<p><code>ktlint</code> strives to prevent code formatting conflicts with IntelliJ IDEA / Android Studio as much as possible. In some cases, <code>ktlint</code> deliberately deviates from IDEA formatting.</p>"},{"location":"rules/configuration-intellij-idea/#preventing-conflicts","title":"Preventing conflicts","text":"<p>Many conflicts can be prevented by setting following <code>.editorconfig</code> settings: <pre><code>root = true\n\n[*]\ninsert_final_newline = true\n\n[{*.kt,*.kts}]\nij_kotlin_code_style_defaults = KOTLIN_OFFICIAL\n\n#  Disable wildcard imports entirely\nij_kotlin_name_count_to_use_star_import = 2147483647\nij_kotlin_name_count_to_use_star_import_for_members = 2147483647\nij_kotlin_packages_to_use_import_on_demand = unset\n</code></pre></p> <p>Conflicts between <code>ktlint</code> and IDEA formatting can also be resolved by using the ktlint-intellij-plugin (or install via Intellij IDEA plugin marketplace) in <code>distract free</code> mode. In this mode, the plugin formats your code with <code>ktlint</code> while you're editing the code.</p>"},{"location":"rules/configuration-intellij-idea/#cleaning-up-old-xml-configuration-settings","title":"Cleaning up old XML configuration settings","text":"<p>Projects which have been created with (old)er versions of Intellij IDEA might still contain XML configuration regarding code styling. It is advised to remove the directory <code>.idea/codeStyles</code> whenever it still exists in your project directory.</p>"},{"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>ktlint_official</code> code style is applied. Alternatively, the code style can be set to <code>intellij_idea</code> or <code>android_studio</code>.</p> <pre><code>[*.{kt,kts}]\nktlint_code_style = ktlint_official\n</code></pre>"},{"location":"rules/configuration-ktlint/#disable-rules","title":"Disable rule(s)","text":"<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>[*.{kt,kts}]\nktlint_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 run unless explicitly enabled: <pre><code>[*.{kt,kts}]\nktlint_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>[*.{kt,kts}]\nktlint_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/#rule-specific-configuration-settings","title":"Rule specific configuration settings","text":"<p>The configuration settings below are used to configure the behavior of a specific rule. As of that, those settings only take effect when the corresponding rule is enabled. See the description of the specific rule for more information about the setting.</p> Configuration setting Rule ij_kotlin_allow_trailing_comma trailing-comma-on-declaration-site ij_kotlin_allow_trailing_comma_on_call_site trailing-comma-on-call-site ij_kotlin_imports_layout import-ordering ij_kotlin_packages_to_use_import_on_demand no-wildcard-imports indent_size indent indent_style indent insert_final_newline final-newline ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than chain-method-continuation ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than class-signature ktlint_ignore_back_ticked_identifier max-line-length ktlint_function_naming_ignore_when_annotated_with function-naming ktlint_function_signature_body_expression_wrapping function-signature ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than function-signature max_line_length max-line-length and several other rules"},{"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\n[api/*.{kt,kts}]\nktlint_standard_indent = disabled\n</code></pre></p> <p>Note: In the example above 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 cases, however, this is 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/#blank-line-between-when-conditions","title":"Blank line between when-conditions","text":"<p>Consistently add or remove a blank line between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed.</p> <p>Note</p> <p>Ktlint uses <code>.editorconfig</code> property <code>ij_kotlin_line_break_after_multiline_when_entry</code> but applies it also on single line entries to increase consistency.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true\nval foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        // BAR2 comment\n        BAR2 -&gt; \"bar2\"\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = false\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; null\n    }\n</code></pre> <pre><code>// ij_kotlin_line_break_after_multiline_when_entry = true | false (no blank lines in simple when-statement)\nval foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n\n        BAR2 -&gt; \"bar2\"\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true (missing newline after BAR1)\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = true (missing newline after BAR1, and BAR2)\nval foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        // BAR2 comment\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\n// ij_kotlin_line_break_after_multiline_when_entry = false (unexpected newline after BAR2)\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n\n        else -&gt; null\n    }\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_line_break_after_multiline_when_entry</code>Despite its name, forces a blank line between single line and multiline when-entries when at least one multiline when-entry is found in the when-statement. <code>true</code> <code>true</code> <code>true</code> <p>Rule id: <code>standard:blank-line-between-when-conditions</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:blank-line-between-when-conditions\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-between-when-conditions = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-between-when-conditions = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#expression-operand-wrapping","title":"Expression operand wrapping","text":"<p>Wraps each operand in a multiline expression to a separate line.</p>  Ktlint Disallowed <pre><code>val foo1 = bar || baz\nval foo2 =\n    bar1 ||\n        bar2 ||\n        baz1 ||\n        (baz2 &amp;&amp; baz3)\nval foo3 = bar + baz\nval foo4 =\n    bar1 -\n        bar2 -\n        baz1 -\n        (baz2 * baz3)\n</code></pre> <pre><code>val foo =\n  multiLineOperand(\n      \"bar\"\n  ) || baz\nif (bar1 || bar2 ||\n    baz1 || (baz2 &amp;&amp; baz3)\n) {\n   // do something\n}\n</code></pre> <p>Rule id: <code>standard:expression-operand-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:expression-operand-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_expression-operand-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_expression-operand-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#kdoc","title":"KDoc","text":"<p>KDoc's should only be used on elements for which KDoc is to be transformed to documentation. Normal block comments should be used in other cases.</p> <p>!!! note: Access modifiers are ignored. Strictly speaking, one could argue that private declarations should not have a KDoc as no documentation will be generated for it. However, for internal use of developers, the KDoc still serves documentation purposes.</p>  Ktlint Disallowed <pre><code>/** some KDoc */\nclass FooBar(\n    /** some KDoc */\n    val foo: Foo\n) {\n    /**\n     * Some bar KDoc\n     */\n    constructor() : this()\n\n    /** some KDoc */\n    val bar: Bar\n}\n\nenum class Foo {\n    /** some KDoc */\n    BAR\n}\n\n/** some KDoc */\ninterface Foo\n/** some KDoc */\nfun foo()\n/** some KDoc */\nval foo: Foo\n/** some KDoc */\nobject foo: Foo\n/** some KDoc */\ntypealias FooBar = (Foo) -&gt; Bar\n</code></pre> <pre><code>/**\n * Some dangling Kdoc (e.g. not followed by a declaration)\n */\n\nval foo /** Some KDoc */ = \"foo\"\n\nclass Foo(\n    /** some dangling KDoc inside a parameter list */\n)\n</code></pre> <p>Rule id: <code>standard:kdoc</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:kdoc\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#mixed-condition-operators","title":"Mixed condition operators","text":"<p>Conditions cannot use both <code>&amp;&amp;</code> and <code>||</code> operators between operators at the same level. By using parenthesis the expression is to be clarified.</p>  Ktlint Disallowed <pre><code>val foo = bar1 &amp;&amp; (bar2 || bar3) &amp;&amp; bar4\n</code></pre> <pre><code>val foo = bar1 &amp;&amp;\n    bar2 ||\n    bar3\nval foo = bar1 &amp;&amp; (bar2 || bar3 &amp;&amp; bar4) &amp;&amp; bar5\n</code></pre> <p>Rule id: <code>standard:mixed-condition-operators</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:mixed-condition-operators\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_mixed-condition-operators = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_mixed-condition-operators = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#square-brackets-spacing","title":"Square brackets spacing","text":"<p>Checks for spacing around square brackets.</p>  Ktlint Disallowed <pre><code>val foo1 = bar[1]\nval foo2 =\n   bar[\n       1,\n       2,\n   ]\n\n@Foo(\n    fooBar = [\"foo\", \"bar\"],\n    fooBaz = [\n        \"foo\",\n        \"baz\",\n    ],\n)\nfun foo() {}\n</code></pre> <pre><code>val foo1 = bar [1]\nval foo2 = bar[ 1]\nval foo3 = bar[1 ]\n</code></pre> <p>Rule id: <code>standard:square-brackets-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:square-brackets-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_square-brackets-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_square-brackets-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/experimental/#when-entry-bracing","title":"When-entry bracing","text":"<p>Enforces consistent usages of braces inside the when-statement. All when-entries in the when-statement should use braces around their bodies in case at least one when-entry has a multiline body, or when the body is surrounded by braces.</p> <p>Braces are helpful for following reasons:</p> <ul> <li>Bodies of the when-conditions are all aligned at same column position</li> <li>Closing braces helps in separating the when-conditions</li> </ul> <p>This rule is not incorporated in the Kotlin Coding conventions, nor in the Android Kotlin Styleguide. It is based on similar behavior in enforcing consistent use of braces in if-else statements. As of that the rule is only enabled automatically for code style <code>ktlint_official</code>. It can be enabled explicitly for other code styles.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; \"bar2\"\n        else -&gt; null\n    }\n\nval foo2 =\n    when (bar) {\n        BAR1 -&gt; {\n            \"bar1\"\n        }\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; {\n            null\n        }\n    }\n</code></pre> <pre><code>val foo3 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt; {\n            \"bar2\"\n        }\n        else -&gt; null\n    }\n\nval foo4 =\n    when (bar) {\n        BAR1 -&gt; \"bar1\"\n        BAR2 -&gt;\n            \"bar2\"\n        else -&gt; null\n    }\n</code></pre> <p>Rule id: <code>standard:when-entry-bracing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:when-entry-bracing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_when-entry-bracing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_when-entry-bracing = disabled\n</code></pre></li> </ol>"},{"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 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\n    @Test fun bar() {}\n}\n\n// A class or function parameter may have a single annotation with parameter(s) on the same line\nclass Foo(\n    @Path(\"fooId\") val fooId: String,\n    @NotNull(\"bar\") bar: String,\n)\n\n// Multiple annotations (without parameters) are allowed on the same line\n@Foo @Bar\nclass FooBar {\n    @Foo @Bar\n    var foo: String\n\n    @Foo @Bar\n    fun bar() {}\n}\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\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> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_annotation_handle_annotations_with_parameters_same_as_annotations_without_parameters</code>Handle listed annotations identical to annotations without parameters. Value is a comma separated list of names without the <code>@</code> prefix. Use <code>*</code> for all annotations with parameters. <code>unset</code> <code>unset</code> <code>unset</code> <p>Rule id: <code>standard:annotation</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:annotation\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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\n    if ((leftHandSideExpression &amp;&amp; rightHandSideExpression) ||\n        (\n            leftHandSideLongExpression &amp;&amp;\n                rightHandSideExpression\n        )\n    ) {\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\n    if ((leftHandSideExpression &amp;&amp; rightHandSideExpression) ||\n        (leftHandSideLongExpression &amp;&amp; rightHandSideExpression)\n    ) {\n        // do something\n    }\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:binary-expression-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:binary-expression-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_binary-expression-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_binary-expression-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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 FOO_1 = \"foo1\"\n\nclass FooBar {\n    val foo2 = \"foo2\"\n    val foo3 = \"foo3\"\n\n    fun bar1() {\n        val foo4 = \"foo4\"\n        val foo5 = \"foo5\"\n    }\n\n    fun bar2() = \"bar\"\n\n    val foo6 = \"foo3\"\n    val foo7 = \"foo4\"\n\n    enum class Foo\n}\n</code></pre> <pre><code>const val FOO_1 = \"foo1\"\n\nclass FooBar {\n    val foo2 = \"foo2\"\n    val foo3 = \"foo3\"\n    fun bar1() {\n        val foo4 = \"foo4\"\n        val foo5 = \"foo5\"\n    }\n    fun bar2() = \"bar\"\n    val foo6 = \"foo3\"\n    val foo7 = \"foo4\"\n    enum class Foo\n}\n</code></pre> <p>Rule id: <code>standard:blank-line-before-declaration</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:blank-line-before-declaration\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-before-declaration = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_blank-line-before-declaration = disabled\n</code></pre></li> </ol> <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/standard/#block-comment-initial-star-alignment","title":"Block comment initial star alignment","text":"<p>Lines in a block comment which (excluding 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>standard:block-comment-initial-star-alignment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:block-comment-initial-star-alignment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_block-comment-initial-star-alignment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_block-comment-initial-star-alignment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#chain-method-continuation","title":"Chain method continuation","text":"<p>In a multiline method chain, the chain operators (<code>.</code> or <code>?.</code>) have to be aligned with each other.</p> <p>Multiple chained methods on a single line are allowed as long as the maximum line length, and the maximum number of chain operators are not exceeded. Under certain conditions, it is allowed that the expression before the first and/or the expression after the last chain operator is a multiline expression.</p> <p>The <code>.</code> in <code>java.class</code> is ignored when wrapping on chain operators.</p> <p>Warning</p> <p>A binary expression for which the left and/or right operand consist of a method chain are currently being ignored by this rule. Please reach out, if you can help to determine what the best strategy is to deal with such kind of expressions.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    listOf(1, 2, 3)\n        .filter { it &gt; 2 }!!\n        .takeIf { it &gt; 2 }\n        .map {\n            it * it\n        }?.map {\n            it * it\n        }\nval foo2 =\n    listOf(1, 2, 3)\n        .filter {\n            it &gt; 2\n        }.map {\n            2 * it\n        }?.map {\n            2 * it\n        }\nval foo3 =\n    foo().bar().map {\n        it.foobar()\n    }\nval foo4 =\n    \"\"\"\n    Some text\n    \"\"\".trimIndent().foo().bar()\n</code></pre> <pre><code>val foo1 =\n    listOf(1, 2, 3).\n        filter { it &gt; 2 }!!.\n        takeIf { it &gt; 2 }.\n        map {\n            it * it\n        }?.\n        map {\n            it * it\n        }\nval foo2 =\n    listOf(1, 2, 3)\n        .filter {\n            it &gt; 2\n        }\n        .map {\n            2 * it\n        }\n        ?.map {\n            2 * it\n        }\nval foo3 = \n    foo()\n    .bar().map {\n        it.foobar()\n    }\nval foo4 =\n    \"\"\"\n    Some text\n    \"\"\".trimIndent().foo()\n        .bar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than</code>Force wrapping of chained methods in case an expression contains at least the specified number of chain operators. If a chained method contains nested expressions, the chain operators of the inner expression are not taken into account. Use value <code>unset</code> (default) to disable this setting. 4 4 4 <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:chain-method-continuation</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:chain-method-continuation\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-method-continuation = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-method-continuation = disabled\n</code></pre></li> </ol> <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/standard/#class-signature","title":"Class signature","text":"<p>Rewrites the class signature to a consistent format respecting the <code>.editorconfig</code> property <code>max_line_length</code> if set. In the <code>ktlint_official</code> code style all class parameters are wrapped by default. Set <code>.editorconfig</code> property <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> to a value greater than 1 to allow classes with a few parameters to be placed on a single line. The other code styles allow an infinite amount of parameters on the same line (as long as the <code>max_line_length</code> is not exceeded) unless <code>.editorconfig</code> property <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code> is set explicitly.</p>  Ktlint (ktlint_official) Disallowed (ktlint_official) Ktlint (non ktlint_official) Disallowed (non ktlint_official) <pre><code>// Assume that max_line_length is not exceeded when written as single line\nclass Foo0\n\nclass Foo1(\n    a: Any,\n)\n\nclass Foo2(\n    a: Any,\n    b: Any,\n)\n\nclass Foo3(\n    @Foo a: Any,\n    b: Any,\n    c: Any,\n)\n\nclass Foo4(\n    a: Any,\n    b: Any,\n    c: Any,\n) : FooBar(a, c)\n\nclass Foo5 :\n    FooBar(\n        \"bar1\",\n        \"bar2\",\n    ) {\n    // body\n}\n\nclass Foo6(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n        bar1,\n        bar2,\n    ) {\n    // body\n}\n\nclass Foo7(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n        bar1,\n        bar2,\n    ),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo8\n    constructor(\n        val bar1: Bar,\n        val bar2: Bar,\n    ) : FooBar(bar1, bar2),\n        BarFoo1,\n        BarFoo2 {\n        // body\n    }\n</code></pre> <pre><code>// Assume that max_line_length is not exceeded when written as single line\nclass Foo0()\n\nclass Foo1(a: Any)\n\nclass Foo2(a: Any, b: Any)\n\nclass Foo3(@Foo a: Any, b: Any, c: Any)\n\nclass Foo4(a: Any, b: Any, c: Any) : FooBar(a, c)\n\nclass Foo5 : FooBar(\n    \"bar1\",\n    \"bar2\",\n) {\n    // body\n}\n\nclass Foo6(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n    bar1,\n    bar2,\n) {\n    // body\n}\n\nclass Foo7(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(\n    bar1,\n    bar2,\n),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo8\nconstructor(\n    val bar1: Bar,\n    val bar2: Bar,\n) : FooBar(bar1, bar2),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Foo0\n\n// Entire class signature does not fit on single line\nclass Foo1(\n    aVeryLonggggggggggggggggggggggg: Any\n)\n\n// Entire class signature does fit on single line\nclass Foo2(a: Any)\n\n// Entire class signature does not fit on single line\nclass Foo3(\n    aVeryLonggggggggggggggg: Any,\n    b: Any\n)\n\n// Entire class signature does fit on single line\nclass Foo4(a: Any, b: Any)\n\n// Entire class signature does fit on single line\nclass Foo5(@Foo a: Any, b: Any, c: Any)\n\n// Entire class signature does fit on single line\nclass Foo6(a: Any, b: Any, c: Any) :\n    FooBar(a, c)\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo7 :\n    FooBar(\n        \"bar1\",\n        \"bar2\"\n    ) {\n    // body\n}\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo8(val bar1: Bar, val bar2: Bar) :\n    FooBar(\n        bar1,\n        bar2\n    ) {\n    // body\n}\n\n// Entire class signature (without constructor invocation) does not fit on single line\nclass Foo9(\n    val aVeryLonggggggggggggggg: Bar,\n    val bar2: Bar\n) : FooBar(\n    bar1,\n    bar2\n) {\n    // body\n}\n\nclass Foo10(val bar1: Bar, val bar2: Bar) :\n    FooBar(\n        bar1,\n        bar2\n    ),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n\nclass Foo11\nconstructor(\n    val bar1: Bar,\n    val bar2: Bar\n) : FooBar(bar1, bar2),\n    BarFoo1,\n    BarFoo2 {\n    // body\n}\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Foo0()\n\nclass Foo6(a: Any, b: Any, c: Any) : FooBar(a, c)\n\n// Entire class signature (without constructor invocation) does fit on single line\nclass Foo7 : FooBar(\n    \"bar1\",\n    \"bar2\",\n) {\n    // body\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than</code>Force wrapping of the parameters of the class signature in case it contains at least the specified number of parameters, even in case the entire class signature would fit on a single line. Use value <code>unset</code> to disable this setting. 1 <code>unset</code> <code>unset</code> <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:class-signature</code></p> <p>Warn</p> <p>For code styles <code>android_studio</code> and <code>intellij_idea</code> this rule rewrites multiline class signature to a single line class signature in case the entire class signature fits on a single line by default. In case you want to leave it to the discretion of the developer to decider whether a single or a multiline class signature is used, please suppress or disable this rule.</p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:class-signature\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-signature = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-signature = disabled\n</code></pre></li> </ol>"},{"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 {\n    FOO,\n    Foo,\n    FOO_BAR,\n    FooBar,\n}\n</code></pre> <pre><code>enum class Bar {\n    foo,\n    bAr,\n    Foo_Bar,\n}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_enum_entry_name_casing</code>Choose any of <code>upper_cases</code> (an enum entry may only contain uppercases, and underscores, and digits, and diacritics on letters and strokes), <code>camel_cases</code> (an enum entry may only contain CamelCase values, including digits, and diacritics on letters and strokes), or <code>upper_or_camel_case</code> (allows mixing of uppercase and CamelCase entries as per Kotlin Coding Conventions). <code>upper_or_camel_cases</code> <code>upper_or_camel_cases</code> <code>upper_or_camel_cases</code> <p>Rule id: <code>standard:enum-entry-name-case</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:enum-entry-name-case\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-entry-name-case = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-entry-name-case = disabled\n</code></pre></li> </ol>"},{"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>standard:filename</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:filename\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_filename = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_filename = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#final-newline","title":"Final newline","text":"<p>Ensures consistent usage of a newline at the end of each file.</p> Configuration setting ktlint_official intellij_idea android_studio <code>insert_final_newline</code> <code>true</code> <code>true</code> <code>true</code> <p>Rule id: <code>standard:final-newline</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:final-newline\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_final-newline = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_final-newline = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-expression-body","title":"Function expression body","text":"<p>Rewrites a function body only containing a <code>return</code> or <code>throw</code> expression to an expression body.</p> <p>Note</p> <p>If the function body contains a comment, it is not rewritten to an expression body.</p>  Ktlint Disallowed <pre><code>fun foo1() = \"foo\"\n\nfun foo2(): String = \"foo\"\n\nfun foo3(): Unit = throw IllegalArgumentException(\"some message\")\n\nfun foo4(): Foo = throw IllegalArgumentException(\"some message\")\n\nfun foo5() {\n    return \"foo\" // some comment\n}\n\nfun foo6(): String {\n    /* some comment */\n    return \"foo\"\n}\n\nfun foo7() {\n    throw IllegalArgumentException(\"some message\")\n    /* some comment */\n}\n\nfun foo8(): Foo {\n    throw IllegalArgumentException(\"some message\")\n    // some comment\n}\n</code></pre> <pre><code>fun foo1() {\n    return \"foo\"\n}\n\nfun foo2(): String {\n    return \"foo\"\n}\n\nfun foo3() {\n    throw IllegalArgumentException(\"some message\")\n}\n\nfun foo4(): Foo {\n    throw IllegalArgumentException(\"some message\")\n}\n</code></pre> <p>Rule id: <code>standard:function-expression-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-expression-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-expression-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-expression-body = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-literal","title":"Function literal","text":"<p>Enforces the parameters of a function literal and the arrow to be written on the same line as the opening brace if the maximum line length is not exceeded. In case the parameters are wrapped to multiple lines then this is respected.</p> <p>If the function literal contains multiple parameters and at least one parameter other than the first parameter starts on a new line than all parameters and the arrow are wrapped to separate lines.</p>  Ktlint (ktlint_official) Ktlint (non ktlint_official) Disallowed <pre><code>val foobar1 = { foo + bar }\nval foobar2 =\n    {\n        foo + bar\n    }\nval foobar3 =\n    { foo: Foo -&gt;\n        foo.repeat(2)\n    }\nval foobar4 =\n    { foo: Foo, bar: Bar -&gt;\n        foo + bar\n    }\nval foobar5 = { foo: Foo, bar: Bar -&gt; foo + bar }\nval foobar6 =\n    {\n        foo: Foo,\n        bar: Bar,\n        -&gt;\n        foo + bar\n    }\n\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { \n        fooooooooooooooo: Foo\n        -&gt;\n        foo.repeat(2)\n    }\n</code></pre> <pre><code>val foobar6 =\n    {\n            foo: Foo,\n            bar: Bar,\n        -&gt;\n        foo + bar\n    }\n\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { \n            fooooooooooooooo: Foo\n        -&gt;\n        foo.repeat(2)\n    }\n</code></pre> <pre><code>val foobar3 =\n    {\n        foo: Foo -&gt;\n        foo.repeat(2)\n    }\nval foobar6 =\n    { foo: Foo,\n      bar: Bar -&gt;\n        foo + bar\n    }\n// Assume that the last allowed character is\n// at the X character on the right           X\nval foobar7 =\n    barrrrrrrrrrrrrr { fooooooooooooooo: Foo -&gt;\n        foo.repeat(2)\n    }\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-literal</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-literal\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-literal = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-literal = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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.</p> <p>Note</p> <p>Wrapping of parameters is also influenced by the <code>parameter-list-wrapping</code> rule.</p>  Ktlint Disallowed <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nfun foooooooo(\n    a: Any,\n    b: Any,\n    c: Any,\n): String {\n    // body\n}\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\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\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\n// Assume that the last allowed character is\n// at the X character on the right           X\nfun bar(\n    a: Any,\n    b: Any,\n    c: Any\n): String {\n    // body\n}\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\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> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_function_signature_body_expression_wrapping</code>Determines how to wrap the body of function in case it is an expression. Use <code>default</code> to wrap the body expression only when the first line of the expression does not fit on the same line as the function signature. Use <code>multiline</code> to force wrapping of body expressions that consists of multiple lines. Use <code>always</code> to force wrapping of body expression always. <code>multiline</code> <code>default</code> <code>default</code> <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. 2 <code>unset</code> <code>unset</code>  default multiline always <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is 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<pre><code>// Given that the function signature has to be written as a single line\n// function signature and that the function has a multiline body expression\nfun someFunction(a: Any, b: Any): String = \"some-result\"\n    .uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun someFunction(\n    a: Any,\n    b: Any\n): String = \"some-result\"\n    .uppercase()\n</code></pre> <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is 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 that the function signature has to be written as a single line\n// function signature and that the function has a single line body expression\n// that fits on the same line as the function signature.\nfun someFunction(a: Any, b: Any): String = \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a single line body expression\n// that fits on the same line as the function signature.\nfun someFunction(\n    a: Any,\n    b: Any\n): String = \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a single line\n// function signature and that the function has a multiline body expression\nfun someFunction(a: Any, b: Any): String =\n    \"some-result\"\n         .uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun someFunction(\n    a: Any,\n    b: Any\n): String =\n    \"some-result\"\n       .uppercase()\n</code></pre> <p>When <code>ktlint_function_signature_body_expression_wrapping</code> is  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>// Given that the function signature has to be written as a single line\n// function signature and that the function has a single line body expression\nfun someFunction(a: Any, b: Any): String =\n    \"some-result\".uppercase()\n\n// Given that the function signature has to be written as a multiline\n// function signature and that the function has a multiline body expression\nfun functionWithAVeryLongName(\n    a: Any,\n    b: Any\n): String =\n    \"some-result\"\n        .uppercase()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-signature</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-signature\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-signature = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-signature = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-type-modifier-spacing","title":"Function type modifier spacing","text":"<p>Enforce a single whitespace between the modifier list and the function type.</p>  Ktlint Disallowed <pre><code>val foo: suspend () -&gt; Unit = {}\n\nsuspend fun bar(baz: suspend () -&gt; Unit) = baz()\n</code></pre> <pre><code>val foo: suspend() -&gt; Unit = {}\n\nsuspend fun bar(baz: suspend   () -&gt; Unit) = baz()\n</code></pre> <p>Rule id: <code>standard:function-type-modifier-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-type-modifier-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-modifier-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-modifier-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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) {\n    if (value &gt; 0) {\n        doSomething()\n    } else if (value &lt; 0) {\n        doSomethingElse()\n    } else {\n        doSomethingElse2()\n    }\n}\n</code></pre> <pre><code>fun foo(value: Int) {\n    if (value &gt; 0)\n        doSomething()\n    else if (value &lt; 0) {\n        doSomethingElse()\n    } else\n        doSomethingElse2()\n}\n</code></pre> <p>Rule id: <code>standard:if-else-bracing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:if-else-bracing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-bracing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-bracing = disabled\n</code></pre></li> </ol> <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/standard/#import-ordering","title":"Import ordering","text":"<p>Ensures that imports are ordered consistently.</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> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_imports_layout</code>Defines imports order layout for Kotlin files. For more details see below table. ,java.,javax.,kotlin.*,^ &lt;1&gt; ,java.,javax.,kotlin.*,^ &lt;1&gt; * &lt;2&gt;"},{"location":"rules/standard/#ij_kotlin_packages_to_use_import_on_demand","title":"ij_kotlin_packages_to_use_import_on_demand","text":"<p>This property holds 0 or more import paths. The import path can be a full path, e.g. \"java.util.List.\" as well as wildcard path, e.g. \"kotlin.*\".</p> <p>Imports can be grouped by composing the layout with symbols below:</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>Imports in the same group are sorted alphabetical with capital letters before lower case letters (e.g. Z before a).</p> <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> <p>Rule id: <code>standard:import-ordering</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:import-ordering\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_import-ordering = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_import-ordering = disabled\n</code></pre></li> </ol>"},{"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() {\n    foobar(\n        a,\n        b,\n        c,\n    )\n}\n</code></pre> <pre><code>fun main() {\n    foobar(\n          a,\n          b,\n          c,\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> Configuration setting ktlint_official intellij_idea android_studio <code>indent_size</code>The size of an indentation level when <code>indent_style</code> is set to <code>space</code>. Use value <code>unset</code> to ignore indentation. 4 4 4 <code>indent_style</code>Style of indentation. Set this value to <code>space</code> or <code>tab</code>. <code>space</code> <code>space</code> <code>space</code> <code>ij_kotlin_indent_before_arrow_on_new_line</code>Indent the arrow in a when-entry if the arrow starts on a new line. Set this value to <code>true</code> or <code>false</code>. Starting from IDEA version <code>2024.2</code> or above this value needs to be set to <code>true</code> to maintain compatibility with IDEA formatting. <code>false</code> <code>false</code> <code>false</code> <p>Rule id: <code>standard:indent</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:indent\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_indent = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_indent = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#naming","title":"Naming","text":""},{"location":"rules/standard/#backing-property-naming","title":"Backing property naming","text":"<p>Allows property names to start with <code>_</code> in case the property is a backing property. <code>ktlint_official</code> and <code>android_studio</code> code styles require the correlated property/function to be defined as <code>public</code>.</p>  Ktlint Disallowed <pre><code>class Bar {\n    // Backing property as normal class member\n    private val _elementList = mutableListOf&lt;Element&gt;()\n    val elementList: List&lt;Element&gt;\n        get() = _elementList\n\n    // Backing property defined in companion object\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n\n    companion object {\n        private val _elementList2 = mutableListOf&lt;Element&gt;()\n    }\n}\n</code></pre> <pre><code>class Bar {\n    // Incomplete backing property as public property 'elementList1' is missing\n    private val _elementList1 = mutableListOf&lt;Element&gt;()\n\n    // Invalid backing property as '_elementList2' is not a private property\n    val _elementList2 = mutableListOf&lt;Element&gt;()\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n}\n</code></pre> <p>Rule id: <code>standard:backing-property-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:backing-property-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_backing-property-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_backing-property-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#class-naming","title":"Class naming","text":"<p>Enforce naming of class and objects.</p>  Ktlint Ktlint JUnit Test Disallowed <pre><code>class Foo\n\nclass Foo1\n\nclass `class` // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>@Nested\ninner class `Some descriptive class name` {\n    @Test\n    fun `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>standard:class-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:class-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_class-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#function-naming","title":"Function naming","text":"<p>Enforce naming of function.</p>  Ktlint Ktlint Test Disallowed <pre><code>fun foo() {}\n\nfun fooBar() {}\n\nfun `fun`() {} // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>@Test\nfun `Some name`() {}\n\n@Test\nfun do_something() {}\n</code></pre> <pre><code>fun Foo() {}\nfun Foo_Bar() {}\nfun `Some name`() {}\nfun do_something() {}\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_function_naming_ignore_when_annotated_with</code>Ignore functions that are annotated with values in this setting. This value is a comma separated list of names without the '@' prefix. <code>unset</code> <code>unset</code> <code>unset</code> <p>Note</p> <p>When using Compose, you might want to configure the <code>function-naming</code> rule with <code>.editorconfig</code> property <code>ktlint_function_naming_ignore_when_annotated_with=Composable</code>. Furthermore, you can use a dedicated ktlint ruleset like Compose Rules for checking naming conventions for Composable functions. </p> <p>Note</p> <p>Functions in files which import a class from package <code>io.kotest</code>, <code>junit.framework</code>, <code>kotlin.test</code>, <code>org.junit</code>, or <code>org.testng</code> are considered to be test functions. Functions in such classes are allowed to have underscores in the name. Also, function names enclosed between backticks 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>standard:function-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-naming = disabled\n</code></pre></li> </ol>"},{"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>standard:package-name</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:package-name\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_package-name = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_package-name = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#property-naming","title":"Property naming","text":"<p>Enforce naming of property.</p> <p>Note</p> <p>This rule can not reliably detect all situations in which incorrect property naming is used. So it only detects in which it is certain that naming is incorrect.</p>  Ktlint Disallowed <pre><code>val foo1 = Foo() // In case developers want to tell that Foo is mutable\nval FOO1 = Foo() // In case developers want to tell that Foo is deeply immutable\n\nconst val FOO_BAR = \"FOO-BAR\" // By definition deeply immutable\n\nvar foo2: Foo = Foo() // By definition not immutable\n\nclass Bar {\n    val foo1 = \"foo1\" // Class properties always start with lowercase, const is not allowed\n\n    const val FOO_BAR = \"FOO-BAR\" // By definition deeply immutable\n\n    var foo2: Foo = Foo() // By definition not immutable\n\n    // Backing property\n    private val _elementList = mutableListOf&lt;Element&gt;()\n    val elementList: List&lt;Element&gt;\n        get() = _elementList\n\n    companion object {\n        val foo1 = Foo() // In case developer want to communicate that Foo is mutable\n        val FOO1 = Foo() // In case developer want to communicate that Foo is deeply immutable\n    }\n}\n\nvar `package` = \"foo\" // Any keyword is allowed when wrapped between backticks\n</code></pre> <pre><code>const val fooBar = \"FOO-BAR\" // By definition deeply immutable\n\nvar FOO2: Foo = Foo() // By definition not immutable\n\nclass Bar {\n    val FOO_BAR = \"FOO-BAR\" // Class properties always start with lowercase, const is not allowed\n\n    // Incomplete backing property as public property 'elementList1' is missing\n    private val _elementList1 = mutableListOf&lt;Element&gt;()\n\n    // Invalid backing property as '_elementList2' is not a private property\n    val _elementList2 = mutableListOf&lt;Element&gt;()\n    val elementList2: List&lt;Element&gt;\n        get() = _elementList2\n}\n</code></pre> <p>This rule is suppressed whenever the IntelliJ IDEA inspection suppression <code>PropertyName</code>, <code>ConstPropertyName</code>, <code>ObjectPropertyName</code> or <code>PrivatePropertyName</code> is used.</p> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_property_naming_constant_naming</code>The naming style ('screaming_snake_case', or 'pascal_case') to be applied on constant properties. <code>screaming_snake_case</code> <code>screaming_snake_case</code> <code>screaming_snake_case</code> <p>Note</p> <p>When using Compose, you might want to configure the <code>ktlint_property_naming_constant_naming-naming</code> rule with <code>.editorconfig</code> property <code>ktlint_property_naming_constant_naming = pascal_case</code>.</p> <p>Rule id: <code>standard:property-naming</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:property-naming\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-naming = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-naming = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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 :\n    Foo,\n    Bar {\n    // body\n}\n</code></pre> <pre><code>class FooBar :\n\n    Foo,\n\n    Bar\n\n{\n    // body\n}\n</code></pre> <p>Type argument list</p>  Ktlint Disallowed <pre><code>val foobar: FooBar&lt;\n    Foo,\n    Bar,\n    &gt; = FooBar(Foo(), Bar())\n</code></pre> <pre><code>val foobar: FooBar&lt;\n\n    Foo,\n\n    Bar,\n\n    &gt; = FooBar(Foo(), Bar())\n</code></pre> <p>Type constraint list</p>  Ktlint Disallowed <pre><code>class BiAdapter&lt;C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2&gt;(\n    val adapter1: A1,\n    val adapter2: A2,\n) : RecyclerView.Adapter&lt;C&gt;()\n    where A1 : RecyclerView.Adapter&lt;V1&gt;, A1 : ComposableAdapter.ViewTypeProvider,\n          A2 : RecyclerView.Adapter&lt;V2&gt;, A2 : ComposableAdapter.ViewTypeProvider {\n    // body\n}\n</code></pre> <pre><code>class BiAdapter&lt;C : RecyclerView.ViewHolder, V1 : C, V2 : C, out A1, out A2&gt;(\n    val adapter1: A1,\n    val adapter2: A2\n) : RecyclerView.Adapter&lt;C&gt;()\n    where\n          A1 : RecyclerView.Adapter&lt;V1&gt;, A1 : ComposableAdapter.ViewTypeProvider,\n\n          A2 : RecyclerView.Adapter&lt;V2&gt;, A2 : ComposableAdapter.ViewTypeProvider\n{\n    // body\n}\n</code></pre> <p>Type parameter list</p>  Ktlint Disallowed <pre><code>fun &lt;\n    Foo,\n    Bar,\n    &gt; foobar()\n</code></pre> <pre><code>fun &lt;\n\n    Foo,\n\n    Bar,\n\n    &gt; foobar()\n</code></pre> <p>Value argument list</p>  Ktlint Disallowed <pre><code>val foobar =\n    foobar(\n        \"foo\",\n        \"bar\",\n    )\n</code></pre> <pre><code>val foobar = \n    foobar(\n\n      \"foo\",\n\n      \"bar\",\n\n  )\n</code></pre> <p>Value parameter list</p>  Ktlint Disallowed <pre><code>fun foobar(\n    foo: String,\n    bar: String,\n)\n</code></pre> <pre><code>fun foobar(\n\n    foo: String,\n\n    bar: String,\n\n)\n</code></pre> <p>Rule id: <code>standard:no-blank-line-in-list</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-line-in-list\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-in-list = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-in-list = disabled\n</code></pre></li> </ol> <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/standard/#no-consecutive-comments","title":"No consecutive comments","text":"<p>Consecutive comments are disallowed in following cases:</p> <ul> <li> <p>Any mix of a consecutive kdoc, a block comment or an EOL comment unless separated by a blank line in between</p> </li> <li> <p>Consecutive KDocs (even when separated by a blank line)</p> </li> <li> <p>Consecutive block comments (even when separated by a blank line)</p> </li> </ul> <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\n// Different comment types (including KDoc) may be consecutive ..\n\n/*\n * ... but do need to be separated by a blank line ...\n */\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\n/**\n  * A KDoc can not be followed by a block comment or an EOL comment or another KDOC\n  */\n\n// ... even not when separated by a new line.\n</code></pre> <p>Rule id: <code>standard:no-consecutive-comments</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-consecutive-comments\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-comments = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-comments = disabled\n</code></pre></li> </ol> <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/standard/#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>standard:no-empty-file</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-file\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-file = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-file = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-empty-first-line-at-start-in-class-body","title":"No empty first line at start in class body","text":"<p>Detect blank lines at the start of a class body.</p>  Ktlint Disallowed <pre><code>class Foo {\n    val foo = \"foo\"\n}\n</code></pre> <pre><code>class Foo {\n\n    val foo = \"foo\"\n}\n</code></pre> <p>Rule id: <code>standard:no-empty-first-line-in-class-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-first-line-in-class-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-class-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-class-body = disabled\n</code></pre></li> </ol> <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/standard/#no-single-line-block-comment","title":"No single line block comment","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>standard:no-single-line-block-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-single-line-block-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-single-line-block-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-single-line-block-comment = disabled\n</code></pre></li> </ol>"},{"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\")\n\nclass FooBar {\n    @Suppress(\"ktlint:standard:max-line-length\")\n    val foo = \"some longggggggggggggggggggg text\"\n\n    fun bar() =\n        @Suppress(\"ktlint:standard:no-multi-spaces\")\n        listOf(\n            \"1   One\", \n            \"10  Ten\", \n            \"100 Hundred\", \n        )\n}\n</code></pre> <pre><code>/* ktlint-disable standard:no-wildcard-imports */\n\nclass FooBar {\n    val foo = \"some longggggggggggggggggggg text\" // ktlint-disable standard:max-line-length\n\n    fun bar() =\n        listOf(\n            /* ktlint-disable standard:no-multi-spaces */\n            \"1   One\", \n            \"10  Ten\", \n            \"100 Hundred\", \n            /* ktlint-enable standard:no-multi-spaces */\n        )\n}\n</code></pre> <p>Rule id: <code>standard:ktlint-suppression</code></p> <p>Note</p> <p>This rule cannot be suppressed via <code>@Suppress</code> or 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 maximum length of a line as specified in <code>.editorconfig</code> property <code>max_line_length</code>.</p> <p>This rule does not apply in a number of situations. 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\n\nval foo1 =\n    \"\"\"\n    fooooooooooooooooooooooooooooooooooooooooo\n    \"\"\"\n\nval foo2 =\n    \"fooooooooooooooooooooooooooooooooooooooo\"\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 foo = \"foo\" + \"ooooooooooooooooooooooooooo\"\nval foooooooooooooo = \"foooooooooooooooooooo\" // some comment\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_ignore_back_ticked_identifier</code>Defines whether the backticked identifier (``) should be ignored. <code>false</code> <code>false</code> <code>false</code> <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:max-line-length</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:max-line-length\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_max-line-length = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_max-line-length = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#modifier-order","title":"Modifier order","text":"<p>Requires consistent order of modifiers.</p>  Ktlint Disallowed <pre><code>abstract class A {\n    protected open val v = \"\"\n\n    internal open suspend fun f(v: Any): Any = \"\"\n\n    protected lateinit var lv: String\n}\n</code></pre> <pre><code>abstract class A {\n    open protected val v = \"\"\n\n    open suspend internal fun f(v: Any): Any = \"\"\n\n    lateinit protected var lv: String\n}\n</code></pre> <p>Rule id: <code>standard:modifier-order</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:modifier-order\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-order = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-order = disabled\n</code></pre></li> </ol>"},{"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 =\n    if (true) {\n        return 0\n    } else {\n        return 1\n    }\n</code></pre> <pre><code>val foo =\n    if (true)\n        return 0\n    else\n        return 1\n</code></pre> <p>Rule id: <code>standard:multiline-if-else</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-if-else\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-if-else = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-if-else = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#multiline-loop","title":"Multiline loop","text":"<p>Braces required for multiline for, while, and do statements.</p>  Ktlint Disallowed <pre><code>for (i in 1..10) {\n    println(i)\n}\n</code></pre> <pre><code>for (i in 1..10)\n    println(i)\n</code></pre> <p>Rule id: <code>standard:multiline-loop</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-loop\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-loop = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-loop = disabled\n</code></pre></li> </ol>"},{"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() {\n    fun a() {\n    }\n\n    fun b()\n}\n</code></pre> <pre><code>fun main() {\n    fun a() {\n\n    }\n    fun b()\n\n}\n</code></pre> <p>Rule id: <code>standard:no-blank-line-before-rbrace</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-line-before-rbrace\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-before-rbrace = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-line-before-rbrace = disabled\n</code></pre></li> </ol>"},{"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) {\n    inputText\n        .lowercase(Locale.getDefault())\n}\n</code></pre> <pre><code>fun foo(inputText: String) {\n    inputText\n\n        .lowercase(Locale.getDefault())\n}\n</code></pre> <p>Rule id: <code>standard:no-blank-lines-in-chained-method-calls</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-blank-lines-in-chained-method-calls\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-lines-in-chained-method-calls = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-blank-lines-in-chained-method-calls = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-consecutive-blank-lines","title":"No consecutive blank lines","text":"Ktlint Disallowed <pre><code>package com.test\n\nimport com.test.util\n\nval a = \"a\"\n\nfun b() {\n}\n\nfun c()\n</code></pre> <pre><code>package com.test\n\n\nimport com.test.util\n\n\nval a = \"a\"\n\n\nfun b() {\n}\n\n\nfun c()\n</code></pre> <p>Rule id: <code>standard:no-consecutive-blank-lines</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-consecutive-blank-lines\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-blank-lines = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-consecutive-blank-lines = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-empty-class-bodies","title":"No empty (<code>{}</code>) class bodies","text":"Ktlint Disallowed <pre><code>class C\n\ndata class DC(val v: Any)\n\ninterface I\n\nobject O\n</code></pre> <pre><code>class C {}\n\ndata class DC(val v: Any) { }\n\ninterface I {\n}\n\nobject O{}\n</code></pre> <p>Rule id: <code>standard:no-empty-class-body</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-class-body\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-class-body = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-class-body = disabled\n</code></pre></li> </ol>"},{"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() {\n   val a = 2\n}\n</code></pre> <pre><code>fun bar() {\n\n   val a = 2\n}\n</code></pre> <p>Rule id: <code>standard:no-empty-first-line-in-method-block</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-empty-first-line-in-method-block\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-method-block = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-empty-first-line-in-method-block = disabled\n</code></pre></li> </ol>"},{"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() {\n    if (conditionA()) {\n        doSomething()\n    } else if (conditionB()) {\n        doAnotherThing()\n    }\n}\n</code></pre> <pre><code>fun funA() {\n    if (conditionA()) {\n        doSomething()\n    } else\n    if (conditionB()) {\n        doAnotherThing()\n    }\n}\n</code></pre> <p>Rule id: <code>standard:no-line-break-after-else</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-line-break-after-else\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-after-else = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-after-else = disabled\n</code></pre></li> </ol>"},{"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>standard:no-line-break-before-assignment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-line-break-before-assignment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-before-assignment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-line-break-before-assignment = disabled\n</code></pre></li> </ol>"},{"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() {\n    x(1, 3)\n}\n</code></pre> <pre><code>fun  main()  {\n    x(1,  3)\n}\n</code></pre> <p>Rule id: <code>standard:no-multi-spaces</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-multi-spaces\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-multi-spaces = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-multi-spaces = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-semicolons","title":"No semicolons","text":"<p>Avoid using unnecessary semicolons.</p>  Ktlint Disallowed <pre><code>fun foo() {\n    bar()\n\n    bar()\n}\n</code></pre> <pre><code>fun foo() {\n    ;\n    bar()\n    ;\n\n    bar()\n\n    ;\n}\n</code></pre> <p>Rule id: <code>standard:no-semi</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-semi\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-semi = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-semi = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-trailing-whitespaces","title":"No trailing whitespaces","text":"<p>Rule id: <code>standard:no-trailing-spaces</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-trailing-spaces\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-trailing-spaces = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-trailing-spaces = disabled\n</code></pre></li> </ol>"},{"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.</p>  Ktlint Disallowed <pre><code>fun fn() {}\n</code></pre> <pre><code>fun fn(): Unit {}\n</code></pre> <p>Rule id: <code>standard:no-unit-return</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-unit-return\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unit-return = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unit-return = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-unused-imports","title":"No unused imports","text":"<p>Important</p> <p>Starting from KtLint <code>1.7.0</code> this rule no longer runs by default. In some cases the rule marks imports as unused, while after removal of the import the code no longer compiles. This rule will be removed in KtLint <code>2.0</code>. See issue for more background.  If you insist on running the rule despite its shortcomings, you need to enable the rule in the <code>.editorconfig</code> by adding: <pre><code>ktlint_standard_no-unused-imports = enabled\n</code></pre></p> <p>Rule id: <code>standard:no-unused-imports</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-unused-imports\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unused-imports = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-unused-imports = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#no-wildcard-imports","title":"No wildcard imports","text":"<p>No wildcard imports except whitelisted imports.</p>  Ktlint Disallowed <pre><code>import foobar.Bar\nimport foobar.Foo\n</code></pre> <pre><code>import foobar.*\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_packages_to_use_import_on_demand</code>Defines allowed wildcard imports as a comma separated list. - <code>java.util.*,</code><code>kotlinx.android.synthetic.**</code> <code>java.util.*,</code><code>kotlinx.android.synthetic.**</code> <p>Warning</p> <p>In case property <code>ij_kotlin_packages_to_use_import_on_demand</code> is not explicitly set, Intellij IDEA allows wildcards imports like <code>java.util.*</code> which lead to conflicts with the <code>no-wildcard-imports</code> rule. See Intellij IDEA configuration to prevent such conflicts.</p> <p>Rule id: <code>standard:no-wildcard-imports</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:no-wildcard-imports\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-wildcard-imports = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_no-wildcard-imports = disabled\n</code></pre></li> </ol>"},{"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&lt;Int, String&gt; = mapOf()\nval b: Map&lt;Int, String&gt; = mapOf()\nval c: Map&lt;Int, String&gt; = mapOf()\n</code></pre> <pre><code>val a: Map&lt; Int, String&gt; = mapOf()\nval b: Map&lt;Int, String &gt; = mapOf()\nval c: Map &lt;Int, String&gt; = mapOf()\n</code></pre> <p>Rule id: <code>standard:spacing-around-angle-brackets</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-around-angle-brackets\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-around-angle-brackets = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-around-angle-brackets = disabled\n</code></pre></li> </ol>"},{"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/**\n * block comment\n */\n@Foo @Bar\nclass FooBar {\n}\n</code></pre> <pre><code>@JvmField\n\nfun foo() {}\n\n@Foo @Bar\n/**\n * block comment\n */\nclass FooBar {\n}\n</code></pre> <p>Rule id: <code>standard:annotation-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:annotation-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_annotation-spacing = disabled\n</code></pre></li> </ol>"},{"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\n@Bar\nfun b()\n</code></pre> <pre><code>fun a()\n@Bar\nfun b()\n</code></pre> <p>Rule id: <code>standard:spacing-between-declarations-with-annotations</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-declarations-with-annotations\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-annotations = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-annotations = disabled\n</code></pre></li> </ol>"},{"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/*\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>standard:spacing-between-declarations-with-comments</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-declarations-with-comments\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-comments = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-declarations-with-comments = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#colon-spacing","title":"Colon spacing","text":"<p>Consistent spacing around colon.</p>  Ktlint Disallowed <pre><code>class A : B\n\nclass A2 : B2\n</code></pre> <pre><code>class A:B\n\nclass A2  :  B2\n</code></pre> <p>Rule id: <code>standard:colon-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:colon-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_colon-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_colon-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:comma-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comma-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comma-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comma-spacing = disabled\n</code></pre></li> </ol>"},{"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\n\nfun main() {\n    System.out.println(\n        // comment\n        \"test\",\n    )\n} // comment\n</code></pre> <pre><code>//comment\nvar debugging = false// comment\nvar debugging = false //comment\nvar debugging = false//comment\n\nfun main() {\n    System.out.println(\n         //123\n        \"test\"\n    )\n}//comment\n</code></pre> <p>Rule id: <code>standard:comment-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comment-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#curly-spacing","title":"Curly spacing","text":"<p>Consistent spacing around curly braces.</p>  Ktlint Disallowed <pre><code>val foo = bar { foo() }\n</code></pre> <pre><code>val foo = bar{foo()}\n</code></pre> <p>Rule id: <code>standard:curly-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:curly-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_curly-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_curly-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:dot-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:dot-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_dot-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_dot-spacing = disabled\n</code></pre></li> </ol>"},{"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::\n    class\n</code></pre> <p>Rule id: <code>standard:double-colon-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:double-colon-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_double-colon-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_double-colon-spacing = disabled\n</code></pre></li> </ol>"},{"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\"\n\nfun foo2():  String = \"some-result\"\n\nfun foo3():String = \"some-result\"\n\nfun foo4():\n    String = \"some-result\"\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:function-return-type-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-return-type-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-return-type-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-return-type-spacing = disabled\n</code></pre></li> </ol>"},{"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>// In case `ktlint_function_signature_body_expression_wrapping` is set to `default` or `multiline`\nfun foo1() = \"some-result\"\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `always`\nfun foo2() =\n    \"some-result\"\n\nfun foo3() {\n    // do something\n}\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `default` or `multiline`\nfun bar1(): String = \"some-result\"\n\n// In case `ktlint_function_signature_body_expression_wrapping` is set to `always`\nfun bar2(): String =\n    \"some-result\"\n\nfun bar3(): String {\n    doSomething()\n    return \"some-result\"\n}\n</code></pre> <pre><code>fun foo1()= \"some-result\"\n\nfun foo2()\n    = \"some-result\"\n\nfun foo3()\n{\n    // do something\n}\n\nfun bar1(): String= \"some-result\"\n\nfun bar2(): String\n    = \"some-result\"\n\nfun bar3(): String\n{\n    return \"some-result\"\n}\n</code></pre> <p>Rule id: <code>standard:function-start-of-body-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-start-of-body-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-start-of-body-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-start-of-body-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:function-type-reference-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:function-type-reference-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-reference-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_function-type-reference-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:fun-keyword-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:fun-keyword-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_fun-keyword-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_fun-keyword-spacing = disabled\n</code></pre></li> </ol>"},{"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>standard:kdoc-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:kdoc-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_kdoc-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#keyword-spacing","title":"Keyword spacing","text":"<p>Requires consistent spacing around keywords.</p>  Ktlint Disallowed <pre><code>fun main() {\n    if (true) {\n        doSomething()\n    }\n}\n</code></pre> <pre><code>fun main() {\n    if(true) {\n        doSomething()\n    }\n}\n</code></pre> <p>Rule id: <code>standard:keyword-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:keyword-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_keyword-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_keyword-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#modifier-list-spacing","title":"Modifier list spacing","text":"<p>Requires consistent spacing between modifiers in and after the last modifier in a modifier list.</p>  Ktlint Disallowed <pre><code>abstract class Foo {\n    protected abstract suspend fun execute()\n}\n</code></pre> <pre><code>abstract  class Foo {\n    protected  abstract  suspend  fun execute()\n}\nabstract\nclass Foo {\n    protected\n    abstract\n    suspend\n    fun execute()\n}\n</code></pre> <p>Rule id: <code>standard:modifier-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:modifier-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_modifier-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#nullable-type-spacing","title":"Nullable type spacing","text":"<p>Disallows spaces in a nullable type.</p>  Ktlint Disallowed <pre><code>val foo: String? = null\nval foo: List&lt;String?&gt; = listOf(null)\n</code></pre> <pre><code>val foo: String ? = null\nval foo: List&lt;String ?&gt; = listOf(null)\n</code></pre> <p>Rule id: <code>standard:nullable-type-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:nullable-type-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_nullable-type-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_nullable-type-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#operator-spacing","title":"Operator spacing","text":"<p>Requires 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>standard:op-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:op-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_op-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_op-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#parameter-list-spacing","title":"Parameter list spacing","text":"<p>Requires consistent spacing inside the parameter list.</p>  Ktlint Disallowed <pre><code>fun foo(a: Any) = \"some-result\"\n\nfun foo() = \"some-result\"\n</code></pre> <pre><code>fun foo( a : Any ) = \"some-result\"\nfun foo(\n) = \"some-result\"\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:parameter-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#parenthesis-spacing","title":"Parenthesis spacing","text":"<p>Requires consistent spacing around parenthesis.</p>  Ktlint Disallowed <pre><code>class Foo : Bar {\n    constructor(string: String) : super()\n}\n\nval foo1 = ((1 + 2) / 3)\n</code></pre> <pre><code>class Foo : Bar {\n    constructor(string: String) : super ()\n}\n\nval foo1 = ( (1 + 2 ) / 3)\n</code></pre> <p>Rule id: <code>standard:paren-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:paren-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_paren-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_paren-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#range-spacing","title":"Range spacing","text":"<p>Requires 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>standard:range-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:range-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_range-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_range-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#spacing-between-function-name-and-opening-parenthesis","title":"Spacing between function name and opening parenthesis","text":"<p>Requires 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>standard:spacing-between-function-name-and-opening-parenthesis</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:spacing-between-function-name-and-opening-parenthesis\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-function-name-and-opening-parenthesis = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_spacing-between-function-name-and-opening-parenthesis = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#then-spacing","title":"Then spacing","text":"<p>Enforces consistent spacing around the <code>then</code> block in an <code>if</code>-statement.</p>  Ktlint Disallowed <pre><code>fun foo() {\n    if (true) true\n    if (true) (0) else (1)\n    if (true) print(0) else (1)\n}\n</code></pre> <pre><code>fun foo() {\n    if (true)true\n    if (true)(0)else (1)\n    if (true)print(0)else (1)\n}\n</code></pre> <p>Rule id: <code>standard:then-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:then-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_then-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_then-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#try-catch-finally-spacing","title":"Try catch finally spacing","text":"<p>Enforces consistent spacing in <code>try { .. } catch { .. } finally { .. }</code>.</p>  Ktlint Disallowed <pre><code>fun foo() =\n    try {\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() = \n    try {\n        // do something\n    }\n    catch (exception: Exception) {\n        // handle exception\n    }\n    finally {\n        // clean up\n    }\n</code></pre> <p>Rule id: <code>standard:try-catch-finally-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:try-catch-finally-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_try-catch-finally-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_try-catch-finally-spacing = disabled\n</code></pre></li> </ol> <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/standard/#type-argument-list-spacing","title":"Type argument list spacing","text":"<p>Disallows spacing before and after the angle brackets of a type argument list.</p>  Ktlint Disallowed <pre><code>val res = ArrayList&lt;LintError&gt;()\n\nclass B&lt;T&gt; : A&lt;T&gt;() {\n    override fun x() = super&lt;A&gt;.x()\n}\n</code></pre> <pre><code>val res = ArrayList &lt; LintError &gt; ()\n\nclass B&lt;T&gt; : A&lt; T &gt;() {\n    override fun x() = super&lt; A &gt;.x()\n}\n</code></pre> <p>Rule id: <code>standard:type-argument-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-argument-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-parameter-list-spacing","title":"Type parameter list spacing","text":"<p>Disallows spacing after a type parameter list in function and class declarations.</p>  Ktlint Disallowed <pre><code>fun &lt;T&gt; foo1(t: T) = \"some-result\"\n\nfun &lt;T&gt; foo2(t: T) = \"some-result\"\n\nfun &lt;T&gt; foo3(t: T) = \"some-result\"\n</code></pre> <pre><code>fun&lt;T&gt; foo1(t: T) = \"some-result\"\n\nfun &lt;T&gt;foo2(t: T) = \"some-result\"\n\nfun&lt;T&gt;foo3(t: T) = \"some-result\"\n</code></pre> <p>Rule id: <code>standard:type-parameter-list-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-parameter-list-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-list-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-list-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#unary-operator-spacing","title":"Unary operator spacing","text":"<p>Disallows spaces around unary operators.</p>  Ktlint Disallowed <pre><code>fun foo1(i: Int) = i++\n\nfun foo2(i: Int) = ++i\n\nfun foo3(i: Int) = ++i\n</code></pre> <pre><code>fun foo1(i: Int) = i ++\n\nfun foo2(i: Int) = ++ i\n\nfun foo3(i: Int) = ++\n    i\n</code></pre> <p>Rule id: <code>standard:unary-op-spacing</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:unary-op-spacing\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unary-op-spacing = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unary-op-spacing = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#string-template","title":"String template","text":"<p>Enforces 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>standard:string-template</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:string-template\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#string-template-indent","title":"String template indent","text":"<p>Enforces 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()\n\nfun foo() {\n    // The opening \"\"\" can not be wrapped to next line as that would result in a compilation error\n    return \"\"\"\n        line1\n        line2\n        \"\"\".trimIndent()\n}\n</code></pre> <pre><code>val foo = \"\"\"\n          line1\n          line2\n          \"\"\".trimIndent()\n\nfun foo() {\n    return \"\"\"\n        line1\n        line2\n    \"\"\".trimIndent()\n}\n</code></pre> <p>Rule id: <code>standard:string-template-indent</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:string-template-indent\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template-indent = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_string-template-indent = disabled\n</code></pre></li> </ol> <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/standard/#trailing-comma-on-call-site","title":"Trailing comma on call site","text":"<p>Enforces consistent removal (default) or adding of trailing commas on call site.</p>  Ktlint Disallowed <pre><code>val foo =\n    FooWrapper(\n        Foo(\n            a = 3,\n            b = 4,\n        ),\n    )\n</code></pre> <pre><code>val foo =\n    FooWrapper(Foo(\n        a = 3,\n        b = 4,\n    ),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_allow_trailing_comma_on_call_site</code>Defines whether a trailing comma (or no trailing comma) should be enforced on the calling site, e.g. argument-list, when-entries, lambda-arguments, indices, etc. When set, IntelliJ IDEA uses this property to allow usage of a trailing comma by discretion of the developer. KtLint however uses this setting to enforce consistent usage of the trailing comma when set. <code>true</code> <code>true</code> <code>false</code> <p>Note</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>KtLint values consistent formatting more than a per-situation decision, and therefore uses this setting to enforce/disallow usage of trailing comma's on the calling site.</p> <p>Rule id: <code>standard:trailing-comma-on-call-site</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:trailing-comma-on-call-site\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-call-site = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-call-site = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#trailing-comma-on-declaration-site","title":"Trailing comma on declaration site","text":"<p>Enforces consistent removal (default) or adding of trailing commas on declaration site.</p>  Ktlint Disallowed <pre><code>class FooWrapper(\n    val foo = Foo(\n        a = 3,\n        b = 4,\n    ),\n)\n</code></pre> <pre><code>class FooWrapper(val foo = Foo(\n    a = 3,\n    b = 4,\n),) // it's weird to insert \",\" between unwrapped (continued) parenthesis\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ij_kotlin_allow_trailing_comma</code>Defines whether a trailing comma (or no trailing comma) should be enforced on the defining site, e.g. parameter-list, type-argument-list, lambda-value-parameters, enum-entries, etc. When set, IntelliJ IDEA uses this property to allow usage of a trailing comma by discretion of the developer. KtLint however uses this setting to enforce consistent usage of the trailing comma when set. <code>true</code> <code>true</code> <code>false</code> <p>Note</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>KtLint values consistent formatting more than a per-situation decision, and therefore uses this setting to enforce/disallow usage of trailing comma's in declarations.</p> <p>Rule id: <code>standard:trailing-comma-on-declaration-site</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:trailing-comma-on-declaration-site\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-declaration-site = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_trailing-comma-on-declaration-site = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-argument-comment","title":"Type argument comment","text":"<p>Disallows comments to be placed at certain locations inside a type argument.</p>  Ktlint Disallowed <pre><code>fun Foo&lt;\n    /* some comment */ \n    out Any\n    &gt;.foo() {}\nfun Foo&lt;\n    // some comment \n    out Any\n    &gt;.foo() {}\n</code></pre> <pre><code>fun Foo&lt;out /* some comment */ Any&gt;.foo() {}\nfun Foo&lt;\n    out Any, // some comment\n    &gt;.foo() {}\n</code></pre> <p>Note</p> <p>In some projects it is an accepted practice to use EOL comments to document the parameter before the comma as is shown below: <pre><code>fun Foo&lt;\n    out Bar1, // some comment\n    out Bar2, // some other comment\n&gt;.foo() {}\n</code></pre> Although this code sample might look ok, it is semantically and programmatically unclear to which type <code>some comment</code> refers. From the developer perspective it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p> <p>Rule id: <code>standard:type-argument-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:type-argument-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-argument-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#type-parameter-comment","title":"Type parameter comment","text":"<p>Disallows comments to be placed at certain locations inside a type parameter.</p>  Ktlint Disallowed <pre><code>class Foo1&lt;\n    /* some comment */ \n    out Bar\n    &gt;\nclass Foo2&lt;\n    // some comment \n    out Bar\n    &gt;\n</code></pre> <pre><code>class Foo1&lt;in /* some comment */ Bar&gt;\nclass Foo2&lt;\n    in Bar, // some comment\n    &gt;\n</code></pre> <p>Note</p> <p>In some projects, it is an accepted practice to use EOL comments to document the parameter before the comma as is shown below: <pre><code>class Foo&lt;\n    out Bar1, // some comment\n    out Bar2, // some other comment\n&gt;\n</code></pre></p> <p>Although this code sample might look ok, it is semantically and programmatically unclear on which parameter <code>some comment</code> refers. From the developer perspective, it might be clear that it belongs to type <code>Bar1</code>. From the parsers perspective, it does belong to type <code>Bar2</code>.</p> <p>Rule id: <code>standard:type-parameter-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:type-parameter-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_type-parameter-comment = disabled\n</code></pre></li> </ol>"},{"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>val foo = \"some-string\".count { it == '-' }\n</code></pre> <pre><code>val foo = \"some-string\".count() { it == '-' }\n</code></pre> <p>Rule id: <code>standard:unnecessary-parentheses-before-trailing-lambda</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:unnecessary-parentheses-before-trailing-lambda\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#value-argument-comment","title":"Value argument comment","text":"<p>Disallows comments to be placed at certain locations inside a value argument.</p>  Ktlint Disallowed <pre><code>val foo1 =\n    foo(\n        /* some comment */\n        bar = \"bar\"\n    )\nval foo2 =\n    foo(\n        // some comment\n        bar = \"bar\"\n    )\n</code></pre> <pre><code>val foo1 = foo(bar /* some comment */ = \"bar\")\nval foo2 = \n    foo(\n        bar = // some comment\n            \"bar\"\n    )\n</code></pre> <p>Rule id: <code>standard:value-argument-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:value-argument-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-argument-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-argument-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#value-parameter-comment","title":"Value parameter comment","text":"<p>Disallows comments to be placed at certain locations inside a value argument.</p>  Ktlint Disallowed <pre><code>class Foo1(\n    /** some kdoc */\n    bar = \"bar\"\n)\nclass Foo2(\n    /* some comment */\n    bar = \"bar\"\n)\nclass Foo3(\n    // some comment\n    bar = \"bar\"\n)\n</code></pre> <pre><code>class Foo1(\n   bar = /** some kdoc */ \"bar\"\n)\nclass Foo2(\n   bar = /* some comment */ \"bar\"\n)\nclass Foo3(\n    bar =\n       // some comment\n       \"bar\"\n)\n</code></pre> <p>Rule id: <code>standard:value-parameter-comment</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:value-parameter-comment\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-parameter-comment = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_value-parameter-comment = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#wrapping","title":"Wrapping","text":""},{"location":"rules/standard/#argument-list-wrapping","title":"Argument list wrapping","text":"<p>All arguments should either be on the same line, or on a separate line.</p>  Ktlint Disallowed <pre><code>val foo =\n    foo(\n        a,\n        b,\n        c,\n    )\n</code></pre> <pre><code>val foo =\n    foo(\n        a,\n        b, c,\n    )\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>ktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than</code> <code>unset</code> 8 8 <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:argument-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:argument-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_argument-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_argument-list-wrapping = disabled\n</code></pre></li> </ol>"},{"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 =\n    listOf(1, 2, 3)\n        .filter { it &gt; 2 }!!\n        .takeIf { it.count() &gt; 100 }\n        ?.sum()\nval foobar =\n    foo()\n        ?: bar\n</code></pre> <pre><code>val foo =\n    listOf(1, 2, 3).\n        filter { it &gt; 2 }!!.\n        takeIf { it.count() &gt; 100 }?.\n        sum()\nval foobar =\n    foo() ?:\n        bar\n</code></pre> <p>Rule id: <code>standard:chain-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:chain-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_chain-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#comment-wrapping","title":"Comment wrapping","text":"<p>A block comment must 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 */ } \n</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>standard:comment-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:comment-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_comment-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#context-receiver-wrapping","title":"Context receiver wrapping","text":"<p>Important</p> <p>Context receivers are deprecated starting from Kotlin 2.2.0 and will be removed in a future version. Once KtLint is upgraded to a Kotlin version that no longer supports context receivers, then you will not be able to use that KtLint version as long as your code still contains context receiver.</p> <p>Tip</p> <p>This rule does not affect context parameters. See rule <code>context-receiver-list-wrapping</code> for wrapping of context parameters.</p> <p>Wraps the context receiver list containing a context receiver 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\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\n    Fooooooooooooooooooo1,\n    Foooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n\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(\n    Foooooooooooooooo&lt;\n        Foo,\n        Bar,\n        &gt;\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(Foo) fun fooBar()\n\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(Fooooooooooooooooooo1, Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n\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&lt;Foo, Bar&gt;)\nfun fooBar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:context-receiver-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:context-receiver-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#context-receiver-list-wrapping","title":"Context receiver list wrapping","text":"<p>Tip</p> <p>This rule does not affect context receivers. See rule <code>context-receiver-wrapping</code> for wrapping of context receivers.</p> <p>Wraps the context receiver list containing a context parameter 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\n// Wrap each context receiver to a separate line when the\n// entire context receiver list does not fit on a single line\ncontext(\n    foo1: Fooooooooooooooooooo1,\n    foo2: Foooooooooooooooooooooooooooooo2\n)\nfun fooBar()\n\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(\n    _: Foooooooooooooooo&lt;\n        Foo,\n        Bar,\n        &gt;\n)\nfun fooBar()\n</code></pre> <pre><code>// Should be wrapped regardless of whether max line length is set\ncontext(_: Foo) fun fooBar()\n\n// Should be wrapped when the entire context receiver list does not\n// fit on a single line\ncontext(foo1: Fooooooooooooooooooo1, foo2: Foooooooooooooooooooooooooooooo2)\nfun fooBar()\n\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&lt;Foo, Bar&gt;)\nfun fooBar()\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:context-receiver-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:context-receiver-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_context-receiver-list-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#enum-wrapping","title":"Enum wrapping","text":"<p>Each individual enum entry should be on a separate line. Multiple enums cannot be on the same 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 }\n\nenum class Foo {\n    A,\n    B,\n    C,\n    D,\n    ;\n\n    fun foo() = \"foo\"\n}\n</code></pre> <pre><code>enum class Foo {\n    A,\n    B, C,\n    D\n}\n\nenum class Foo {\n    A;\n    fun foo() = \"foo\"\n}\n</code></pre> <p>Rule id: <code>standard:enum-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:enum-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_enum-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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() {\n    if (true) foo()\n    if (true) foo() else bar()\n}\n</code></pre> <pre><code>fun foobar() {\n    if (true) if (false) foo() else bar()\n    if (true) bar() else if (false) foo() else bar()\n    if (true) { foo() } else bar()\n    if (true) bar() else { if (false) foo() else bar() }\n}\n</code></pre> <p>Rule id: <code>standard:if-else-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:if-else-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_if-else-wrapping = disabled\n</code></pre></li> </ol> <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/standard/#multiline-expression-wrapping","title":"Multiline expression wrapping","text":"<p>Multiline expressions 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> <p>Setting <code>ktlint_function_signature_body_expression_wrapping</code> of the <code>function-signature</code> rule takes precedence when set to <code>default</code>. This setting keeps the first line of a multiline expression body on the same line as the end of function signature as long as the max line length is not exceeded. In that case, this rule does not wrap the multiline expression. </p>  Ktlint Disallowed <pre><code>val foo =\n    foo(\n        parameterName =\n            \"The quick brown fox \"\n                .plus(\"jumps \")\n                .plus(\"over the lazy dog\"),\n    )\n</code></pre> <pre><code>val foo = foo(\n    parameterName = \"The quick brown fox \"\n        .plus(\"jumps \")\n        .plus(\"over the lazy dog\"),\n)\n</code></pre> <p>Rule id: <code>standard:multiline-expression-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:multiline-expression-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-expression-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_multiline-expression-wrapping = disabled\n</code></pre></li> </ol> <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/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> <p>Note</p> <p>Wrapping of parameters is also influenced by the <code>function-signature</code> rule.</p>  Ktlint Disallowed (ktlint_official) Disallowed (non ktlint_official) <pre><code>// If `ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals\n// `unset` the parameters are not wrapped as long as they fit on a single line\nclass ClassA(paramA: String, paramB: String, paramC: String)\n\nclass ClassA(\n    paramA: String,\n    paramB: String,\n    paramC: String\n)\n\n// If `ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than` equals\n// `unset` the parameters are not wrapped as long as they fit on a single line\nfun f(a: Any, b: Any, c: Any)\n\nfun f(\n    a: Any,\n    b: Any,\n    c: Any\n)\n\nfun foo(\n    @Bar fooBar: FooBar\n)\n</code></pre> <pre><code>class ClassA(\n    paramA: String, paramB: String,\n    paramC: String\n)\n\nfun f(\n    a: Any,\n    b: Any, c: Any\n)\n\nfun foo(@Bar fooBar: FooBar)\n</code></pre> <pre><code>class ClassA(\n    paramA: String, paramB: String,\n    paramC: String\n)\n\nfun f(\n    a: Any,\n    b: Any, c: Any\n)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-list-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:parameter-list-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-list-wrapping = disabled\n</code></pre></li> </ol>"},{"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(\n    val fooooooooooooooooooooooooTooLong:\n        Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooTooLong:\n        Foo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Bar(\n    val fooooooooooooooooooooooooTooLong:\n    Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooTooLong:\n    Foo,\n)\n</code></pre> <pre><code>// Assume that the last allowed character is\n// at the X character on the right           X\nclass Bar(\n    val fooooooooooooooooooooooooTooLong: Foo,\n)\n\nfun bar(\n    fooooooooooooooooooooooooooooTooLong: Foo,\n)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:parameter-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:parameter-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_parameter-wrapping = disabled\n</code></pre></li> </ol>"},{"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:\n    String\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> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:property-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:property-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_property-wrapping = disabled\n</code></pre></li> </ol>"},{"location":"rules/standard/#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() {\n    if (true) {\n        // do something\n    }\n}\n\nclass A {\n    val a = 0\n    val b = 1\n}\n\nenum class FooBar1 { FOO, BAR }\n\nenum class FooBar2 {\n    FOO,\n    BAR,\n}\n</code></pre> <pre><code>fun foo() { if (true) {\n        // do something\n    }\n}\n\nclass A { val a = 0\n    val b = 1 }\n</code></pre> <p>Rule id: <code>standard:statement-wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:statement-wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_statement-wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_statement-wrapping = disabled\n</code></pre></li> </ol>"},{"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 foo =\n    foo(\n        a,\n        b,\n        c,\n    )\n</code></pre> <pre><code>val foo = foo(\n    a,\n    b,\n    c)\n</code></pre> Configuration setting ktlint_official intellij_idea android_studio <code>max_line_length</code>Maximum length of a (regular) line. This property is ignored in case the <code>max-line-length</code> rule is disabled, or when using Ktlint via a third party integration that does not provide this rule. 140 <code>off</code> <code>100</code> <p>Rule id: <code>standard:wrapping</code></p> <p>Suppress or disable rule (1)</p> <ol> <li>Suppress rule in code with annotation below:     <pre><code>@Suppress(\"ktlint:standard:wrapping\")\n</code></pre>    Enable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_wrapping = enabled\n</code></pre>    Disable rule via <code>.editorconfig</code> <pre><code>ktlint_standard_wrapping = disabled\n</code></pre></li> </ol>"}]}
\ No newline at end of file
diff --git a/dev-snapshot/sitemap.xml b/dev-snapshot/sitemap.xml
index 1d2fae2..8354273 100644
--- a/dev-snapshot/sitemap.xml
+++ b/dev-snapshot/sitemap.xml
@@ -2,106 +2,106 @@
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/faq/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/quick-start/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/readme/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/badge/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-integration/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-reporter/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/custom-rule-set/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/api/overview/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/code-of-conduct/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/guidelines/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/contributing/overview/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/install/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/install/cli/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/install/integrations/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/install/setup/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/install/snapshot-build/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/code-styles/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/configuration-intellij-idea/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/configuration-ktlint/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/dependencies/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/experimental/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
     <url>
          <loc>https://pinterest.github.io/ktlint/dev-snapshot/rules/standard/</loc>
-         <lastmod>2025-09-12</lastmod>
+         <lastmod>2025-09-14</lastmod>
     </url>
 </urlset>
\ No newline at end of file
diff --git a/dev-snapshot/sitemap.xml.gz b/dev-snapshot/sitemap.xml.gz
index dd69d57..e8180a1 100644
--- a/dev-snapshot/sitemap.xml.gz
+++ b/dev-snapshot/sitemap.xml.gz
Binary files differ