Ignore shared code for iOS platform implementation of Google Maps plugin - #12529
Ignore shared code for iOS platform implementation of Google Maps plugin#12529guidezpl wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates analysis_options.yaml to exclude the google_maps_flutter_ios_shared_code directory from static analysis. Feedback suggests that excluding this directory prevents static analysis of Dart files within it, and recommends adding a minimal pubspec.yaml file to the directory instead to properly resolve analyzer errors.
| # Ignore shared code for iOS platform implementation of Google Maps plugin. | ||
| - 'packages/google_maps_flutter/google_maps_flutter_ios_shared_code/**' |
There was a problem hiding this comment.
Excluding the entire google_maps_flutter_ios_shared_code directory from analysis prevents any Dart files within it (such as Pigeon definitions or utility scripts) from being statically analyzed and linted. This can lead to undetected compilation errors or code bitrot over time.
Instead of excluding the directory, a more robust approach to resolve the analyzer errors is to add a minimal pubspec.yaml file to packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ with publish_to: 'none' and the necessary dependencies. This will allow the Dart analyzer to correctly resolve imports and analyze the Dart files in this directory.
What's the context where analysis is being run on it in the first place? It's not a package, so our tooling ignores it. |
There are hundreds of analyzer errors surfaced by this directory since it has no pubspec. Exclude it from analysis