Skip to content

Commit

Permalink
Update to detekt 1.23.7
Browse files Browse the repository at this point in the history
  • Loading branch information
david-livefront committed Sep 11, 2024
1 parent a5726fb commit d9e940d
Show file tree
Hide file tree
Showing 32 changed files with 39 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ data class EnvironmentUrlDataJson(
@SerialName("events")
val events: String? = null,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Default [EnvironmentUrlDataJson] for the US region.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ sealed class PolicyInformation {
@SerialName("includeNumber")
val includeNumber: Boolean?,
) : PolicyInformation() {
@Suppress("UndocumentedPublicClass")
companion object {
const val TYPE_PASSWORD: String = "password"
const val TYPE_PASSPHRASE: String = "passphrase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LegacySecureStorageMigratorImpl(
}
}

companion object {
private companion object {
private const val ENCRYPTED_BASE_KEY: String = "bwSecureStorage"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sealed class FlagKey<out T : Any> {
*/
abstract val isRemotelyConfigured: Boolean

@Suppress("UndocumentedPublicClass")
companion object {
/**
* List of all flag keys to consider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ServerConfigRepositoryImpl(
return localConfig
}

companion object {
private companion object {
private const val MINIMUM_CONFIG_SYNC_INTERVAL_SEC: Long = 60 * 60
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data class SetupAutoFillHandler(
val onConfirmTurnOnLaterClick: () -> Unit,
val sendAutoFillServiceFallback: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Convenience function for creating a [SetupAutoFillHandler] with a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data class SetupUnlockHandler(
val onSetUpLaterClick: () -> Unit,
val unlockWithBiometricToggle: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [SetupUnlockHandler] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CheckEmailHandler(
val onBackClick: () -> Unit,
val onLoginClick: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Create [CheckEmailHandler] with the given [viewModel] to send actions to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CompleteRegistrationHandler(
val onLearnToPreventLockout: () -> Unit,
val onCallToAction: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Create [CompleteRegistrationHandler] with the given [viewModel] to send actions to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data class StartRegistrationHandler(
val onServerGeologyHelpClick: () -> Unit,
val onBackClick: () -> Unit,
) {

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [StartRegistrationHandler] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ data class TrustedDeviceHandlers(
val onApproveWithPasswordClick: () -> Unit,
val onNotYouButtonClick: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [TrustedDeviceHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data class SearchHandlers(
val onVaultFilterSelect: (VaultFilterType) -> Unit,
val onOverflowItemClick: (ListingItemOverflowAction) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [SearchHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class AboutViewModel @Inject constructor(
)
}

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Create initial state for the About View model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,7 @@ private data class PasswordHandlers(
val onPasswordMinSpecialCharactersChange: (Int) -> Unit,
val onPasswordToggleAvoidAmbiguousCharsChange: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
@Suppress("LongMethod")
fun create(viewModel: GeneratorViewModel): PasswordHandlers {
Expand Down Expand Up @@ -1433,6 +1434,7 @@ private data class PassphraseHandlers(
val onPassphraseCapitalizeToggleChange: (Boolean) -> Unit,
val onPassphraseIncludeNumberToggleChange: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
fun create(viewModel: GeneratorViewModel): PassphraseHandlers {
return PassphraseHandlers(
Expand Down Expand Up @@ -1482,6 +1484,7 @@ private data class PassphraseHandlers(
private data class UsernameTypeHandlers(
val onUsernameTooltipClicked: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
fun create(viewModel: GeneratorViewModel): UsernameTypeHandlers {
return UsernameTypeHandlers(
Expand Down Expand Up @@ -1513,6 +1516,7 @@ private data class ForwardedEmailAliasHandlers(
val onForwardEmailDomainNameTextChange: (String) -> Unit,
val onSimpleLoginApiKeyTextChange: (String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
@Suppress("LongMethod")
fun create(viewModel: GeneratorViewModel): ForwardedEmailAliasHandlers {
Expand Down Expand Up @@ -1647,6 +1651,7 @@ private data class ForwardedEmailAliasHandlers(
private data class PlusAddressedEmailHandlers(
val onEmailChange: (String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
fun create(viewModel: GeneratorViewModel): PlusAddressedEmailHandlers {
return PlusAddressedEmailHandlers(
Expand Down Expand Up @@ -1676,6 +1681,7 @@ private data class PlusAddressedEmailHandlers(
private data class CatchAllEmailHandlers(
val onDomainChange: (String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
fun create(viewModel: GeneratorViewModel): CatchAllEmailHandlers {
return CatchAllEmailHandlers(
Expand Down Expand Up @@ -1706,6 +1712,7 @@ private data class RandomWordHandlers(
val onCapitalizeChange: (Boolean) -> Unit,
val onIncludeNumberChange: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
fun create(viewModel: GeneratorViewModel): RandomWordHandlers {
return RandomWordHandlers(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@ data class GeneratorState(
override val displayStringResId: Int
get() = PasscodeTypeOption.PASSWORD.labelRes

@Suppress("UndocumentedPublicClass")
companion object {
private const val DEFAULT_PASSWORD_LENGTH: Int = 14
private const val MIN_NUMBERS: Int = 1
Expand Down Expand Up @@ -1845,6 +1846,7 @@ data class GeneratorState(
override val displayStringResId: Int
get() = PasscodeTypeOption.PASSPHRASE.labelRes

@Suppress("UndocumentedPublicClass")
companion object {
private const val DEFAULT_PASSPHRASE_SEPARATOR: Char = '-'
private const val DEFAULT_NUM_WORDS: Int = 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ data class AddSendHandlers(
val onExpirationDateChange: (ZonedDateTime?) -> Unit,
val onClearExpirationDateClick: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [AddSendHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ data class SendHandlers(
val onDeleteSendClick: (SendState.ViewState.Content.SendItem) -> Unit,
val onRemovePasswordClick: (SendState.ViewState.Content.SendItem) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [SendHandlers] by binding actions to the provided [SendViewModel].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ data class VaultAddEditCardTypeHandlers(
val onSecurityCodeVisibilityChange: (Boolean) -> Unit,
val onNumberVisibilityChange: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ data class VaultAddEditCommonHandlers(
val onCollectionSelect: (VaultCollection) -> Unit,
val onHiddenFieldVisibilityChange: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ data class VaultAddEditIdentityTypeHandlers(
val onZipTextChange: (String) -> Unit,
val onCountryTextChange: (String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ data class VaultAddEditLoginTypeHandlers(
val onPasswordVisibilityChange: (Boolean) -> Unit,
val onClearFido2CredentialClick: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ data class VaultAddEditUserVerificationHandlers(
val onUserVerificationCancelled: () -> Unit,
val onUserVerificationNotSupported: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data class AttachmentsHandlers(
val onDeleteClick: (attachmentId: String) -> Unit,
val onDismissRequest: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates the [AttachmentsHandlers] using the [AttachmentsViewModel] to send desired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ data class VaultCardItemTypeHandlers(
val onShowNumberClick: (Boolean) -> Unit,
val onShowSecurityCodeClick: (Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data class VaultCommonItemTypeHandlers(
) -> Unit,
val onAttachmentDownloadClick: (VaultItemState.ViewState.Content.Common.AttachmentItem) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [VaultCommonItemTypeHandlers] by binding actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ data class VaultLoginItemTypeHandlers(
val onPasswordHistoryClick: () -> Unit,
val onShowPasswordClick: (isVisible: Boolean) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates the [VaultLoginItemTypeHandlers] using the [viewModel] to send desired actions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ data class VaultItemListingHandlers(
val lockClick: () -> Unit,
val overflowItemClick: (action: ListingItemOverflowAction) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [VaultItemListingHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ data class VaultItemListingUserVerificationHandlers(
val onUserVerificationCancelled: () -> Unit,
val onUserVerificationNotSupported: (selectedCipherId: String?) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ data class VaultHandlers(
val overflowOptionClick: (ListingItemOverflowAction.VaultAction) -> Unit,
val masterPasswordRepromptSubmit: (ListingItemOverflowAction.VaultAction, String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [VaultHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data class VerificationCodeHandlers(
val lockClick: () -> Unit,
val copyClick: (text: String) -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [VerificationCodeHandlers] by binding actions to the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ enum class VaultLinkedFieldType(
FULL_NAME(id = 418.toUInt(), label = R.string.full_name.asText()),
;

@Suppress("UndocumentedPublicClass")
companion object {
/**
* Helper function to get the LinkedCustomFieldType from the id
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ androdixAutofill = "1.1.0"
androidxWork = "2.9.1"
bitwardenSdk = "0.5.0-20240819.160739-177"
crashlytics = "3.0.2"
detekt = "1.23.6"
detekt = "1.23.7"
firebaseBom = "33.2.0"
glide = "1.0.0-beta01"
googleServices = "4.4.2"
Expand Down

0 comments on commit d9e940d

Please sign in to comment.