-
Notifications
You must be signed in to change notification settings - Fork 18
Add detekt #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add detekt #126
Changes from all commits
3f9333e
3222efd
d7ae7b7
620501b
21b6e54
7ff37d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,14 +7,21 @@ import androidx.activity.result.ActivityResultLauncher | |
| import androidx.browser.auth.AuthTabIntent | ||
| import androidx.browser.customtabs.CustomTabsClient | ||
| import androidx.browser.customtabs.CustomTabsIntent | ||
| import io.mockk.* | ||
| import org.junit.Assert.* | ||
| import io.mockk.clearAllMocks | ||
| import io.mockk.every | ||
| import io.mockk.mockk | ||
| import io.mockk.mockkStatic | ||
| import io.mockk.verify | ||
| import org.junit.Assert.assertEquals | ||
| import org.junit.Assert.assertFalse | ||
| import org.junit.Assert.assertTrue | ||
| import org.junit.Before | ||
| import org.junit.Test | ||
| import org.junit.runner.RunWith | ||
| import org.robolectric.RobolectricTestRunner | ||
|
|
||
| @RunWith(RobolectricTestRunner::class) | ||
| @Suppress("LibraryEntitiesShouldNotBePublic") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might be able to add an exclusion for this rule to the detekt file for ignoring Test classes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tdchow I added the rules to exclude tests and demo from that rule. Let me know if you think it is sufficient.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks great! |
||
| class AuthTabInternalClientUnitTest { | ||
|
|
||
| private lateinit var authTabBuilder: AuthTabIntent.Builder | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ruleset doesn't make complete sense to me.
It is good to have most of the library entities to be internal or private, but there'll have to be some classes that need to be exposed. Is this the way that detekt expects us to deal with all public library classes? An explicit way for saying that we are allowing something?
I have a feeling that this isn't the best way to do things, but I don't expect any changes in this PR. Just saying stuff out loud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a very fair point, and the one we should address when time permits. Tagging @tdchow in case we want to create a ticket for this work in the future. In the meantime, I will merge and close this PR to limit its scope.