-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
# Conflicts: # browser-switch/src/main/java/com/braintreepayments/api/BrowserSwitchClient.java
| import org.robolectric.RobolectricTestRunner | ||
|
|
||
| @RunWith(RobolectricTestRunner::class) | ||
| @Suppress("LibraryEntitiesShouldNotBePublic") |
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.
We might be able to add an exclusion for this rule to the detekt file for ignoring Test classes.
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.
@tdchow I added the rules to exclude tests and demo from that rule. Let me know if you think it is sufficient.
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.
Looks great!
| /** | ||
| * The result of a browser switch obtained from [BrowserSwitchClient.start] | ||
| */ | ||
| @Suppress("LibraryEntitiesShouldNotBePublic") |
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.
Summary of changes
detektto this repositorydetekt-confighas the same rules as the core BT SDKChecklist
Authors