Skip to content

Conversation

@Goooler
Copy link
Member

@Goooler Goooler commented Apr 22, 2025

@Goooler Goooler requested a review from martinbonnin April 22, 2025 10:08
build.gradle.kts Outdated
Comment on lines 93 to 100
spotless {
kotlin {
ktlint(libs.ktlint.get().version)
}
kotlinGradle {
ktlint(libs.ktlint.get().version)
}
}
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

ij_kotlin_imports_layout = *

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@Goooler Goooler force-pushed the g/20250422/editorconfig branch from 92726e4 to 5dfacb3 Compare April 22, 2025 12:04
@martinbonnin martinbonnin merged commit eb08cc3 into main Apr 22, 2025
1 check passed
@martinbonnin martinbonnin deleted the g/20250422/editorconfig branch April 22, 2025 12:29
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

Successfully merging this pull request may close these issues.

Add .editorconfig file so IDEs automatically perform common normalizing rules

3 participants