mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-29 02:51:12 +00:00
Deployed ac7fa1a to prerelease with MkDocs 1.6.0 and mike 2.1.1
This commit is contained in:
parent
3b36f2b485
commit
c389cf157a
@ -6452,14 +6452,16 @@ the values have the following properties:</p>
|
|||||||
</ul>
|
</ul>
|
||||||
<p>For example, the following configuration defines how two code formatters
|
<p>For example, the following configuration defines how two code formatters
|
||||||
(<code>clang-format</code> and <code>black</code>) will apply to three different file extensions
|
(<code>clang-format</code> and <code>black</code>) will apply to three different file extensions
|
||||||
(.cc, .h, and .py):</p>
|
(<code>.cc</code>, <code>.h</code>, and <code>.py</code>):</p>
|
||||||
<p>[fix.tools.clang-format]
|
<div class="highlight"><pre><span></span><code><span class="k">[fix.tools.clang-format]</span>
|
||||||
command = ["/usr/bin/clang-format", "--assume-filename=$path"]
|
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"/usr/bin/clang-format"</span><span class="p">,</span><span class="w"> </span><span class="s2">"--assume-filename=$path"</span><span class="p">]</span>
|
||||||
patterns = ["glob:'<strong>/*.cc'",
|
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"glob:'**/*.cc'"</span><span class="p">,</span>
|
||||||
"glob:'</strong>/*.h'"]</p>
|
<span class="w"> </span><span class="s2">"glob:'**/*.h'"</span><span class="p">]</span>
|
||||||
<p>[fix.tools.black]
|
|
||||||
command = ["/usr/bin/black", "-", "--stdin-filename=$path"]
|
<span class="k">[fix.tools.black]</span>
|
||||||
patterns = ["glob:'*<em>/</em>.py'"]</p>
|
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"/usr/bin/black"</span><span class="p">,</span><span class="w"> </span><span class="s2">"-"</span><span class="p">,</span><span class="w"> </span><span class="s2">"--stdin-filename=$path"</span><span class="p">]</span>
|
||||||
|
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"glob:'**/*.py'"</span><span class="p">]</span>
|
||||||
|
</code></pre></div>
|
||||||
<p>Execution order of tools that affect the same file is deterministic, but
|
<p>Execution order of tools that affect the same file is deterministic, but
|
||||||
currently unspecified, and may change between releases. If two tools affect
|
currently unspecified, and may change between releases. If two tools affect
|
||||||
the same file, the second tool to run will receive its input from the
|
the same file, the second tool to run will receive its input from the
|
||||||
@ -6468,8 +6470,9 @@ output of the first tool.</p>
|
|||||||
command that will affect all changed files in the specified revisions. For
|
command that will affect all changed files in the specified revisions. For
|
||||||
example, the following configuration would apply the Rust formatter to all
|
example, the following configuration would apply the Rust formatter to all
|
||||||
changed files (whether they are Rust files or not):</p>
|
changed files (whether they are Rust files or not):</p>
|
||||||
<p>[fix]
|
<div class="highlight"><pre><span></span><code><span class="k">[fix]</span>
|
||||||
tool-command = ["rustfmt", "--emit", "stdout"]</p>
|
<span class="n">tool-command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"rustfmt"</span><span class="p">,</span><span class="w"> </span><span class="s2">"--emit"</span><span class="p">,</span><span class="w"> </span><span class="s2">"stdout"</span><span class="p">]</span>
|
||||||
|
</code></pre></div>
|
||||||
<p>The tool defined by <code>tool-command</code> acts as if it was the first entry in
|
<p>The tool defined by <code>tool-command</code> acts as if it was the first entry in
|
||||||
<code>fix.tools</code>, and uses <code>pattern = "all()"``. Support for</code>tool-command`
|
<code>fix.tools</code>, and uses <code>pattern = "all()"``. Support for</code>tool-command`
|
||||||
will be removed in a future version.</p>
|
will be removed in a future version.</p>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user