Conversation
Collaborator
Author
|
There are no logic changes. Just code style that Android Studio uses by default. This PR will prevent adding code style changes to the upcoming commit and make future PRs shorter(that PRs will include only real changes). |
IvanPizhenko
suggested changes
May 29, 2021
Contributor
IvanPizhenko
left a comment
There was a problem hiding this comment.
some questionable formatting and missing EOLs at EOFs
| withToolBarText("INBOX"), | ||
| withToolBarText( | ||
| InstrumentationRegistry.getInstrumentation().targetContext.getString( | ||
| R |
Contributor
There was a problem hiding this comment.
This break of "R." looks strange
| hasAction(Intent.ACTION_CHOOSER), hasExtra( | ||
| `is`(Intent.EXTRA_INTENT), allOf( | ||
| hasAction( | ||
| Intent |
Contributor
There was a problem hiding this comment.
Same as "R." in another file - why this is broken down?
| ) | ||
| } | ||
| } | ||
| } No newline at end of file |
| requestCode: Long = 0L, | ||
| context: Context, | ||
| url: String | ||
| ): Result<JsonObject> |
| getResult { | ||
| apiService.getOpenIdConfiguration(url) | ||
| } | ||
| } |
| .substring(messageId.indexOf('@') + 1) | ||
| .replace(">", "") | ||
| .substring(messageId.indexOf('@') + 1) | ||
| .replace(">", "") | ||
| } | ||
| } |
| val ctor1Parameters = | ||
| if (ctor1IsDefaultConstructorMarkerFound) 0 else ctor1.genericParameterTypes.size | ||
| val ctor2Parameters = | ||
| if (ctor2IsDefaultConstructorMarkerFound) 0 else ctor2.genericParameterTypes.size | ||
| return ctor1Parameters.compareTo(ctor2Parameters) | ||
| } | ||
| } |
| } | ||
|
|
||
| override fun customise(fixture: JFixture) { | ||
| val greedyConstructorRelay: SpecimenBuilder = ClassToConstructorRelay(mostParameterCountConstructorQuery, SpecificTypeSpecification(type)) | ||
| val greedyConstructorRelay: SpecimenBuilder = | ||
| ClassToConstructorRelay(mostParameterCountConstructorQuery, SpecificTypeSpecification(type)) | ||
| fixture.addBuilderToStartOfPipeline(greedyConstructorRelay) | ||
| } | ||
| } |
| recipientPGPSecretKeyRing = PGPainless.generateKeyRing() | ||
| .simpleEcKeyRing("juliet@encrypted.key", RECEIVER_PASSWORD) | ||
| .simpleEcKeyRing("juliet@encrypted.key", RECEIVER_PASSWORD) | ||
| } | ||
| } | ||
| } |
| .check(doesNotExist()) | ||
| .check(doesNotExist()) | ||
| } | ||
| } No newline at end of file |
Collaborator
|
for missing eol, this sounds like something that we should have an
automated fix for - otherwise its laboursome to keep it consistent
…On Saturday, May 29, 2021, Ivan Pizhenko ***@***.***> wrote:
***@***.**** requested changes on this pull request.
some questionable formatting and missing EOLs at EOFs
------------------------------
In FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/
EmailManagerActivityTest.kt
<#1265 (comment)>
:
> intended(hasComponent(SettingsActivity::class.java.name))
}
@test
@DependsOnMailServer
fun testSwitchLabels() {
val menuItem = "Sent"
- onView(withId(R.id.toolbar)).check(matches(anyOf(
- withToolBarText("INBOX"),
- withToolBarText(InstrumentationRegistry.getInstrumentation().targetContext.getString(R
- .string.loading)))))
+ onView(withId(R.id.toolbar)).check(
+ matches(
+ anyOf(
+ withToolBarText("INBOX"),
+ withToolBarText(
+ InstrumentationRegistry.getInstrumentation().targetContext.getString(
+ R
This break of "R." looks strange
------------------------------
In FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/activity/
ImportPublicKeyActivityTest.kt
<#1265 (comment)>
:
>
@test
fun testImportKeyFromFile() {
val resultData = TestGeneralUtil.genIntentWithPersistedReadPermissionForFile(fileWithPublicKey)
- intending(allOf(hasAction(Intent.ACTION_CHOOSER), hasExtra(`is`(Intent.EXTRA_INTENT), allOf(hasAction(Intent
- .ACTION_OPEN_DOCUMENT), hasCategories(hasItem(equalTo(Intent.CATEGORY_OPENABLE))), hasType("*/*")))))
- .respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, resultData))
+ intending(
+ allOf(
+ hasAction(Intent.ACTION_CHOOSER), hasExtra(
+ `is`(Intent.EXTRA_INTENT), allOf(
+ hasAction(
+ Intent
Same as "R." in another file - why this is broken down?
------------------------------
In FlowCrypt/src/androidTest/java/com/flowcrypt/email/util/
AccountDaoManager.kt
<#1265 (comment)>
:
> @@ -27,8 +30,10 @@ class AccountDaoManager {
@JvmStatic
fun getUserWithMoreThan21Letters(): AccountEntity {
- return TestGeneralUtil.readObjectFromResources("user_with_more_than_21_letters_account.json",
- AccountEntity::class.java)
+ return TestGeneralUtil.readObjectFromResources(
+ "user_with_more_than_21_letters_account.json",
+ AccountEntity::class.java
+ )
}
}
}
Missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/
ApiRepository.kt
<#1265 (comment)>
:
>
/**
* @param context Interface to global information about an application environment.
* @param url The configuration url.
*/
- suspend fun getOpenIdConfiguration(requestCode: Long = 0L, context: Context, url: String): Result<JsonObject>
+ suspend fun getOpenIdConfiguration(
+ requestCode: Long = 0L,
+ context: Context,
+ url: String
+ ): Result<JsonObject>
Missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/
FlowcryptApiRepository.kt
<#1265 (comment)>
:
> }
+ }
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/
base/BaseApiRepository.kt
<#1265 (comment)>
:
> }
+ ***@***.***Context null
+ }
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/request/api/
DomainRulesRequest.kt
<#1265 (comment)>
:
> \ No newline at end of file
+class DomainRulesRequest(
+ override val apiName: ApiName = ApiName.POST_GET_DOMAIN_RULES,
+ override val requestModel: LoginModel
+) : BaseRequest<LoginModel>
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/
request/api/LoginRequest.kt
<#1265 (comment)>
:
> \ No newline at end of file
+class LoginRequest(
+ override val apiName: ApiName = ApiName.POST_LOGIN,
+ override val requestModel: LoginModel, val tokenId: String
+) : BaseRequest<LoginModel>
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/database/
FlowCryptMigration.kt
<#1265 (comment)>
:
> doMigration(database)
- LogsUtil.d(FlowCryptMigration::class.java.simpleName, "End migration from $startVersion to $endVersion")
+ LogsUtil.d(
+ FlowCryptMigration::class.java.simpleName,
+ "End migration from $startVersion to $endVersion"
+ )
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/database/dao/AccountDao.kt
<#1265 (comment)>
:
> @@ -182,6 +193,8 @@ abstract class AccountDao : BaseDao<AccountEntity> {
smtpIsUseSslTls = authCredentials.smtpOpt === SecurityType.Option.SSL_TLS,
smtpIsUseStarttls = authCredentials.smtpOpt === SecurityType.Option.STARTLS,
useCustomSignForSmtp = authCredentials.hasCustomSignInForSmtp,
- smtpUsername = authCredentials.smtpSigInUsername))
+ smtpUsername = authCredentials.smtpSigInUsername
+ )
+ )
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/database/
entity/AccountAliasesEntity.kt
<#1265 (comment)>
:
> \ No newline at end of file
+ @PrimaryKey(autoGenerate = true) @ColumnInfo(name = BaseColumns._ID) val id: Long? = null,
+ val email: String,
+ @ColumnInfo(name = "account_type") val accountType: String,
+ @ColumnInfo(name = "send_as_email") val sendAsEmail: String,
+ @ColumnInfo(name = "display_name", defaultValue = "NULL") val displayName: String? = null,
+ @ColumnInfo(name = "is_default", defaultValue = "0") val isDefault: Boolean? = null,
+ @ColumnInfo(name = "verification_status") val verificationStatus: String
+)
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/database/
entity/ActionQueueEntity.kt
<#1265 (comment)>
:
> return ActionQueueEntity(
- email = email.toLowerCase(Locale.getDefault()),
- actionType = action.type.value,
- actionJson = gson.toJson(action))
+ email = email.toLowerCase(Locale.getDefault()),
+ actionType = action.type.value,
+ actionJson = gson.toJson(action)
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/database/
entity/LabelEntity.kt
<#1265 (comment)>
:
> @@ -75,7 +85,8 @@ data class LabelEntity(
private fun parseAttributes(attributesAsString: String?): List<String> {
val nonNullString = attributesAsString ?: return emptyList()
- return listOf(*nonNullString.split("\t".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray())
+ return listOf(*nonNullString.split("\t".toRegex()).dropLastWhile { it.isEmpty() }
+ .toTypedArray())
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/extensions/
kotlin/LongExt.kt
<#1265 (comment)>
:
> @@ -7,7 +7,7 @@
package com.flowcrypt.email.extensions.kotlin
-import java.util.Locale
+import java.util.*
why import has changed?
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/
AccountAliasesViewModel.kt
<#1265 (comment)>
:
> }
+ }
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/
viewmodel/AccountViewModel.kt
<#1265 (comment)>
:
> }
+
+ ***@***.***Context accountEntity?.copy(
+ password = KeyStoreCryptoManager.decryptSuspend(originalPassword),
+ smtpPassword = KeyStoreCryptoManager.decryptSuspend(accountEntity.smtpPassword),
+ uuid = KeyStoreCryptoManager.decryptSuspend(accountEntity.uuid)
+ )
+ }
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/
CheckPrivateKeysViewModel.kt
<#1265 (comment)>
:
>
- data class CheckResult(val pgpKeyDetails: PgpKeyDetails,
- val passphrase: String, val e: Exception? = null)
+ data class CheckResult(
+ val pgpKeyDetails: PgpKeyDetails,
+ val passphrase: String, val e: Exception? = null
+ )
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/
viewmodel/LauncherViewModel.kt
<#1265 (comment)>
:
> @@ -25,7 +25,15 @@ class LauncherViewModel(application: Application) : BaseAndroidViewModel(applica
val mediatorLiveData = MediatorLiveData<Boolean>()
init {
- mediatorLiveData.addSource(isNodeInfoReceivedLiveData) { value -> mediatorLiveData.setValue(value) }
- mediatorLiveData.addSource(isAccountInfoReceivedLiveData) { value -> mediatorLiveData.setValue(value) }
+ mediatorLiveData.addSource(isNodeInfoReceivedLiveData) { value ->
+ mediatorLiveData.setValue(
+ value
+ )
+ }
+ mediatorLiveData.addSource(isAccountInfoReceivedLiveData) { value ->
+ mediatorLiveData.setValue(
+ value
+ )
+ }
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/
workmanager/BaseWorker.kt
<#1265 (comment)>
:
> }
- }
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/
MessagesSenderWorker.kt
<#1265 (comment)>
:
> - .getInstance(context.applicationContext)
- .enqueueUniqueWork(
- NAME,
- if (forceSending) ExistingWorkPolicy.REPLACE else ExistingWorkPolicy.KEEP,
- OneTimeWorkRequestBuilder<MessagesSenderWorker>()
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ NAME,
+ if (forceSending) ExistingWorkPolicy.REPLACE else ExistingWorkPolicy.KEEP,
+ OneTimeWorkRequestBuilder<MessagesSenderWorker>()
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
ArchiveMsgsWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<ArchiveMsgsWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<ArchiveMsgsWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
BaseSyncWorker.kt
<#1265 (comment)>
:
> ?: IllegalStateException(context.getString(R.string.unknown_error))
- }
+ }
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
DeleteMessagesPermanentlyWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<DeleteMessagesPermanentlyWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<DeleteMessagesPermanentlyWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
DeleteMessagesWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<DeleteMessagesWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<DeleteMessagesWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
EmptyTrashWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<EmptyTrashWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<EmptyTrashWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
InboxIdleMsgsRemovedWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<InboxIdleMsgsRemovedWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<InboxIdleMsgsRemovedWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
MovingToInboxWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<MovingToInboxWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<MovingToInboxWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
SyncInboxWorker.kt
<#1265 (comment)>
:
> - .getInstance(context.applicationContext)
- .enqueueUniquePeriodicWork(
- GROUP_UNIQUE_TAG,
- ExistingPeriodicWorkPolicy.REPLACE,
- PeriodicWorkRequestBuilder<SyncInboxWorker>(15, TimeUnit.MINUTES)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniquePeriodicWork(
+ GROUP_UNIQUE_TAG,
+ ExistingPeriodicWorkPolicy.REPLACE,
+ PeriodicWorkRequestBuilder<SyncInboxWorker>(15, TimeUnit.MINUTES)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/workmanager/sync/
UpdateMsgsSeenStateWorker.kt
<#1265 (comment)>
:
> - GROUP_UNIQUE_TAG,
- ExistingWorkPolicy.REPLACE,
- OneTimeWorkRequestBuilder<UpdateMsgsSeenStateWorker>()
- .addTag(TAG_SYNC)
- .setConstraints(constraints)
- .build()
- )
+ .getInstance(context.applicationContext)
+ .enqueueUniqueWork(
+ GROUP_UNIQUE_TAG,
+ ExistingWorkPolicy.REPLACE,
+ OneTimeWorkRequestBuilder<UpdateMsgsSeenStateWorker>()
+ .addTag(TAG_SYNC)
+ .setConstraints(constraints)
+ .build()
+ )
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/service/
FeedbackJobIntentService.kt
<#1265 (comment)>
:
> }
}
/**
* It's data class which describes info about a feedback
*/
- data class FeedBackItem(val email: String?,
- val feedbackMsg: String,
- val screenShot: String?)
+ data class FeedBackItem(
+ val email: String?,
+ val feedbackMsg: String,
+ val screenShot: String?
+ )
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/
ImportPgpContactActivity.kt
<#1265 (comment)>
:
> @@ -205,8 +221,12 @@ class ImportPgpContactActivity : BaseImportKeyActivity() {
private const val REQUEST_CODE_RUN_PREVIEW_ACTIVITY = 100
fun newIntent(context: Context, accountEntity: AccountEntity?): Intent {
- return newIntent(context = context, accountEntity = accountEntity, title = context.getString(R.string
- .add_public_keys_of_your_contacts), throwErrorIfDuplicateFoundEnabled = false, cls = ImportPgpContactActivity::class.java)
+ return newIntent(
+ context = context, accountEntity = accountEntity, title = context.getString(
+ R.string
again, this could be single line
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/
ImportPrivateKeyActivity.kt
<#1265 (comment)>
:
> context = this,
privateKeys = ArrayList(privateKeysFromEmailBackups),
sourceType = KeyImportDetails.SourceType.EMAIL,
positiveBtnTitle = getString(R.string.continue_),
- negativeBtnTitle = getString(R
- .string.choose_another_key),
+ negativeBtnTitle = getString(
+ R
+ .string.choose_another_key
could be single line
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/
ImportPublicKeyActivity.kt
<#1265 (comment)>
:
> if (keyDetailsList.isNotEmpty()) {
if (keyDetailsList.size == 1) {
val key = keyDetailsList.first()
if (key.isPrivate) {
- showInfoSnackbar(rootView, getString(R.string.file_has_wrong_pgp_structure, getString(R
- .string.public_)), Snackbar.LENGTH_LONG)
+ showInfoSnackbar(
+ rootView, getString(
+ R.string.file_has_wrong_pgp_structure, getString(
+ R
could be single line
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/
AttesterSettingsFragment.kt
<#1265 (comment)>
:
> @@ -103,13 +103,18 @@ class AttesterSettingsFragment : BaseFragment(), ListProgressBehaviour {
Result.Status.EXCEPTION -> {
sRL?.isRefreshing = false
- showStatus(it.exception?.message ?: it.exception?.javaClass?.simpleName ?: getString(R
- .string.unknown_error))
+ showStatus(
+ it.exception?.message ?: it.exception?.javaClass?.simpleName ?: getString(
+ R
could be single line
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/
CheckCredentialsFragment.kt
<#1265 (comment)>
:
> @@ -65,6 +65,9 @@ class CheckCredentialsFragment : BaseFragment(), ProgressBehaviour {
}
companion object {
- val KEY_CHECK_ACCOUNT_SETTINGS_RESULT = GeneralUtil.generateUniqueExtraKey("KEY_CHECK_ACCOUNT_SETTINGS_RESULT", CheckCredentialsFragment::class.java)
+ val KEY_CHECK_ACCOUNT_SETTINGS_RESULT = GeneralUtil.generateUniqueExtraKey(
+ "KEY_CHECK_ACCOUNT_SETTINGS_RESULT",
+ CheckCredentialsFragment::class.java
+ )
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/
fragment/EmailListFragment.kt
<#1265 (comment)>
:
>
MessageState.ERROR_CACHE_PROBLEM -> message = getString(R.string.there_is_problem_with_cache)
MessageState.ERROR_DURING_CREATION -> {
- message = getString(R.string.error_happened_during_creation, getString(R.string
- .support_email), messageEntity.errorMsg ?: "none")
-
- val twoWayDialogFragment = TwoWayDialogFragment.newInstance(dialogTitle = "",
- dialogMsg = message,
- positiveButtonTitle = getString(R.string.write_us),
- negativeButtonTitle = getString(R.string.delete_message),
- isCancelable = true)
+ message = getString(
+ R.string.error_happened_during_creation, getString(
+ R.string
could be single line
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/base/
BaseOAuthFragment.kt
<#1265 (comment)>
:
> @@ -100,6 +100,6 @@ abstract class BaseOAuthFragment : BaseFragment() {
companion object {
val KEY_AUTH_REQUEST =
- GeneralUtil.generateUniqueExtraKey("KEY_AUTH_REQUEST", BaseOAuthFragment::class.java)
+ GeneralUtil.generateUniqueExtraKey("KEY_AUTH_REQUEST", BaseOAuthFragment::class.java)
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/selection/
NodeKeyDetailsKeyProvider.kt
<#1265 (comment)>
:
> @@ -14,7 +14,8 @@ import com.flowcrypt.email.security.model.PgpKeyDetails
* Time: 4:56 PM
* E-mail: ***@***.***
*/
-class NodeKeyDetailsKeyProvider(private val items: List<PgpKeyDetails>) : ItemKeyProvider<PgpKeyDetails>(SCOPE_CACHED) {
+class NodeKeyDetailsKeyProvider(private val items: List<PgpKeyDetails>) :
+ ItemKeyProvider<PgpKeyDetails>(SCOPE_CACHED) {
override fun getKey(position: Int) = items.getOrNull(position)
override fun getPosition(key: PgpKeyDetails) = items.indexOf(key)
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/selection/
SelectionNodeKeyDetailsDetails.kt
<#1265 (comment)>
:
> @@ -14,8 +14,10 @@ import com.flowcrypt.email.security.model.PgpKeyDetails
* Time: 5:03 PM
* E-mail: ***@***.***
*/
-class SelectionNodeKeyDetailsDetails(private val position: Int,
- private val pgpKeyDetails: PgpKeyDetails?) : ItemDetailsLookup.ItemDetails<PgpKeyDetails>() {
+class SelectionNodeKeyDetailsDetails(
+ private val position: Int,
+ private val pgpKeyDetails: PgpKeyDetails?
+) : ItemDetailsLookup.ItemDetails<PgpKeyDetails>() {
override fun getSelectionKey() = pgpKeyDetails
override fun getPosition() = position
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/util/
FileAndDirectoryUtils.kt
<#1265 (comment)>
:
> @@ -102,8 +102,10 @@ class FileAndDirectoryUtils {
* @return created file.
*/
fun createFileWithIncreasedIndex(directory: File?, fileName: String): File {
- val patternWithIndex: Pattern = Pattern.compile("((?<Left>\\()(?<Digits>\\d+)(?<Right>\\))(?<Ext>(\\.\\w+)*|\\.+))\$",
- Pattern.CASE_INSENSITIVE)
+ val patternWithIndex: Pattern = Pattern.compile(
could be static lazy property
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/util/GeneralUtil.kt
<#1265 (comment)>
:
> @@ -101,7 +101,10 @@ class GeneralUtil {
*/
fun readFileFromUriToString(context: Context, uri: Uri): String? {
val inputStream = context.contentResolver.openInputStream(uri)
- return if (inputStream != null) IOUtils.toString(inputStream, StandardCharsets.UTF_8) else null
+ return if (inputStream != null) IOUtils.toString(
Need {}
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/util/acra/
CustomReportSender.kt
<#1265 (comment)>
:
> + "CPP",
+ "DTD",
+ "FLA",
+ "LUA",
+ "SLN",
+ "SWIFT",
+ "VCXPROJ",
+ "XCODEPROJ",
+ "BAK",
+ "TMP",
+ "CRDOWNLOAD",
+ "ICS",
+ "MSI",
+ "PART",
+ "TORRENT"
+ )
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/util/acra/
CustomReportSender.kt
<#1265 (comment)>
:
> + "ZIPX",
+ "BIN",
+ "CUE",
+ "DMG",
+ "ISO",
+ "MDF",
+ "TOAST",
+ "VCD",
+ "CLASS",
+ "CPP",
+ "DTD",
+ "FLA",
+ "LUA",
+ "SLN",
+ "SWIFT",
+ "VCXPROJ",
why not include more VS project extensions? (csproj, vbproj, sln, etc)
------------------------------
In FlowCrypt/src/main/java/com/flowcrypt/email/util/exception/
WrongPassPhraseException.kt
<#1265 (comment)>
:
> \ No newline at end of file
+class WrongPassPhraseException(message: String, cause: Throwable) :
+ FlowCryptException(message, cause)
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/res/drawable/ic_email_multiply_encrypted.xml
<#1265 (comment)>
:
> @@ -17,6 +17,6 @@
android:pathData="M21.591835 7.0847551l-8 4.9788139 -8.0000001 -4.9788139 0 -1.9915254 8.0000001 4.9788133 8 -4.9788133m0 -1.9915254l-16.0000001 0c-1.11 0 -2 0.8862288 -2 1.9915254l0 11.9491523a2 1.9915254 0 0 0 2 1.991526l16.0000001 0a2 1.9915254 0 0 0 2 -1.991526l0 -11.9491523c0 -1.1052966 -0.9 -1.9915254 -2 -1.9915254z" />
<path
android:pathData="M20.285715 1.6053333l0 0"
- android:strokeColor="#FF000000"
- android:strokeWidth="1" />
+ android:strokeWidth="1"
+ android:strokeColor="#FF000000" />
</vector>
missing EOL at EOF
------------------------------
In FlowCrypt/src/main/res/layout/message_part_pgp_message_
missing_private_key.xml
<#1265 (comment)>
:
> ***@***.***/default_margin_content_small"
+ ***@***.***/default_margin_content_small"
***@***.***/have_not_any_other_key"
***@***.***/AppWidget.Button.Green" />
</LinearLayout>
missing EOL at EOF
------------------------------
In FlowCrypt/src/test/java/com/flowcrypt/email/api/email/
FlowCryptMimeMessageTest.kt
<#1265 (comment)>
:
> @@ -49,7 +49,7 @@ class FlowCryptMimeMessageTest {
private fun extractDomainFromMessageID(messageId: String): String {
return messageId
- .substring(messageId.indexOf('@') + 1)
- .replace(">", "")
+ .substring(messageId.indexOf('@') + 1)
+ .replace(">", "")
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/test/java/com/flowcrypt/email/jfixture/
KotlinConstructorParameterCountComparator.kt
<#1265 (comment)>
:
>
- val ctor1Parameters = if (ctor1IsDefaultConstructorMarkerFound) 0 else ctor1.genericParameterTypes.size
- val ctor2Parameters = if (ctor2IsDefaultConstructorMarkerFound) 0 else ctor2.genericParameterTypes.size
+ val ctor1Parameters =
+ if (ctor1IsDefaultConstructorMarkerFound) 0 else ctor1.genericParameterTypes.size
+ val ctor2Parameters =
+ if (ctor2IsDefaultConstructorMarkerFound) 0 else ctor2.genericParameterTypes.size
return ctor1Parameters.compareTo(ctor2Parameters)
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/test/java/com/flowcrypt/email/jfixture/
SelectConstructorCustomisation.kt
<#1265 (comment)>
:
> }
override fun customise(fixture: JFixture) {
- val greedyConstructorRelay: SpecimenBuilder = ClassToConstructorRelay(mostParameterCountConstructorQuery, SpecificTypeSpecification(type))
+ val greedyConstructorRelay: SpecimenBuilder =
+ ClassToConstructorRelay(mostParameterCountConstructorQuery, SpecificTypeSpecification(type))
fixture.addBuilderToStartOfPipeline(greedyConstructorRelay)
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/
PgpEncryptTest.kt
<#1265 (comment)>
:
> recipientPGPSecretKeyRing = PGPainless.generateKeyRing()
- .***@***.***", RECEIVER_PASSWORD)
+ .***@***.***", RECEIVER_PASSWORD)
}
}
}
missing EOL at EOF
------------------------------
In FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/
activity/enterprise/SettingsActivityEnterpriseTest.kt
<#1265 (comment)>
:
>
@test
fun testBackupsDisabled() {
//need to wait database updates
Thread.sleep(1000)
onView(withText(getResString(R.string.backups)))
- .check(doesNotExist())
+ .check(doesNotExist())
}
}
missing EOL at EOF
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#1265 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEPTNYTWJTALOGFZJZTTQEPMTANCNFSM45WAJ6DQ>
.
--
--
Tom James Holub <http://holub.me/>
|
Contributor
|
most of that should be doable by proper tuning of the formatting settings and then enabling "format on save" |
IvanPizhenko
approved these changes
May 31, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixed applying code style. To prevent add just code style changes to commit.
close #1264
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):