r/Kotlin • • Apr 25 '20

Github Template for starting an Android app project with: 100% Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc dependencies already set up.

https://github.com/cortinico/kotlin-android-template
47 Upvotes

8 comments sorted by

3

u/delps1001 Apr 25 '20

You should add test coverage checks as well to enforce 100% test coverage.

0

u/[deleted] Apr 25 '20

[deleted]

-1

u/delps1001 Apr 25 '20

Lol no it isn’t. We enforce 100% coverage on all of my repos at my work.

3

u/instantcake Apr 26 '20

Code coverage for code coverage sake is a great way to make every change a chore with tons of churn. It also makes you overconfident because 100% line coverage says nothing about test quality.

-2

u/delps1001 Apr 26 '20

Did I say we just accept any ole PR that has 100% test coverage? No. A stringent code review process is the BEST thing you can do to avoid introducing defects into your code and ensure it’s working correctly. On my squads at work, we enforce every PR to have at least two approvals. The people that approve the PRs are the ones that are on PagerDuty for any production defect and also the maintainers of the code. Also, once you get used to writing unit tests it doesn’t take very long. It saves time for the reviewers reviewing your code as well. 100% code coverage should be a minimum level check to make sure that the writer of the code at least took the time think of every path branch their code could hit.

4

u/sanity Apr 26 '20

If you're really serious about code coverage you should be using mutation testing.

-1

u/delps1001 Apr 26 '20

Sure I agree, I’m just saying code coverage should be a minimum.

3

u/delps1001 Apr 25 '20

I enjoy these kinds of opinionated template repos that save you hours of work