Bug 1964352 - Enable standard:parameter-list-spacing ktlint rule and fix errors. r=geckoview-reviewers,android-reviewers,nalexander
Kotlin style guide: No new line before parameter type. Differential Revision: https://phabricator.services.mozilla.com/D248505
This commit is contained in:
committed by
mcarare@mozilla.com
parent
faac969cf5
commit
7cf165fed2
@@ -1,3 +1,4 @@
|
|||||||
|
import org.gradle.api.services.BuildServiceParameters
|
||||||
import org.tomlj.Toml
|
import org.tomlj.Toml
|
||||||
import org.tomlj.TomlParseResult
|
import org.tomlj.TomlParseResult
|
||||||
import org.tomlj.TomlTable
|
import org.tomlj.TomlTable
|
||||||
@@ -200,7 +201,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import org.gradle.api.services.BuildServiceParameters
|
|
||||||
abstract class MozconfigService implements BuildService<MozconfigService.Params>, AutoCloseable {
|
abstract class MozconfigService implements BuildService<MozconfigService.Params>, AutoCloseable {
|
||||||
interface Params extends BuildServiceParameters {
|
interface Params extends BuildServiceParameters {
|
||||||
MapProperty<String, Object> getMozconfigParam()
|
MapProperty<String, Object> getMozconfigParam()
|
||||||
@@ -507,7 +507,6 @@ subprojects { project ->
|
|||||||
'ktlint_standard_max-line-length' : 'disabled',
|
'ktlint_standard_max-line-length' : 'disabled',
|
||||||
'ktlint_standard_property-naming' : 'disabled',
|
'ktlint_standard_property-naming' : 'disabled',
|
||||||
'ktlint_standard_statement-wrapping' : 'disabled',
|
'ktlint_standard_statement-wrapping' : 'disabled',
|
||||||
'ktlint_standard_type-parameter-list-spacing': 'disabled',
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ ktlint_standard_if-else-wrapping = disabled
|
|||||||
ktlint_standard_no-single-line-block-comment = disabled
|
ktlint_standard_no-single-line-block-comment = disabled
|
||||||
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
|
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
|
||||||
ktlint_standard_no-wildcard-imports = disabled
|
ktlint_standard_no-wildcard-imports = disabled
|
||||||
ktlint_standard_parameter-list-spacing = disabled
|
|
||||||
ktlint_standard_multiline-if-else = disabled
|
ktlint_standard_multiline-if-else = disabled
|
||||||
|
|
||||||
# rules that enforce style we don't want
|
# rules that enforce style we don't want
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ data class Choice(
|
|||||||
var enable: Boolean = true,
|
var enable: Boolean = true,
|
||||||
var label: String,
|
var label: String,
|
||||||
var selected: Boolean = false,
|
var selected: Boolean = false,
|
||||||
val isASeparator:
|
val isASeparator: Boolean = false,
|
||||||
Boolean = false,
|
|
||||||
val children: Array<Choice>? = null,
|
val children: Array<Choice>? = null,
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
|
|
||||||
|
|||||||
@@ -119,10 +119,12 @@ class DownloadsFeature(
|
|||||||
private val fragmentManager: FragmentManager? = null,
|
private val fragmentManager: FragmentManager? = null,
|
||||||
private val promptsStyling: PromptsStyling? = null,
|
private val promptsStyling: PromptsStyling? = null,
|
||||||
private val shouldForwardToThirdParties: () -> Boolean = { false },
|
private val shouldForwardToThirdParties: () -> Boolean = { false },
|
||||||
private val customFirstPartyDownloadDialog:
|
private val customFirstPartyDownloadDialog: (
|
||||||
((Filename, ContentSize, PositiveActionCallback, NegativeActionCallback) -> Unit)? = null,
|
(Filename, ContentSize, PositiveActionCallback, NegativeActionCallback) -> Unit
|
||||||
private val customThirdPartyDownloadDialog:
|
)? = null,
|
||||||
((ThirdPartyDownloaderApps, ThirdPartyDownloaderAppChosenCallback, NegativeActionCallback) -> Unit)? = null,
|
private val customThirdPartyDownloadDialog: (
|
||||||
|
(ThirdPartyDownloaderApps, ThirdPartyDownloaderAppChosenCallback, NegativeActionCallback) -> Unit
|
||||||
|
)? = null,
|
||||||
private val fileHasNotEnoughStorageDialog: ((Filename) -> Unit) = {},
|
private val fileHasNotEnoughStorageDialog: ((Filename) -> Unit) = {},
|
||||||
) : LifecycleAwareFeature, PermissionsFeature {
|
) : LifecycleAwareFeature, PermissionsFeature {
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ ktlint_standard_if-else-wrapping = disabled
|
|||||||
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
|
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
|
||||||
ktlint_standard_function-literal = disabled
|
ktlint_standard_function-literal = disabled
|
||||||
ktlint_standard_try-catch-finally-spacing = disabled
|
ktlint_standard_try-catch-finally-spacing = disabled
|
||||||
ktlint_standard_parameter-list-spacing = disabled
|
|
||||||
|
|
||||||
|
|
||||||
# rules that enforce style we don't want
|
# rules that enforce style we don't want
|
||||||
|
|||||||
@@ -215,8 +215,7 @@ internal data class BulletPoint(
|
|||||||
*/
|
*/
|
||||||
internal enum class InfoScreenTopic(
|
internal enum class InfoScreenTopic(
|
||||||
@StringRes val titleId: Int,
|
@StringRes val titleId: Int,
|
||||||
val bulletPoints:
|
val bulletPoints: List<Pair<BulletPoint, SupportUtils.SumoTopic?>>,
|
||||||
List<Pair<BulletPoint, SupportUtils.SumoTopic?>>,
|
|
||||||
) {
|
) {
|
||||||
DEFAULT(
|
DEFAULT(
|
||||||
titleId = R.string.preference_doh_default_protection,
|
titleId = R.string.preference_doh_default_protection,
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ sealed class TranslationPageSettingsOption(
|
|||||||
*/
|
*/
|
||||||
data class NeverTranslateSite(
|
data class NeverTranslateSite(
|
||||||
override val hasDivider: Boolean = true,
|
override val hasDivider: Boolean = true,
|
||||||
override val descriptionId:
|
override val descriptionId: Int =
|
||||||
Int = R.string.translation_option_bottom_sheet_switch_never_translate_site_description,
|
R.string.translation_option_bottom_sheet_switch_never_translate_site_description,
|
||||||
) : TranslationPageSettingsOption(hasDivider = hasDivider)
|
) : TranslationPageSettingsOption(hasDivider = hasDivider)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ open class BaseSessionTest(
|
|||||||
fun Any?.asJsonArray(): JSONArray = this as JSONArray
|
fun Any?.asJsonArray(): JSONArray = this as JSONArray
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
fun<V> JSONObject.asMap(): Map<String?, V?> {
|
fun <V> JSONObject.asMap(): Map<String?, V?> {
|
||||||
val result = HashMap<String?, V?>()
|
val result = HashMap<String?, V?>()
|
||||||
for (key in this.keys()) {
|
for (key in this.keys()) {
|
||||||
result[key] = this[key] as V
|
result[key] = this[key] as V
|
||||||
@@ -325,7 +325,7 @@ open class BaseSessionTest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
fun<T> Any?.asJSList(): List<T> {
|
fun <T> Any?.asJSList(): List<T> {
|
||||||
val array = this.asJsonArray()
|
val array = this.asJsonArray()
|
||||||
val result = ArrayList<T>()
|
val result = ArrayList<T>()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user