From c8f48acf52f44c5246f767c846b86ec01f4ddbd6 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Mon, 16 Feb 2026 10:50:50 +0100 Subject: [PATCH] consolidated analysis options --- analysis_options.yaml | 22 ++++++++++ app/analysis_options.yaml | 41 ++----------------- app/pubspec.yaml | 1 - .../analysis_options.yaml | 35 ++-------------- .../example/analysis_options.yaml | 30 ++------------ .../example/pubspec.yaml | 2 +- packages/flutter_tor/analysis_options.yaml | 6 +-- .../flutter_tor/example/analysis_options.yaml | 35 ++-------------- packages/flutter_tor/example/pubspec.yaml | 2 +- .../locale_resolver/analysis_options.yaml | 35 ++-------------- .../example/analysis_options.yaml | 30 ++------------ packages/locale_resolver/example/pubspec.yaml | 2 +- .../analysis_options.yaml | 35 ++-------------- .../example/analysis_options.yaml | 30 ++------------ .../example/pubspec.yaml | 2 +- .../analysis_options.yaml | 6 +-- .../example/analysis_options.yaml | 30 ++------------ .../example/pubspec.yaml | 2 +- packages/speech_to_text_dialog/pubspec.yaml | 2 +- 19 files changed, 61 insertions(+), 287 deletions(-) create mode 100644 analysis_options.yaml diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..ad8064aa --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,22 @@ +# Root analysis options for the WebLibre monorepo +# This file is included by all packages using relative paths + +include: package:lint/package.yaml + +linter: + rules: + unawaited_futures: true + discarded_futures: true + collection_methods_unrelated_type: true + +analyzer: + exclude: + - "**.g.dart" + - "**.drift" + - "**.drift.dart" + - "test/drift/**" + - "build/**" + +plugins: + fast_equatable_lint: ^1.0.0 + riverpod_lint: ^3.1.3 diff --git a/app/analysis_options.yaml b/app/analysis_options.yaml index 10e71f47..3075c75e 100644 --- a/app/analysis_options.yaml +++ b/app/analysis_options.yaml @@ -1,39 +1,4 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. +# Analysis options for the WebLibre app +# Includes root configuration with app-specific overrides -include: package:lint/strict.yaml -# Uncomment the following section to specify additional rules. - -linter: - rules: - unawaited_futures: true - discarded_futures: true - collection_methods_unrelated_type: true - -analyzer: - errors: - overridden_fields: ignore - exclude: - - "**.drift" - - "**.drift.dart" - - "**.g.dart" - - "**.swagger.dart" - - "**.freezed.dart" - - "**.chopper.dart" - - "build/**" - - "test/drift/**" -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: ../analysis_options.yaml \ No newline at end of file diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 9a27cad1..d8b2f53d 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -103,7 +103,6 @@ dev_dependencies: lint: ^2.8.0 mockito: ^5.6.3 riverpod_generator: ^4.0.3 - riverpod_lint: ^3.1.3 flutter: uses-material-design: true diff --git a/packages/flutter_mozilla_components/analysis_options.yaml b/packages/flutter_mozilla_components/analysis_options.yaml index 5cd4b586..9296c66b 100644 --- a/packages/flutter_mozilla_components/analysis_options.yaml +++ b/packages/flutter_mozilla_components/analysis_options.yaml @@ -1,33 +1,4 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. +# Analysis options for flutter_mozilla_components package +# Includes root configuration from monorepo -include: package:lint/package.yaml -# Uncomment the following section to specify additional rules. - -linter: - rules: - unawaited_futures: true - discarded_futures: true - collection_methods_unrelated_type: true - -analyzer: - exclude: - - "**.g.dart" - - "**.swagger.dart" - - "**.freezed.dart" - - "**.chopper.dart" -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: ../../analysis_options.yaml diff --git a/packages/flutter_mozilla_components/example/analysis_options.yaml b/packages/flutter_mozilla_components/example/analysis_options.yaml index 0d290213..aced0bf1 100644 --- a/packages/flutter_mozilla_components/example/analysis_options.yaml +++ b/packages/flutter_mozilla_components/example/analysis_options.yaml @@ -1,28 +1,4 @@ -# 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`. +# Analysis options for flutter_mozilla_components example +# Includes root configuration from monorepo -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../../analysis_options.yaml diff --git a/packages/flutter_mozilla_components/example/pubspec.yaml b/packages/flutter_mozilla_components/example/pubspec.yaml index 8302d4ab..557cd6b0 100644 --- a/packages/flutter_mozilla_components/example/pubspec.yaml +++ b/packages/flutter_mozilla_components/example/pubspec.yaml @@ -20,7 +20,7 @@ dev_dependencies: sdk: flutter flutter_test: sdk: flutter - flutter_lints: ^6.0.0 + lint: ^2.8.0 flutter: uses-material-design: true diff --git a/packages/flutter_tor/analysis_options.yaml b/packages/flutter_tor/analysis_options.yaml index a5744c1c..295cbf86 100644 --- a/packages/flutter_tor/analysis_options.yaml +++ b/packages/flutter_tor/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +# Analysis options for flutter_tor package +# Includes root configuration from monorepo -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../analysis_options.yaml diff --git a/packages/flutter_tor/example/analysis_options.yaml b/packages/flutter_tor/example/analysis_options.yaml index 5cd4b586..0d8859fb 100644 --- a/packages/flutter_tor/example/analysis_options.yaml +++ b/packages/flutter_tor/example/analysis_options.yaml @@ -1,33 +1,4 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. +# Analysis options for flutter_tor example +# Includes root configuration from monorepo -include: package:lint/package.yaml -# Uncomment the following section to specify additional rules. - -linter: - rules: - unawaited_futures: true - discarded_futures: true - collection_methods_unrelated_type: true - -analyzer: - exclude: - - "**.g.dart" - - "**.swagger.dart" - - "**.freezed.dart" - - "**.chopper.dart" -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: ../../../analysis_options.yaml diff --git a/packages/flutter_tor/example/pubspec.yaml b/packages/flutter_tor/example/pubspec.yaml index 4df7cb58..a5ec7096 100644 --- a/packages/flutter_tor/example/pubspec.yaml +++ b/packages/flutter_tor/example/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: socks5_proxy: ^2.1.1 dev_dependencies: - flutter_lints: ^6.0.0 + lint: ^2.8.0 flutter_test: sdk: flutter integration_test: diff --git a/packages/locale_resolver/analysis_options.yaml b/packages/locale_resolver/analysis_options.yaml index 5cd4b586..d0b7f6d1 100644 --- a/packages/locale_resolver/analysis_options.yaml +++ b/packages/locale_resolver/analysis_options.yaml @@ -1,33 +1,4 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. +# Analysis options for locale_resolver package +# Includes root configuration from monorepo -include: package:lint/package.yaml -# Uncomment the following section to specify additional rules. - -linter: - rules: - unawaited_futures: true - discarded_futures: true - collection_methods_unrelated_type: true - -analyzer: - exclude: - - "**.g.dart" - - "**.swagger.dart" - - "**.freezed.dart" - - "**.chopper.dart" -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: ../../analysis_options.yaml diff --git a/packages/locale_resolver/example/analysis_options.yaml b/packages/locale_resolver/example/analysis_options.yaml index 0d290213..85337839 100644 --- a/packages/locale_resolver/example/analysis_options.yaml +++ b/packages/locale_resolver/example/analysis_options.yaml @@ -1,28 +1,4 @@ -# 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`. +# Analysis options for locale_resolver example +# Includes root configuration from monorepo -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../../analysis_options.yaml diff --git a/packages/locale_resolver/example/pubspec.yaml b/packages/locale_resolver/example/pubspec.yaml index ee6ce6a0..c2c0cc9a 100644 --- a/packages/locale_resolver/example/pubspec.yaml +++ b/packages/locale_resolver/example/pubspec.yaml @@ -41,7 +41,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^6.0.0 + lint: ^2.8.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/simple_intent_receiver/analysis_options.yaml b/packages/simple_intent_receiver/analysis_options.yaml index 5cd4b586..aca58d1c 100644 --- a/packages/simple_intent_receiver/analysis_options.yaml +++ b/packages/simple_intent_receiver/analysis_options.yaml @@ -1,33 +1,4 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. +# Analysis options for simple_intent_receiver package +# Includes root configuration from monorepo -include: package:lint/package.yaml -# Uncomment the following section to specify additional rules. - -linter: - rules: - unawaited_futures: true - discarded_futures: true - collection_methods_unrelated_type: true - -analyzer: - exclude: - - "**.g.dart" - - "**.swagger.dart" - - "**.freezed.dart" - - "**.chopper.dart" -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: ../../analysis_options.yaml diff --git a/packages/simple_intent_receiver/example/analysis_options.yaml b/packages/simple_intent_receiver/example/analysis_options.yaml index 0d290213..d4b20b00 100644 --- a/packages/simple_intent_receiver/example/analysis_options.yaml +++ b/packages/simple_intent_receiver/example/analysis_options.yaml @@ -1,28 +1,4 @@ -# 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`. +# Analysis options for simple_intent_receiver example +# Includes root configuration from monorepo -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../../analysis_options.yaml diff --git a/packages/simple_intent_receiver/example/pubspec.yaml b/packages/simple_intent_receiver/example/pubspec.yaml index ecb09d6f..25598efb 100644 --- a/packages/simple_intent_receiver/example/pubspec.yaml +++ b/packages/simple_intent_receiver/example/pubspec.yaml @@ -42,7 +42,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^6.0.0 + lint: ^2.8.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/speech_to_text_dialog/analysis_options.yaml b/packages/speech_to_text_dialog/analysis_options.yaml index a5744c1c..cc72686c 100644 --- a/packages/speech_to_text_dialog/analysis_options.yaml +++ b/packages/speech_to_text_dialog/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +# Analysis options for speech_to_text_dialog package +# Includes root configuration from monorepo -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../analysis_options.yaml diff --git a/packages/speech_to_text_dialog/example/analysis_options.yaml b/packages/speech_to_text_dialog/example/analysis_options.yaml index 0d290213..0aa17652 100644 --- a/packages/speech_to_text_dialog/example/analysis_options.yaml +++ b/packages/speech_to_text_dialog/example/analysis_options.yaml @@ -1,28 +1,4 @@ -# 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`. +# Analysis options for speech_to_text_dialog example +# Includes root configuration from monorepo -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: ../../../analysis_options.yaml diff --git a/packages/speech_to_text_dialog/example/pubspec.yaml b/packages/speech_to_text_dialog/example/pubspec.yaml index 3da990ec..2b85770c 100644 --- a/packages/speech_to_text_dialog/example/pubspec.yaml +++ b/packages/speech_to_text_dialog/example/pubspec.yaml @@ -41,7 +41,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^6.0.0 + lint: ^2.8.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/speech_to_text_dialog/pubspec.yaml b/packages/speech_to_text_dialog/pubspec.yaml index 9d716e7a..004d9b38 100644 --- a/packages/speech_to_text_dialog/pubspec.yaml +++ b/packages/speech_to_text_dialog/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^6.0.0 + lint: ^2.8.0 pigeon: ^26.1.7 flutter: