Introducing Ktlint

Message ID
DKIM signature
Download raw message
Hello, fellow users!

Today I'm adding to the project the Ktlint formatter[1].

The idea of having this included in the project is that everyone who is
contributing with code will have the code formatted in the same way,
which is the "standard" Kotlin format.

Each patch sent towards the repository will execute the pipeline and
check this, in this order:

  1. The environment.
  2. Permissions of gradle.
  3. Ktlint formatting.
  4. Tests using the stable flavor.
  5. Build the project.

If the steps 3, 4 or 5 fail, you'll be asked to send a v2 of the
patches fixing the issues.

You can format the code by executing the "ktlintFormat" gradle task from
Android Studio or from the terminal:

./gradlew ktlintFormat

You can also setup your own git pre-commit hook.

I didn't create one because I don't know if all of us are using the same
shell binary (sh, bash...). If someone asks, I can add a generic one,
and a man page explaining how to modify it to add your shell binary.

This doesn't have any impact in users, just developers.

Thank you for keep reading!


[1]: https://todo.sr.ht/~captainepoch/husky/50
Reply to thread Export thread (mbox)