Skip to content

Add parser support for --lines, --offset, --length#627

Open
ZacSweers wants to merge 17 commits into
facebook:mainfrom
ZacSweers:z/lines
Open

Add parser support for --lines, --offset, --length#627
ZacSweers wants to merge 17 commits into
facebook:mainfrom
ZacSweers:z/lines

Conversation

@ZacSweers

Copy link
Copy Markdown
Contributor

Resolves #218 and includes IDE support as well.

Note that I opted to match GJF's current behavior and allow statement-level boundaries (the issue described function-level granularity only, but that's not what I see GJF do).

@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 Jun 13, 2026

@hick209 hick209 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just haven't finished core/src/main/java/com/facebook/ktfmt/format/Formatter.kt, but here's the start.

I'll resume tomorrow

Comment thread core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated
Comment thread core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated
Comment thread core/src/main/java/com/facebook/ktfmt/cli/ParsedArgs.kt Outdated
Comment thread core/src/test/java/com/facebook/ktfmt/cli/ParsedArgsTest.kt Outdated
Comment thread core/src/test/java/com/facebook/ktfmt/cli/ParsedArgsTest.kt Outdated
Comment thread core/src/test/java/com/facebook/ktfmt/cli/ParsedArgsTest.kt Outdated
@meta-codesync

meta-codesync Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support formatting of specific line ranges

2 participants