Skip to content
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

build: suppress new sonarqube issues #369

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ internal abstract class AccountRepository {
preferences: PreferencesUtil = PreferencesUtil,
)

@SuppressWarnings("kotlin:S6515")
companion object {
private const val TOKEN_PREFIX = "OAuth2 "
internal const val ID_TRACKING_ERR_MSG = "Both an access token and a user tracking id have been set. " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ internal abstract class CampaignRepository {
*/
abstract fun clearMessages()

@SuppressWarnings("kotlin:S6515")
companion object {
private var instance: CampaignRepository = CampaignRepositoryImpl()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ internal interface HostAppInfoRepository {
*/
fun getRegisteredActivity(): Activity?

@SuppressWarnings("kotlin:S6515")
companion object {
private const val TAG = "IAM_HostAppRepository"
private var instance: HostAppInfoRepository = HostAppInfoRepositoryImpl()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ internal class InAppMessagingTooltipView(

/** This method binds image to view. */
@Suppress("ClickableViewAccessibility", "TooGenericExceptionCaught", "LongMethod")
@SuppressWarnings("kotlin:S6516")
private fun bindImage() { // Display image.
this.hide(asGone = true)
if (this.imageUrl.isNullOrEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal interface ConfigScheduler {

fun startConfig(delay: Long = 0, workManager: WorkManager? = null)

@SuppressWarnings("kotlin:S6515")
companion object {
private const val CONFIG_WORKER_NAME = "iam_config_worker"
private var instance: ConfigScheduler = ConfigSchedulerImpl()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ internal interface EventMessageReconciliationScheduler {
*/
fun startReconciliationWorker(workManager: WorkManager? = null, delay: Long = 0)

@SuppressWarnings("kotlin:S6515")
companion object {
private const val MESSAGES_EVENTS_WORKER_NAME = "iam_messages_events_worker"
private var instance: EventMessageReconciliationScheduler = EventMessageReconciliationSchedulerImpl()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ internal interface MessageMixerPingScheduler {
*/
fun pingMessageMixerService(initialDelay: Long, workManager: WorkManager? = null)

@SuppressWarnings("kotlin:S6515")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, May I know what is this S6516 warning ?

  • It seems to be there for every companion object ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://rules.sonarsource.com/kotlin/RSPEC-6515/.
Encourages to use the built-in feature object, instead of manually creating singletons.

companion object {
private const val MESSAGE_MIXER_PING_WORKER = "iam_message_mixer_worker"
private var instance: MessageMixerPingScheduler = MessageMixerPingSchedulerImpl()
Expand Down
Loading