AndroidDev-social / DodoForMastodon

🐘 Mastodon client for Android, iOS and Desktop (JVM)
GNU General Public License v3.0
385 stars 29 forks source link

[FEAT]: Code Style, Conventions #10

Open crocsandcoffee opened 1 year ago

crocsandcoffee commented 1 year ago

Description

It was requested in #mastodon-client slack channel for documentation regarding code style and coding conventions.

This is just an "issue" to track that and for anyone to offer any input.

As a starting point I suggest we just use the default kotlin style guide for now, unless anyone feels strongly and wants to create a custom one that follows certain guidelines and can be included in the project and imported in workspaces.

Additional Information

No response

svenjacobs commented 1 year ago

The project could enforce a code style with ktlint and Twitter's 😉 Compose Rules. Latter is really nice because it also catches common Compose errors / gotchas.

bitPogo commented 1 year ago

Maybe spotless with ktlint is an option.

bitPogo commented 1 year ago

Almost forgot - Danger to enforce some PR standards.

hrules6872 commented 1 year ago

I know the default kotlin style guide says "Use four spaces for indentation" but I find it such an old fashioned formatting... is everyone agree not to change it to 2?

svenjacobs commented 1 year ago

Why not use tabs? Then everyone can individually decide how indentation is rendered? 🔥 (let the flame wars begin 😉)