| # Specify analysis options for all of flutter/cocoon |
| # |
| # Until there are meta linter rules, each desired lint must be explicitly enabled. |
| # See: https://github.com/dart-lang/linter/issues/288 |
| # |
| # For a list of lints, see: http://dart-lang.github.io/linter/lints/ |
| # See the configuration guide for more |
| # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer |
| # |
| # There are other similar analysis options files in the flutter repos, |
| # which should be kept in sync with this file: |
| # |
| # - analysis_options.yaml (this file) |
| # - packages/flutter/lib/analysis_options_user.yaml |
| # - https://github.com/flutter/packages/blob/main/analysis_options.yaml |
| # - https://github.com/flutter/engine/blob/main/analysis_options.yaml |
| # |
| # This file contains the analysis options used by Flutter tools, such as IntelliJ, |
| # Android Studio, and the `flutter analyze` command. |
| include: package:flutter_lints/flutter.yaml |
| |
| analyzer: |
| language: |
| strict-casts: false |
| strict-raw-types: true |
| errors: |
| # treat missing required parameters as a warning (not a hint) |
| missing_required_param: warning |
| # treat missing returns as a warning (not a hint) |
| missing_return: warning |
| # allow having TODOs in the code |
| todo: ignore |
| exclude: |
| - ".dart_tool/**" |
| - "**/*.g.dart" |
| - "**/*.pb.dart" |
| - "**/*.pbjson.dart" |
| - "**/*.pbgrpc.dart" |
| - "**/*.pbserver.dart" |
| - "**/*.pbenum.dart" |
| - "lib/generated_plugin_registrant.dart" |
| - "test/**/mocks.mocks.dart" |
| |
| linter: |
| rules: |
| use_super_parameters: true |
| prefer_final_fields: true |
| prefer_final_locals: true |
| prefer_single_quotes: true |
| require_trailing_commas: true |
| unawaited_futures: true |
| unnecessary_await_in_return: true |