Skip to content

Commit

Permalink
Deploy website
Browse files Browse the repository at this point in the history
Deploy website version based on 23f549c
  • Loading branch information
Docusaurus bot committed Aug 28, 2023
1 parent 3c4db20 commit 8982ca0
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ <h3><a class="anchor" aria-hidden="true" id="arch-linux"></a><a href="#arch-linu
scalafmt --version // should be 3.7.12
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="--help"></a><a href="#--help" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>--help</h3>
<pre><code class="hljs">build commit: <span class="hljs-number">1e2</span>d9b89563dd72bd8e07f3f61ffad0c93c98e1a
build time: Mon Aug <span class="hljs-number">28</span> <span class="hljs-number">17</span>:<span class="hljs-number">47</span>:<span class="hljs-number">06</span> UTC <span class="hljs-number">2023</span>
<pre><code class="hljs">build commit: <span class="hljs-number">23f</span>549c4d2cabfea5e83218426155ce8d7efeb21
build time: Mon Aug <span class="hljs-number">28</span> <span class="hljs-number">17</span>:<span class="hljs-number">59</span>:<span class="hljs-number">41</span> UTC <span class="hljs-number">2023</span>
</code></pre>
<pre><code class="hljs">scalafmt 3.7.12+16-1e2d9b89-SNAPSHOT
<pre><code class="hljs">scalafmt 3.7.12+17-23f549c4-SNAPSHOT
Usage: scalafmt [options] [&lt;<span class="hljs-keyword">file</span>&gt;...]

-<span class="hljs-keyword">h</span>, --<span class="hljs-keyword">help</span> prints this usage text
Expand Down Expand Up @@ -539,6 +539,30 @@ <h3><a class="anchor" aria-hidden="true" id="project-filters"></a><a href="#proj
<code>withRespectExcludeFilters(false)</code> to disable this behavior.</p>
<pre><code class="hljs css language-scala"><span class="hljs-keyword">val</span> scalafmtThatIgnoresProjectSettings = scalafmt.withRespectProjectFilters(<span class="hljs-literal">false</span>)
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="alternate-repositories-and-credentials"></a><a href="#alternate-repositories-and-credentials" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Alternate repositories and credentials</h3>
<p><code>scalafmt</code> uses some default repositories to download the version specified in
<code>.scalafmt.conf</code>; these repositories could be hardcoded or potentially specified
via the environment variables.</p>
<p>In order to specify explicit repositories as well, one could use</p>
<pre><code class="hljs css language-scala"><span class="hljs-keyword">val</span> scalafmtWithRepos = scalafmt.withMavenRepositories(
<span class="hljs-string">"https://repo-1/snapshots"</span>,
<span class="hljs-string">"https://repo-2/public"</span>
)
</code></pre>
<p>In addition, if some of the default or custom repositories require access credentials,
they could be specified via</p>
<pre><code class="hljs css language-scala"><span class="hljs-keyword">import</span> org.scalafmt.interfaces._

<span class="hljs-keyword">val</span> scalafmtWithCreds = scalafmtWithRepos <span class="hljs-keyword">match</span> {
<span class="hljs-keyword">case</span> x: <span class="hljs-type">RepositoryCredential</span>.<span class="hljs-type">ScalafmtExtension</span> =&gt;
x.withRepositoryCredentials(
<span class="hljs-keyword">new</span> <span class="hljs-type">RepositoryCredential</span>(<span class="hljs-string">"repo-1"</span>, <span class="hljs-string">"username"</span>, <span class="hljs-string">"password"</span>)
)
<span class="hljs-keyword">case</span> x =&gt; x
}
</code></pre>
<p>This capability was added to the public interface as an extension method, accessible
via a separate sub-interface.</p>
<h3><a class="anchor" aria-hidden="true" id="clearing-resources"></a><a href="#clearing-resources" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Clearing resources</h3>
<p>Use the <code>clear()</code> method to clear up resources of the <code>scalafmt</code> instance.</p>
<pre><code class="hljs css language-scala">scalafmt.clear()
Expand Down Expand Up @@ -572,7 +596,7 @@ <h3><a class="anchor" aria-hidden="true" id="calling-from-java"></a><a href="#ca
<pre><code class="hljs css language-java">Scalafmt scalafmt = Scalafmt.create(scalafmtDynamic)
String formatted = scalafmt.format(config, file, <span class="hljs-string">"object A { }"</span>)
</code></pre>
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="/scalafmt/docs/configuration.html"><span>Configuration</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#intellij">IntelliJ</a><ul class="toc-headings"><li><a href="#format-current-file">Format current file</a></li><li><a href="#format-on-save">Format on save</a></li><li><a href="#resume-using-intellij-formatter">Resume using IntelliJ formatter</a></li></ul></li><li><a href="#vs-code">VS Code</a></li><li><a href="#vim">Vim</a></li><li><a href="#emacs">Emacs</a></li><li><a href="#sublime-text">Sublime Text</a></li><li><a href="#eclipse">Eclipse</a></li><li><a href="#metals">Metals</a></li><li><a href="#sbt">sbt</a><ul class="toc-headings"><li><a href="#task-keys">Task keys</a></li><li><a href="#settings">Settings</a></li><li><a href="#enable-integrationtest">Enable IntegrationTest</a></li><li><a href="#share-configuration-between-builds">Share configuration between builds</a></li><li><a href="#limit-parallelism">Limit parallelism</a></li></ul></li><li><a href="#cli">CLI</a><ul class="toc-headings"><li><a href="#coursier">Coursier</a></li><li><a href="#pre-release">Pre-release</a></li><li><a href="#native-image">Native image</a></li><li><a href="#nailgun">Nailgun</a></li><li><a href="#homebrew">Homebrew</a></li><li><a href="#arch-linux">Arch Linux</a></li><li><a href="#--help">--help</a></li><li><a href="#using-custom-repositories-with-cli">Using custom repositories with CLI</a></li></ul></li><li><a href="#gradle">Gradle</a></li><li><a href="#maven">Maven</a></li><li><a href="#mill">Mill</a></li><li><a href="#standalone-library">Standalone library</a><ul class="toc-headings"><li><a href="#binary-compatibility-guarantees">Binary compatibility guarantees</a></li><li><a href="#sbt-and-sc-files"><code>*.sbt</code> and <code>*.sc</code> files</a></li><li><a href="#version-handling">Version handling</a></li><li><a href="#error-reporting">Error reporting</a></li><li><a href="#project-filters">Project filters</a></li><li><a href="#clearing-resources">Clearing resources</a></li><li><a href="#calling-from-java">Calling from Java</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer" style="background-color:#A23244"><section class="sitemap"><a href="/scalafmt/" class="nav-home"><img src="/scalafmt/img/scalameta-logo.png" alt="Scalafmt" width="66" height="58"/></a><div><h5>Docs</h5><a href="
</span></div></article></div><div class="docs-prevnext"><a class="docs-next button" href="/scalafmt/docs/configuration.html"><span>Configuration</span><span class="arrow-next"></span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#intellij">IntelliJ</a><ul class="toc-headings"><li><a href="#format-current-file">Format current file</a></li><li><a href="#format-on-save">Format on save</a></li><li><a href="#resume-using-intellij-formatter">Resume using IntelliJ formatter</a></li></ul></li><li><a href="#vs-code">VS Code</a></li><li><a href="#vim">Vim</a></li><li><a href="#emacs">Emacs</a></li><li><a href="#sublime-text">Sublime Text</a></li><li><a href="#eclipse">Eclipse</a></li><li><a href="#metals">Metals</a></li><li><a href="#sbt">sbt</a><ul class="toc-headings"><li><a href="#task-keys">Task keys</a></li><li><a href="#settings">Settings</a></li><li><a href="#enable-integrationtest">Enable IntegrationTest</a></li><li><a href="#share-configuration-between-builds">Share configuration between builds</a></li><li><a href="#limit-parallelism">Limit parallelism</a></li></ul></li><li><a href="#cli">CLI</a><ul class="toc-headings"><li><a href="#coursier">Coursier</a></li><li><a href="#pre-release">Pre-release</a></li><li><a href="#native-image">Native image</a></li><li><a href="#nailgun">Nailgun</a></li><li><a href="#homebrew">Homebrew</a></li><li><a href="#arch-linux">Arch Linux</a></li><li><a href="#--help">--help</a></li><li><a href="#using-custom-repositories-with-cli">Using custom repositories with CLI</a></li></ul></li><li><a href="#gradle">Gradle</a></li><li><a href="#maven">Maven</a></li><li><a href="#mill">Mill</a></li><li><a href="#standalone-library">Standalone library</a><ul class="toc-headings"><li><a href="#binary-compatibility-guarantees">Binary compatibility guarantees</a></li><li><a href="#sbt-and-sc-files"><code>*.sbt</code> and <code>*.sc</code> files</a></li><li><a href="#version-handling">Version handling</a></li><li><a href="#error-reporting">Error reporting</a></li><li><a href="#project-filters">Project filters</a></li><li><a href="#alternate-repositories-and-credentials">Alternate repositories and credentials</a></li><li><a href="#clearing-resources">Clearing resources</a></li><li><a href="#calling-from-java">Calling from Java</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer" style="background-color:#A23244"><section class="sitemap"><a href="/scalafmt/" class="nav-home"><img src="/scalafmt/img/scalameta-logo.png" alt="Scalafmt" width="66" height="58"/></a><div><h5>Docs</h5><a href="
/scalafmt/docs/installation.html">Installation</a><a href="
/scalafmt/docs/configuration.html">Configuration</a><a href="
/scalafmt/docs/contributing-scalafmt.html">Contributing</a></div><div><h5>Community</h5><a href="https://gitter.im/scalameta/scalafmt" target="_blank">Chat on Gitter</a></div><div><h5>More</h5><a href="https://github.com/scalameta/scalafmt" target="_blank">GitHub</a></div></section><section class="copyright">Copyright © 2023 Scalafmt</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
Expand Down

0 comments on commit 8982ca0

Please sign in to comment.