Skip to content
Discussion options

You must be logged in to vote

Okay, it seems like (once I can figure out which version of ktlint is being used by ktlint-gradle... but that's a separate conversation), all I need to run is something not entirely unlike

$ jj config edit --repo
[fix.tools.ktlint]
# --loglevel=none because of https://github.com/pinterest/ktlint/issues/2246
command = ["/path/to/ktlint", "-F", "--stdin", "--stdin-path=$path", "--editorconfig", "/path/to/.editorconfig", "--loglevel=none"]
patterns = ["glob:'**/*.kt'", "glob:'**/*.kts'"]

It's not a perfect solution because the editorconfig file might change mid-branch, and jj fix will apply the same editorconfig to all editable commits... but that's a shortcoming of jj's design.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@paul-dingemans
Comment options

@paul-dingemans
Comment options

@badp
Comment options

@paul-dingemans
Comment options

Answer selected by badp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants