covidwatchorg / covidwatch-android-tcn

Covid Watch Android TCN app
Apache License 2.0
52 stars 25 forks source link

Add codestyle to version control #114

Closed redbassett closed 4 years ago

redbassett commented 4 years ago

This will allow all dev IDEs to stay in-sync for code styles. A baseline codestyle has been set for Kotlin, Java, and XML. I also reviewed styles for Groovy and YAML, but Android Studio seemed to decide those weren't going in the sync file as I don't think I changed any defaults.

Kotlin styles should be using official style guide.

This is just a baseline, style decisions are open to team input!

madim commented 4 years ago

Is this official Kotlin style guide? if not, then I suppose we should better pick that instead of creating our own

We may also need to integrate ktlint later to enforce this style to everyone

Apisov commented 4 years ago

TLDR I don't think that we need this changes because we already have this setup.


The codestyle is already using official Kotlin guidelines. You can check that it's aligned by trying change kotlin code style with: https://kotlinlang.org/docs/reference/coding-conventions.html#applying-the-style-guide XML uses 'android' settings that I set setFrom.

Occasional code formattings in the PRs is the result that some code was added before we introduced common codestyle or someone didn't format code then another person did.

redbassett commented 4 years ago

So there appears to be a codestyle in source control now on develop? I didn't see on on my initial checkout of the project, which is odd, but I do see on on dev branch that this PR tracks against.

Not sure why that wasn't working correctly in my IDE, but this is no longer a new file PR. Closing unless this changes, but looks like it tracks on dev now.

Apisov commented 4 years ago

So there appears to be a codestyle in source control now on develop? I didn't see on on my initial checkout of the project, which is odd, but I do see on on dev branch that this PR tracks against.

Not sure why that wasn't working correctly in my IDE, but this is no longer a new file PR. Closing unless this changes, but looks like it tracks on dev now.

Maybe you've cloned master branch first -- it's still has old project structure.