-
Notifications
You must be signed in to change notification settings - Fork 8
Add .editorconfig and reformat code #32
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
Conversation
build.gradle.kts
Outdated
| spotless { | ||
| kotlin { | ||
| ktlint(libs.ktlint.get().version) | ||
| } | ||
| kotlinGradle { | ||
| ktlint(libs.ktlint.get().version) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that going to fail the build everytime there is a code style violation?
As much as I welcome .editorconfig (and even better, .idea/codeStyle), I have very mixed feelings about adding more friction to development. This blog post explains why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, check depends on spotlessCheck.
.editorconfig would be enough, it's honored by IDEA, VSC, and others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Can you keep .editorconfig but remove spotless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can. But some rules break the rules, e.g.
Line 11 in 350f1f3
| ij_kotlin_imports_layout = * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I'm following. Do you mean that some of the existing code breaks the rule? This is fine, we can reformat as we go. Or just commit the reformat alongside .editorconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
92726e4 to
5dfacb3
Compare
Mostly copy-pasted from https://github.com/GradleUp/shadow/blob/main/.editorconfig
Closes #31.