Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI --help option #477

Closed
wants to merge 13 commits into from
Closed

Add CLI --help option #477

wants to merge 13 commits into from

Conversation

grodin
Copy link

@grodin grodin commented Jun 10, 2024

Intended to land on top of #476

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 10, 2024
@grodin grodin closed this Jun 10, 2024
Copy link
Contributor

@hick209 hick209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction and honestly this could happen before we land the --style change as adding an option does not break the API.

Your call though

core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated Show resolved Hide resolved
core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated Show resolved Hide resolved
core/src/main/java/com/facebook/ktfmt/cli/Main.kt Outdated Show resolved Hide resolved
core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated Show resolved Hide resolved
core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@hick209 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@hick209 hick209 linked an issue Jun 12, 2024 that may be closed by this pull request
@hick209
Copy link
Contributor

hick209 commented Jun 12, 2024

Oh, last request, don't forget to add that change into the CHANGELOG.md

@hick209
Copy link
Contributor

hick209 commented Jun 12, 2024

Once we get this in, I plan to push out another release

@hick209
Copy link
Contributor

hick209 commented Jun 12, 2024

Which might be the last before 1.0.0

@hick209
Copy link
Contributor

hick209 commented Jun 13, 2024

Merging...

@facebook-github-bot
Copy link
Contributor

@hick209 merged this pull request in cf8eac3.

ZacSweers referenced this pull request in ZacSweers/CatchUp Jun 14, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) | `0.49` ->
`0.51` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.facebook:ktfmt/0.51?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.facebook:ktfmt/0.51?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.facebook:ktfmt/0.49/0.51?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.facebook:ktfmt/0.49/0.51?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

###
[`v0.51`](https://togithub.com/facebook/ktfmt/blob/HEAD/CHANGELOG.md#051)

##### Added

-   Created CHANGELOG.md
- Added --help option to CLI
([https://github.com/facebook/ktfmt/pull/477](https://togithub.com/facebook/ktfmt/pull/477))

##### Changed

- Preserves blank spaces between when clauses
([https://github.com/facebook/ktfmt/issues/342](https://togithub.com/facebook/ktfmt/issues/342))
-   Named the default style as `Formatter.META_FORMAT` / `--meta-style`
-   `FormattingOptions` constructor parameters order was changed

##### Fixed

- Compilation issues with online formatter
(facebook/ktfmt@8605080)
- Removing valid semicolons
([https://github.com/facebook/ktfmt/issues/459](https://togithub.com/facebook/ktfmt/issues/459))
- Incorrect detection of unused `assign` import
([https://github.com/facebook/ktfmt/issues/411](https://togithub.com/facebook/ktfmt/issues/411))

##### Removed

- **Deleted `Formatter.DROPBOX_FORMAT` / `--dropbox-style` (BREAKING
CHANGE)**
-   Deleted `FormattingOptions.Style` enum

### [`v0.50`](https://togithub.com/facebook/ktfmt/releases/tag/v0.50):
0.50

#### Changelog

- Add pre commit hooks to readme
([https://github.com/facebook/ktfmt/pull/462](https://togithub.com/facebook/ktfmt/pull/462))
– [@&#8203;0x26res](https://togithub.com/0x26res)
- Add homebrew installation note to readme
([https://github.com/facebook/ktfmt/pull/468](https://togithub.com/facebook/ktfmt/pull/468))
– [@&#8203;chenrui333](https://togithub.com/chenrui333)
- Refactor CLI argument parsing
([https://github.com/facebook/ktfmt/pull/467](https://togithub.com/facebook/ktfmt/pull/467))
– [@&#8203;grodin](https://togithub.com/grodin)
- Fix issue with context receive in lambdas
([https://github.com/facebook/ktfmt/issues/471](https://togithub.com/facebook/ktfmt/issues/471))
– [@&#8203;hick209](https://togithub.com/hick209)
- Don't reorder [@&#8203;sample](https://togithub.com/sample) tag
([https://github.com/facebook/ktfmt/issues/406](https://togithub.com/facebook/ktfmt/issues/406))
– [@&#8203;davidtorosyan](https://togithub.com/davidtorosyan)

**Full Changelog**:
facebook/ktfmt@v0.49...v0.50

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ZacSweers/CatchUp).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
slack-oss-bot referenced this pull request in slackhq/foundry Jun 16, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebookincubator/ktfmt) |
dependencies | minor | `0.50` -> `0.51` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebookincubator/ktfmt (com.facebook:ktfmt)</summary>

###
[`v0.51`](https://togithub.com/facebookincubator/ktfmt/blob/HEAD/CHANGELOG.md#051)

##### Added

-   Created CHANGELOG.md
- Added --help option to CLI
([https://github.com/facebook/ktfmt/pull/477](https://togithub.com/facebook/ktfmt/pull/477))

##### Changed

- Preserves blank spaces between when clauses
([https://github.com/facebook/ktfmt/issues/342](https://togithub.com/facebook/ktfmt/issues/342))
-   Named the default style as `Formatter.META_FORMAT` / `--meta-style`
-   `FormattingOptions` constructor parameters order was changed

##### Fixed

- Compilation issues with online formatter
(facebook/ktfmt@8605080)
- Removing valid semicolons
([https://github.com/facebook/ktfmt/issues/459](https://togithub.com/facebook/ktfmt/issues/459))
- Incorrect detection of unused `assign` import
([https://github.com/facebook/ktfmt/issues/411](https://togithub.com/facebook/ktfmt/issues/411))

##### Removed

- **Deleted `Formatter.DROPBOX_FORMAT` / `--dropbox-style` (BREAKING
CHANGE)**
-   Deleted `FormattingOptions.Style` enum

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDguMiIsInVwZGF0ZWRJblZlciI6IjM3LjQwOC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
slack-oss-bot referenced this pull request in slackhq/circuit Jun 16, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) |
dependencies | minor | `0.50` -> `0.51` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

###
[`v0.51`](https://togithub.com/facebook/ktfmt/blob/HEAD/CHANGELOG.md#051)

##### Added

-   Created CHANGELOG.md
- Added --help option to CLI
([https://github.com/facebook/ktfmt/pull/477](https://togithub.com/facebook/ktfmt/pull/477))

##### Changed

- Preserves blank spaces between when clauses
([https://github.com/facebook/ktfmt/issues/342](https://togithub.com/facebook/ktfmt/issues/342))
-   Named the default style as `Formatter.META_FORMAT` / `--meta-style`
-   `FormattingOptions` constructor parameters order was changed

##### Fixed

- Compilation issues with online formatter
(facebook/ktfmt@8605080)
- Removing valid semicolons
([https://github.com/facebook/ktfmt/issues/459](https://togithub.com/facebook/ktfmt/issues/459))
- Incorrect detection of unused `assign` import
([https://github.com/facebook/ktfmt/issues/411](https://togithub.com/facebook/ktfmt/issues/411))

##### Removed

- **Deleted `Formatter.DROPBOX_FORMAT` / `--dropbox-style` (BREAKING
CHANGE)**
-   Deleted `FormattingOptions.Style` enum

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDguMiIsInVwZGF0ZWRJblZlciI6IjM3LjQwOC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document @file CLI arguments
3 participants