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

Cmd line jar formatter isn't formatting my .kts build files #224

Closed
ColtonIdle opened this issue May 1, 2021 · 2 comments
Closed

Cmd line jar formatter isn't formatting my .kts build files #224

ColtonIdle opened this issue May 1, 2021 · 2 comments

Comments

@ColtonIdle
Copy link

I've been trying out ktfmt today and I found that the cmd line jar formatter isn't formatting my .kts build files.

I'm using:

java -jar /path/to/ktfmt-<VERSION>-jar-with-dependencies.jar .

and it fixed all .kt but not .kts files.

Interesting enough I tried using the spotless plugin with ktfmt and that indeed formatted my .kts files so I'm not sure what the difference is between the two since I thought spotless just delegates to the jar. Thanks!

@cgrushko
Copy link
Contributor

cgrushko commented May 2, 2021

Glad you liked it!
The culprit is Main.kt line 124, which only considers files with a "kt" extension.
Would you be interested in sending a PR? (If you do, please also update the corresponding test, if there is one)

@ColtonIdle
Copy link
Author

Hm. I wonder if it's purposefully missing, but I will put it on my todo list to update the test and add .kt.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants