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

feat(cli): support max width arg #470

Closed
wants to merge 1 commit into from

Conversation

awe123343
Copy link

I have a project wanna moving from ktfmt in spotless gradle plugin to cli, but have a blocker right now due to we set max width to 120 with ktfmt spotless gradle plugin. Hence supporting this in CLI, looks like we support customising this in both spotless plugin and web UI, but just not CLI.

@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 May 26, 2024
@awe123343 awe123343 force-pushed the support-max-width-arg branch 3 times, most recently from 26f371b to 1848176 Compare May 26, 2024 23:46
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.

We're discussing internally whether we want these to be available on the command line.

BTW there are merge conflicts now that we landed #467

@awe123343 awe123343 force-pushed the support-max-width-arg branch from 1848176 to 38796db Compare June 5, 2024 17:37
@awe123343
Copy link
Author

We're discussing internally whether we want these to be available on the command line.

BTW there are merge conflicts now that we landed #467

Rebased and solved conflicts while waiting for discussion

@awe123343 awe123343 requested a review from hick209 June 5, 2024 17:39
@hick209
Copy link
Contributor

hick209 commented Jun 5, 2024

This would go against this principle here so we overall don't want to support it.

I understand this is likely not the answer you wanted, but luckily there's an easy workaround.
You can build a simple Java program and runs ktfmt for you (from source) where you set it up appropriately as you can control the max width param from there.

I hope that is helpful to your use case and regardless I'm thankful for contributions to ktfmt

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.

3 participants