Created
May 24, 2025 11:24
-
-
Save callmephil/41ed0a9cd6d018213d2e141f360c1f41 to your computer and use it in GitHub Desktop.
dart analysis options
This file contains hidden or 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
# This file configures the analyzer, which statically analyzes Dart code to | |
# check for errors, warnings, and lints. | |
# | |
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | |
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | |
# invoked from the command line by running `flutter analyze`. | |
# The following line activates a set of recommended lints for Flutter apps, | |
# packages, and plugins designed to encourage good coding practices. | |
include: package:very_good_analysis/analysis_options.yaml | |
analyzer: | |
exclude: | |
- build/** | |
- "**/*.g.dart" | |
- "**/*.freezed.dart" | |
- "**/*.graphql.dart" | |
- "**/*.pb.dart" | |
- "**/*.pbenum.dart" | |
- "**/*.pbjson.dart" | |
- "**/*.pbgrpc.dart" | |
- test/.test_coverage.dart | |
- lib/generated_plugin_registrant.dart | |
- lib/firebase_options.dart | |
language: | |
strict-casts: true | |
strict-inference: true | |
strict-raw-types: true | |
errors: | |
#recommend to ignore by freezed package author: | |
#https://github.com/rrousselGit/freezed/issues/488#issuecomment-894358980 | |
invalid_annotation_target: ignore | |
missing_required_param: error | |
missing_return: error | |
use_setters_to_change_properties: ignore | |
lines_longer_than_80_chars: ignore | |
plugins: | |
- custom_lint | |
linter: | |
rules: | |
public_member_api_docs: false | |
sort_pub_dependencies: false | |
avoid_positional_boolean_parameters: false | |
flutter_style_todos: false | |
always_put_required_named_parameters_first: false | |
avoid_returning_this: false | |
lines_longer_than_80_chars: false | |
# Learn more: https://dcm.dev/docs/individuals/configuration | |
dart_code_metrics: | |
extends: | |
- recommended | |
metrics: | |
cyclomatic-complexity: 20 | |
number-of-parameters: 4 | |
maximum-nesting-level: 5 | |
metrics-exclude: | |
- test/** | |
- build/** | |
- "**/*.g.dart" | |
- "**/*.freezed.dart" | |
- "**/*.graphql.dart" | |
- lib/generated_plugin_registrant.dart | |
- lib/firebase/firebase_options.dart | |
rules: | |
- prefer-trailing-comma: false | |
- unnecessary-trailing-comma: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment