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: introduce spotless/ktlint #39

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

whitescent
Copy link
Collaborator

@whitescent whitescent commented Feb 5, 2025

@whitescent whitescent marked this pull request as ready for review February 9, 2025 05:47
@whitescent whitescent requested review from eymar and JSMonk and removed request for eymar February 9, 2025 05:47
@whitescent
Copy link
Collaborator Author

But we may need to write a Gradle task to download the latest compose rules ktlint jar from https://github.com/mrmans0n/compose-rules/releases during project synchronization and import it into the project, so that the Ktlint IDEA plugin can import lint suggestions related to compose?

image

settings.gradle.kts Outdated Show resolved Hide resolved
@eymar
Copy link
Collaborator

eymar commented Feb 14, 2025

Hi @whitescent !
I'm sorry there're merge conflicts now. Could you please rebase and solve the conflicts?

@whitescent whitescent requested a review from eymar February 14, 2025 13:26
.editorconfig Outdated

[*]
charset = utf-8
indent_size = 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use 4 spaces, as suggested by the official convention - https://kotlinlang.org/docs/coding-conventions.html#indentation ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes! but for the compose project, I might prefer 2 spaces for indentation, as it looks more readable in cases with deep component nesting. However, if 4 spaces are to be used, that's fine too

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it.
One more argument for keeping it 4 is that the repository is in Kotlin group, so using the official convention is preferred :)

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.

2 participants