commit | e16e63a563c466f7c92f172f853fe160f92636c0 | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Wed Oct 14 13:05:26 2020 -0700 |
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | Wed Oct 14 13:07:04 2020 -0700 |
tree | 46dfedf67311e080496e89a80f0b1cf2001d0b15 | |
parent | 80262b3a48156045846e31646b5598830561c383 [diff] |
Bump junit from 4.12 to 4.13.1 in /core (#63) Summary: Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/junit-team/junit4/releases">junit's releases</a>.</em></p> <blockquote> <h2>JUnit 4.13.1</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit/blob/HEAD/doc/ReleaseNotes4.13.1.md">release notes</a> for details.</p> <h2>JUnit 4.13</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit/blob/HEAD/doc/ReleaseNotes4.13.md">release notes</a> for details.</p> <h2>JUnit 4.13 RC 2</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit4/wiki/4.13-Release-Notes">release notes</a> for details.</p> <h2>JUnit 4.13 RC 1</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit4/wiki/4.13-Release-Notes">release notes</a> for details.</p> <h2>JUnit 4.13 Beta 3</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit4/wiki/4.13-Release-Notes">release notes</a> for details.</p> <h2>JUnit 4.13 Beta 2</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit4/wiki/4.13-Release-Notes">release notes</a> for details.</p> <h2>JUnit 4.13 Beta 1</h2> <p>Please refer to the <a href="https://github.com/junit-team/junit4/wiki/4.13-Release-Notes">release notes</a> for details.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/junit-team/junit4/commit/1b683f4ec07bcfa40149f086d32240f805487e66"><code>1b683f4</code></a> [maven-release-plugin] prepare release r4.13.1</li> <li><a href="https://github.com/junit-team/junit4/commit/ce6ce3aadc070db2902698fe0d3dc6729cd631f2"><code>ce6ce3a</code></a> Draft 4.13.1 release notes</li> <li><a href="https://github.com/junit-team/junit4/commit/c29dd8239d6b353e699397eb090a1fd27411fa24"><code>c29dd82</code></a> Change version to 4.13.1-SNAPSHOT</li> <li><a href="https://github.com/junit-team/junit4/commit/1d174861f0b64f97ab0722bb324a760bfb02f567"><code>1d17486</code></a> Add a link to assertThrows in exception testing</li> <li><a href="https://github.com/junit-team/junit4/commit/543905df72ff10364b94dda27552efebf3dd04e9"><code>543905d</code></a> Use separate line for annotation in Javadoc</li> <li><a href="https://github.com/junit-team/junit4/commit/510e906b391e7e46a346e1c852416dc7be934944"><code>510e906</code></a> Add sub headlines to class Javadoc</li> <li><a href="https://github.com/junit-team/junit4/commit/610155b8c22138329f0723eec22521627dbc52ae"><code>610155b</code></a> Merge pull request from GHSA-269g-pwp5-87pp</li> <li><a href="https://github.com/junit-team/junit4/commit/b6cfd1e3d736cc2106242a8be799615b472c7fec"><code>b6cfd1e</code></a> Explicitly wrap float parameter for consistency (<a href="https://github-redirect.dependabot.com/junit-team/junit4/issues/1671">#1671</a>)</li> <li><a href="https://github.com/junit-team/junit4/commit/a5d205c7956dbed302b3bb5ecde5ba4299f0b646"><code>a5d205c</code></a> Fix GitHub link in FAQ (<a href="https://github-redirect.dependabot.com/junit-team/junit4/issues/1672">#1672</a>)</li> <li><a href="https://github.com/junit-team/junit4/commit/3a5c6b4d08f408c8ca6a8e0bae71a9bc5a8f97e8"><code>3a5c6b4</code></a> Deprecated since jdk9 replacing constructor instance of Double and Float (<a href="https://github-redirect.dependabot.com/junit-team/junit4/issues/1660">#1660</a>)</li> <li>Additional commits viewable in <a href="https://github.com/junit-team/junit4/compare/r4.12...r4.13.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=junit:junit&package-manager=maven&previous-version=4.12&new-version=4.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/ktfmt/network/alerts). </details> Pull Request resolved: https://github.com/facebookincubator/ktfmt/pull/63 Reviewed By: hick209 Differential Revision: D24306656 Pulled By: cgrushko fbshipit-source-id: 81d3b0f3cb922828c0ddd2ccd130f6d612e8c72b
ktfmt
is a program that pretty-prints (formats) Kotlin code, based on google-java-format.
Note that ktfmt
still has some rough edges which we're constantly working on fixing.
The minimum supported runtime version is JDK 11, released September 2018.
Before Formatting | Formatted by ktfmt |
---|---|
For comparison, the same code formatted by ktlint
and IntelliJ:
Formatted by ktlint | Formatted by IntelliJ |
---|---|
A ktfmt IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins
category. Click the Marketplace
tab, search for the ktfmt
plugin, and click the Install
button.
The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→ktfmt Settings
(or IntelliJ IDEA→Preferences...→Editor→ktfmt Settings
on macOS) and check the Enable ktfmt
checkbox. (A notification will be presented when you first open a project offering to do this for you.)
To enable it by default in new projects, use File→New Project Settings→Preferences for new Projects→Editor→ktfmt Settings
.
When enabled, it will replace the normal Reformat Code
action, which can be triggered from the Code
menu or with the Ctrl-Alt-L (by default) keyboard shortcut.
Download the formatter and run it with:
java -jar /path/to/ktfmt-<VERSION>-jar-with-dependencies.jar [--dropbox-style] [files...]
--dropbox-style
makes ktfmt
use a block indent of 4 spaces instead of 2. See below for details.
Note: There is no configurability as to the formatter's algorithm for formatting (apart from --dropbox-style
). This is a deliberate design decision to unify our code formatting on a single format.
On Gradle: https://github.com/diffplug/spotless/tree/main/plugin-gradle#ktfmt On Maven: https://github.com/diffplug/spotless/tree/main/plugin-maven#ktfmt
ktfmt
vs ktlint
vs IntelliJktfmt
uses google-java-format's underlying engine, and as such, many items on google-java-format's FAQ apply to ktfmt
as well.
In particular,
ktfmt
ignores most existing formatting. It respects existing newlines in some places, but in general, its output is determinstic and is independent of the input code.ktfmt
exposes no configuration options that govern formatting behavior. See https://github.com/google/google-java-format/wiki/FAQ#i-just-need-to-configure-it-a-bit-differently-how for the rationale.These two properties make ktfmt
a good fit in large Kotlin code bases, where consistency is very important.
We created ktfmt
because ktlint
and IntelliJ sometime fail to produce nice-looking code that fits in 100 columns, as can be seen in the Demo section.
ktfmt
uses a 2-space indent; why not 4? any way to change that?Two reasons -
However, we do offer an escape-hatch for projects that absolutely cannot make the move to ktfmt
because of 2-space: the --dropbox-style
flag changes block indents to 4-space.
pom.xml
in IntelliJ. Choose “Open as a Project”FormatterKtTest.kt
.mvn install
java -jar core/target/ktfmt-<VERSION>-jar-with-dependencies.jar
See RELEASING.md.
Apache License 2.0