Set up Kotlin linting step in ci with ktlint (#143478)
Adds a kotlin linting step to the linux analyze check, using a version of [ktlint](https://github.com/pinterest/ktlint) hosted on [CIPD](https://chrome-infra-packages.appspot.com/p/flutter/ktlint/linux-amd64/+/version_1_1_1). Configured to disallow trailing commas, because of (and now acting as a test for) https://github.com/flutter/flutter/pull/145718. Because of this configuration the PR also removes some trailing commas in some kotlin files. Also checks in a baseline file.
This commit is contained in:
@@ -30,7 +30,7 @@ class MainActivity : FlutterActivity() {
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(
|
||||
@NonNull flutterEngine: FlutterEngine,
|
||||
@NonNull flutterEngine: FlutterEngine
|
||||
) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine)
|
||||
|
||||
@@ -43,11 +43,11 @@ class MainActivity : FlutterActivity() {
|
||||
override fun create(
|
||||
context: Context?,
|
||||
viewId: Int,
|
||||
args: Any?,
|
||||
args: Any?
|
||||
): PlatformView {
|
||||
return SimplePlatformView(this@MainActivity)
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Triggers the Android keyboard, which causes the resize of the Flutter view.
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
|
||||
class MainActivity : FlutterActivity() {
|
||||
override fun configureFlutterEngine(
|
||||
@NonNull flutterEngine: FlutterEngine,
|
||||
@NonNull flutterEngine: FlutterEngine
|
||||
) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user