From bd238ae548f8b8851d3ef156bd43a18f674d026d Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:15:16 +0200 Subject: [PATCH 01/18] :rotating_light: (analyser) remove some errors --- lib/analysis_options.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 380ae84..a060838 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -2,6 +2,15 @@ analyzer: language: strict-casts: true strict-inference: true + errors: + # Doesn't work with freezed and JsonKey + invalid_annotation_target: ignore + # Not that very usefull + inference_failure_on_function_invocation: ignore + # Not that very usefull + inference_failure_on_collection_literal: ignore + # Not that very usefull + inference_failure_on_instance_creation: ignore exclude: - 'build/**' From ddc21b27989b26626cdb5e4341ab784996ac659b Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:16:03 +0200 Subject: [PATCH 02/18] :rotating_light: (dcm) remove newline-before-case --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index a060838..78bcbc7 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -353,7 +353,6 @@ dart_code_metrics: - avoid-unused-instances - prefer-correct-for-loop-increment - prefer-public-exception-classes - - newline-before-case - avoid-unnecessary-reassignment - avoid-referencing-discarded-variables - avoid-unconditional-break From bedce52fdc94402591071610d2947ea778598111 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:16:24 +0200 Subject: [PATCH 03/18] :rotating_light: (dcm) remove map-keys-ordering --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 78bcbc7..2d48c4d 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -338,7 +338,6 @@ dart_code_metrics: - avoid-unnecessary-call - no-equal-nested-conditions - prefer-correct-error-name - - map-keys-ordering - avoid-unnecessary-futures - avoid-shadowed-extension-methods - avoid-barrel-files From aad4ac8c410184e25676f63593f5fc7e712d610e Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:16:43 +0200 Subject: [PATCH 04/18] :rotating_light: (dcm) remove avoid-async-call-in-sync-function --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 2d48c4d..1e7619e 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -346,7 +346,6 @@ dart_code_metrics: - missing-test-assertion - avoid-map-keys-contains - prefer-correct-json-casts - - avoid-async-call-in-sync-function - avoid-duplicate-mixins - avoid-nullable-interpolation - avoid-unused-instances From c430a85f0c5035c16ec6b79ac5424e855e663fbc Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:17:07 +0200 Subject: [PATCH 05/18] :rotating_light: (dcm) remove prefer-prefixed-global-constants --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 1e7619e..16ed3ed 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -376,7 +376,6 @@ dart_code_metrics: - prefer-explicit-type-arguments - avoid-unnecessary-super - prefer-correct-setter-parameter-name - - prefer-prefixed-global-constants - prefer-explicit-function-type - prefer-addition-subtraction-assignments - prefer-define-hero-tag From fa2a815e07fb7875b83829549aa1fcbb9bcefd61 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:17:31 +0200 Subject: [PATCH 06/18] :rotating_light: (dcm) remove avoid-missing-interpolation --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 16ed3ed..76142e1 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -358,7 +358,6 @@ dart_code_metrics: - avoid-identical-exception-handling-blocks - avoid-recursive-calls - move-variable-closer-to-its-usage - - avoid-missing-interpolation - avoid-unnecessary-if - avoid-passing-default-values - avoid-unnecessary-late From bbee220a7570040bac02bca3b9719f1efe351df5 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:17:53 +0200 Subject: [PATCH 07/18] :rotating_light: (dcm) remove prefer-first --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 76142e1..142f2fa 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -279,7 +279,6 @@ dart_code_metrics: - prefer-correct-test-file-name - prefer-correct-type-name - prefer-enums-by-name - - prefer-first - prefer-immediate-return - prefer-iterable-of - prefer-last From c9b6276e50c7f49c763070085907915fa532f787 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:18:20 +0200 Subject: [PATCH 08/18] :rotating_light: (dcm) remove move-variable-closer-to-its-usage --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 142f2fa..4848c45 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -356,7 +356,6 @@ dart_code_metrics: - avoid-weak-cryptographic-algorithms - avoid-identical-exception-handling-blocks - avoid-recursive-calls - - move-variable-closer-to-its-usage - avoid-unnecessary-if - avoid-passing-default-values - avoid-unnecessary-late From 01092d285dd34adf39122f59f7634b374eecf8a5 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:18:40 +0200 Subject: [PATCH 09/18] :rotating_light: (dcm) remove match-getter-setter-field-names --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 4848c45..9006530 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -360,7 +360,6 @@ dart_code_metrics: - avoid-passing-default-values - avoid-unnecessary-late - avoid-wildcard-cases-with-enums - - match-getter-setter-field-names - avoid-unnecessary-getter - avoid-long-files - avoid-accessing-collections-by-constant-index From 211ac058ee98317ed3d6aeb0f89645b68c0fee6f Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:19:34 +0200 Subject: [PATCH 10/18] :rotating_light: (dcm) remove avoid-late-context --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 9006530..3e91b61 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -393,7 +393,6 @@ dart_code_metrics: - dispose-fields - avoid-empty-setstate - avoid-inherited-widget-in-initstate - - avoid-late-context - avoid-state-constructors - avoid-unnecessary-stateful-widgets - avoid-stateless-widget-initialized-fields From 4aead4d0c555cc6082bf854c02b8f22004d6d539 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:19:56 +0200 Subject: [PATCH 11/18] :rotating_light: (dcm) remove prefer-correct-type-name --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 3e91b61..db0ae17 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -277,7 +277,6 @@ dart_code_metrics: - prefer-commenting-analyzer-ignores - prefer-conditional-expressions - prefer-correct-test-file-name - - prefer-correct-type-name - prefer-enums-by-name - prefer-immediate-return - prefer-iterable-of From d292b25499377a563adc7089d86463225094ef7f Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:20:18 +0200 Subject: [PATCH 12/18] :rotating_light: (dcm) remove prefer-addition-subtraction-assignments --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index db0ae17..1d6549c 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -372,7 +372,6 @@ dart_code_metrics: - avoid-unnecessary-super - prefer-correct-setter-parameter-name - prefer-explicit-function-type - - prefer-addition-subtraction-assignments - prefer-define-hero-tag - always-remove-listener - avoid-border-all From c6146eb91c0673bda721bfee9dd9ea1c8350c072 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:20:39 +0200 Subject: [PATCH 13/18] :rotating_light: (dcm) remove prefer-define-hero-tag --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 1d6549c..e7b668a 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -372,7 +372,6 @@ dart_code_metrics: - avoid-unnecessary-super - prefer-correct-setter-parameter-name - prefer-explicit-function-type - - prefer-define-hero-tag - always-remove-listener - avoid-border-all - avoid-returning-widgets From c90157197e041dd7290909012cc19358b8bbc107 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:21:01 +0200 Subject: [PATCH 14/18] :rotating_light: (dcm) remove avoid-redundant-positional-field-name --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index e7b668a..8a37d66 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -314,7 +314,6 @@ dart_code_metrics: - avoid-mixing-named-and-positional-fields - avoid-long-records - match-positional-field-names-on-assignment - - avoid-redundant-positional-field-name - avoid-bottom-type-in-patterns - avoid-explicit-pattern-field-name - prefer-wildcard-pattern From 2a9003ea593b895f85180858df01206f415f9fad Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:21:25 +0200 Subject: [PATCH 15/18] :rotating_light: (dcm) remove move-records-to-typedefs --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 8a37d66..920ffc6 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -307,7 +307,6 @@ dart_code_metrics: - avoid-throw-objects-without-tostring - avoid-unsafe-collection-methods - avoid-one-field-records - - move-records-to-typedefs - avoid-bottom-type-in-records - avoid-nested-records - avoid-function-type-in-records From b439072af89e2c845e0b8ec1fa02cf0250525a1e Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:21:45 +0200 Subject: [PATCH 16/18] :rotating_light: (dcm) remove avoid-substring --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 920ffc6..cdc9ec7 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -250,7 +250,6 @@ dart_code_metrics: rules: - avoid-unassigned-late-fields - - avoid-substring - avoid-cascade-after-if-null - avoid-collection-methods-with-unrelated-types - avoid-duplicate-exports From eabdab9d3316fd92202616cd66ae47f092e0db58 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:22:02 +0200 Subject: [PATCH 17/18] :rotating_light: (dcm) remove prefer-correct-error-name --- lib/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index cdc9ec7..79765c3 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -332,7 +332,6 @@ dart_code_metrics: - avoid-mutating-parameters - avoid-unnecessary-call - no-equal-nested-conditions - - prefer-correct-error-name - avoid-unnecessary-futures - avoid-shadowed-extension-methods - avoid-barrel-files From 2741e44731db2971fc80cf06abb242e9a0919a03 Mon Sep 17 00:00:00 2001 From: Matthieu Pernelle Date: Sun, 22 Sep 2024 14:25:13 +0200 Subject: [PATCH 18/18] :rotating_light: (dcm) change prefer-widget-private-members configuration --- lib/analysis_options.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index 79765c3..4a7c6b5 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -426,7 +426,7 @@ dart_code_metrics: - dispose-method - build-method - prefer-widget-private-members: - ignore-static: false + ignore-static: true ignored-names: - of - avoid-shadowing: