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.TomlParseResult
|
||||
import org.tomlj.TomlTable
|
||||
@@ -200,7 +201,6 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
import org.gradle.api.services.BuildServiceParameters
|
||||
abstract class MozconfigService implements BuildService<MozconfigService.Params>, AutoCloseable {
|
||||
interface Params extends BuildServiceParameters {
|
||||
MapProperty<String, Object> getMozconfigParam()
|
||||
@@ -507,7 +507,6 @@ subprojects { project ->
|
||||
'ktlint_standard_max-line-length' : 'disabled',
|
||||
'ktlint_standard_property-naming' : '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_unnecessary-parentheses-before-trailing-lambda = disabled
|
||||
ktlint_standard_no-wildcard-imports = disabled
|
||||
ktlint_standard_parameter-list-spacing = disabled
|
||||
ktlint_standard_multiline-if-else = disabled
|
||||
|
||||
# rules that enforce style we don't want
|
||||
|
||||
@@ -22,8 +22,7 @@ data class Choice(
|
||||
var enable: Boolean = true,
|
||||
var label: String,
|
||||
var selected: Boolean = false,
|
||||
val isASeparator:
|
||||
Boolean = false,
|
||||
val isASeparator: Boolean = false,
|
||||
val children: Array<Choice>? = null,
|
||||
) : Parcelable {
|
||||
|
||||
|
||||
@@ -119,10 +119,12 @@ class DownloadsFeature(
|
||||
private val fragmentManager: FragmentManager? = null,
|
||||
private val promptsStyling: PromptsStyling? = null,
|
||||
private val shouldForwardToThirdParties: () -> Boolean = { false },
|
||||
private val customFirstPartyDownloadDialog:
|
||||
((Filename, ContentSize, PositiveActionCallback, NegativeActionCallback) -> Unit)? = null,
|
||||
private val customThirdPartyDownloadDialog:
|
||||
((ThirdPartyDownloaderApps, ThirdPartyDownloaderAppChosenCallback, NegativeActionCallback) -> Unit)? = null,
|
||||
private val customFirstPartyDownloadDialog: (
|
||||
(Filename, ContentSize, PositiveActionCallback, NegativeActionCallback) -> Unit
|
||||
)? = null,
|
||||
private val customThirdPartyDownloadDialog: (
|
||||
(ThirdPartyDownloaderApps, ThirdPartyDownloaderAppChosenCallback, NegativeActionCallback) -> Unit
|
||||
)? = null,
|
||||
private val fileHasNotEnoughStorageDialog: ((Filename) -> Unit) = {},
|
||||
) : LifecycleAwareFeature, PermissionsFeature {
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ ktlint_standard_if-else-wrapping = disabled
|
||||
ktlint_standard_unnecessary-parentheses-before-trailing-lambda = disabled
|
||||
ktlint_standard_function-literal = disabled
|
||||
ktlint_standard_try-catch-finally-spacing = disabled
|
||||
ktlint_standard_parameter-list-spacing = disabled
|
||||
|
||||
|
||||
# rules that enforce style we don't want
|
||||
|
||||
@@ -215,8 +215,7 @@ internal data class BulletPoint(
|
||||
*/
|
||||
internal enum class InfoScreenTopic(
|
||||
@StringRes val titleId: Int,
|
||||
val bulletPoints:
|
||||
List<Pair<BulletPoint, SupportUtils.SumoTopic?>>,
|
||||
val bulletPoints: List<Pair<BulletPoint, SupportUtils.SumoTopic?>>,
|
||||
) {
|
||||
DEFAULT(
|
||||
titleId = R.string.preference_doh_default_protection,
|
||||
|
||||
@@ -61,8 +61,8 @@ sealed class TranslationPageSettingsOption(
|
||||
*/
|
||||
data class NeverTranslateSite(
|
||||
override val hasDivider: Boolean = true,
|
||||
override val descriptionId:
|
||||
Int = R.string.translation_option_bottom_sheet_switch_never_translate_site_description,
|
||||
override val descriptionId: Int =
|
||||
R.string.translation_option_bottom_sheet_switch_never_translate_site_description,
|
||||
) : TranslationPageSettingsOption(hasDivider = hasDivider)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user