Skip to content

Add --quiet flag to suppress per-file formatting status output#603

Closed
Goooler wants to merge 1 commit intofacebook:mainfrom
Goooler:add-quiet-flag
Closed

Add --quiet flag to suppress per-file formatting status output#603
Goooler wants to merge 1 commit intofacebook:mainfrom
Goooler:add-quiet-flag

Conversation

@Goooler
Copy link
Copy Markdown
Contributor

@Goooler Goooler commented Mar 10, 2026

Changes

  • ParsedArgs: Added quiet: Boolean field; added --quiet to the argument parser and help text
  • Main.format(): Gate the "Done formatting $fileName" stderr print behind !args.quiet; error messages are always emitted regardless of the flag

Usage

ktfmt --quiet src/**/*.kt   # formats files silently; errors still reported to stderr

Closes #558.

@meta-cla meta-cla 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 Mar 10, 2026
## Changes

- **`ParsedArgs`**: Added `quiet: Boolean` field; added `--quiet` to the
argument parser and help text
- **`Main.format()`**: Gate the `"Done formatting $fileName"` stderr
print behind `!args.quiet`; error messages are always emitted regardless
of the flag

## Usage

```sh
ktfmt --quiet src/**/*.kt # formats files silently; errors still reported to stderr
```
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 10, 2026

@hick209 has imported this pull request. If you are a Meta employee, you can view this in D95993436.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 11, 2026

@hick209 merged this pull request in 1dcd3ca.

@Goooler Goooler deleted the add-quiet-flag branch March 11, 2026 02:52
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.

[FR] Argument to disable "Done formatting"

3 participants