Skip to content

Conversation

@noguier
Copy link
Contributor

@noguier noguier commented Dec 23, 2025

Summary of changes

  • add detekt to this repository
  • detekt-config has the same rules as the core BT SDK

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

@noguier noguier requested a review from a team as a code owner December 23, 2025 15:12
import org.robolectric.RobolectricTestRunner

@RunWith(RobolectricTestRunner::class)
@Suppress("LibraryEntitiesShouldNotBePublic")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@noguier noguier merged commit 6ad22a5 into main Jan 7, 2026
4 checks passed
@noguier noguier deleted the add-detekt branch January 7, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants