-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[various] Enable warnings as errors, and all warnings, for Android li…
…nt (#3648) For all Android plugins: - Enable all warnings for `lint` - Treat all warnings as errors for `lint` This significantly increases the scope of issues that we'll catch in CI. To allow enabling this without having to make tons of fixes first, so that we get the incremental benefit immediately, this adds new baselines for all plugins. We can incrementally clean those baselines up over time. (In practice we haven't prioritized that, but it would be good to start paying down that technical debt incrementally at some point.) See flutter/flutter#88011
- Loading branch information
1 parent
3437d91
commit 87459c4
Showing
32 changed files
with
13,996 additions
and
309 deletions.
There are no files selected for viewing
This file contains 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
3,126 changes: 3,059 additions & 67 deletions
3,126
packages/camera/camera_android/android/lint-baseline.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
1,434 changes: 1,434 additions & 0 deletions
1,434
packages/camera/camera_android_camerax/android/lint-baseline.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
15 changes: 15 additions & 0 deletions
15
packages/flutter_plugin_android_lifecycle/android/lint-baseline.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2"> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" | ||
errorLine1=" public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/flutter_plugin_android_lifecycle/FlutterAndroidLifecyclePlugin.java" | ||
line="18" | ||
column="35"/> | ||
</issue> | ||
|
||
</issues> |
This file contains 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
202 changes: 202 additions & 0 deletions
202
packages/google_maps_flutter/google_maps_flutter_android/android/lint-baseline.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<issues format="6" by="lint 7.0.1" type="baseline" client="gradle" name="AGP (7.0.1)" variant="all" version="7.0.1"> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `loadedCallbackPending` of class `GoogleMapController` requires synthetic accessor" | ||
errorLine1=" loadedCallbackPending = false;" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java" | ||
line="165" | ||
column="13"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` method `postFrameCallback` of class `GoogleMapController` requires synthetic accessor" | ||
errorLine1=" postFrameCallback(" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java" | ||
line="166" | ||
column="13"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` method `postFrameCallback` of class `GoogleMapController` requires synthetic accessor" | ||
errorLine1=" postFrameCallback(" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java" | ||
line="168" | ||
column="19"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `mapView` of class `GoogleMapController` requires synthetic accessor" | ||
errorLine1=" if (mapView != null) {" | ||
errorLine2=" ~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java" | ||
line="170" | ||
column="29"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `mapView` of class `GoogleMapController` requires synthetic accessor" | ||
errorLine1=" mapView.invalidate();" | ||
errorLine2=" ~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java" | ||
line="171" | ||
column="27"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` constructor of class `ProxyLifecycleProvider` requires synthetic accessor" | ||
errorLine1=" new ProxyLifecycleProvider(activity)));" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="64" | ||
column="19"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `lifecycle` of class `GoogleMapsPlugin` requires synthetic accessor" | ||
errorLine1=" return lifecycle;" | ||
errorLine2=" ~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="85" | ||
column="28"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `handler` of class `TileProviderController` requires synthetic accessor" | ||
errorLine1=" handler.post(" | ||
errorLine2=" ~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/TileProviderController.java" | ||
line="52" | ||
column="7"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `methodChannel` of class `TileProviderController` requires synthetic accessor" | ||
errorLine1=" methodChannel.invokeMethod(" | ||
errorLine2=" ~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/TileProviderController.java" | ||
line="54" | ||
column="15"/> | ||
</issue> | ||
|
||
<issue | ||
id="SyntheticAccessor" | ||
message="Access to `private` field `tileOverlayId` of class `TileProviderController` requires synthetic accessor" | ||
errorLine1=" Convert.tileOverlayArgumentsToJson(tileOverlayId, x, y, zoom)," | ||
errorLine2=" ~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/TileProviderController.java" | ||
line="56" | ||
column="54"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public PlatformView create(Context context, int id, Object args) {" | ||
errorLine2=" ~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java" | ||
line="33" | ||
column="10"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public PlatformView create(Context context, int id, Object args) {" | ||
errorLine2=" ~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java" | ||
line="33" | ||
column="30"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public PlatformView create(Context context, int id, Object args) {" | ||
errorLine2=" ~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java" | ||
line="33" | ||
column="55"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" final io.flutter.plugin.common.PluginRegistry.Registrar registrar) {" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="35" | ||
column="13"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public void onAttachedToEngine(FlutterPluginBinding binding) {" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="73" | ||
column="34"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public void onDetachedFromEngine(FlutterPluginBinding binding) {}" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="91" | ||
column="36"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public void onAttachedToActivity(ActivityPluginBinding binding) {" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="96" | ||
column="36"/> | ||
</issue> | ||
|
||
<issue | ||
id="UnknownNullness" | ||
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations" | ||
errorLine1=" public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding) {" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> | ||
<location | ||
file="src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java" | ||
line="106" | ||
column="54"/> | ||
</issue> | ||
|
||
</issues> |
This file contains 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
Oops, something went wrong.