GCX-HCI / ThirtyInch

a MVP library for Android favoring a stateful Presenter
Apache License 2.0
1.03k stars 101 forks source link

Feature: Lint Checks #158

Closed jreehuis closed 6 years ago

jreehuis commented 6 years ago

Description

This implementation adopts and updates #111. Fixes #100

The updates include:

How to Test

Play with the following scenarios:

jreehuis commented 6 years ago

@StefMa I addressed all your comments. Would be great if you could have another look on this PR. :)

StefMa commented 6 years ago

Hey, sure. After I am back from my sick leave I will take a look into it 👍

StefMa commented 6 years ago

Works 🎉 bildschirmfoto 2018-09-17 um 10 23 26 bildschirmfoto 2018-09-17 um 10 23 45

StefMa commented 6 years ago

What does not work:

abstract class GalleryDetailsActivity : TiActivity<GalleryDetailsPresenter, GalleryDetailsView>()

class CameraGalleryDetailsActivity : GalleryDetailsActivity() {

No Lint issue will be shown :(

StefMa commented 6 years ago

Works also with Java 🤘 bildschirmfoto 2018-09-17 um 10 31 16 bildschirmfoto 2018-09-17 um 10 31 46

StefMa commented 6 years ago

Something like this shouldn't be an issue: bildschirmfoto 2018-09-17 um 10 33 05

Ok, maybe this is not an issue because it will never happen in real world

StefMa commented 6 years ago

Other than that it looks great 🎉 Thanks @jreehuis

jreehuis commented 6 years ago

Thanks for the extensive tests! 😃 Especially the abstract class scenario will get complicated... 😡 I will see to solve it. But definitely a real world case. Thanks for pointing to it.

jreehuis commented 6 years ago

Something like this shouldn't be an issue: bildschirmfoto 2018-09-17 um 10 33 05

Ok, maybe this is not an issue because it will never happen in real world

In my view this is correct. StuffActivity could be also used separately and so we should highlight this error.

jreehuis commented 6 years ago

What does not work:

abstract class GalleryDetailsActivity : TiActivity<GalleryDetailsPresenter, GalleryDetailsView>()

class CameraGalleryDetailsActivity : GalleryDetailsActivity() {

No Lint issue will be shown :(

OK, wasn't that hard than expected. This scenario should also be covered now.

jreehuis commented 6 years ago

All done.

StefMa commented 6 years ago

Issue created as discussed. Merged ✅

Thank you @jreehuis 🤘