From 2ff90a0e9c2bd2731abb5526910fe766414713b7 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 7 Jun 2024 13:37:27 +0300 Subject: [PATCH] enable DCM --- analysis_options.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 6640b461..da6d9792 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -154,4 +154,16 @@ linter: use_test_throws_matchers: true valid_regexps: true void_checks: false - +dart_code_metrics: + extends: + - recommended + rules: + - avoid-shadowing: false # we shadow a lot, e.g. context in callbacks + - avoid-unsafe-collection-methods: false # we use foo[index] where index may not exist in theory, but in practice they will, in tests. also we can just handle the exceptions when they occur + - prefer-prefixed-global-constants: false # we don't really care for the 'k' prefix + - prefer-single-widget-per-file: false + - avoid-passing-self-as-argument: false # fairly harmless. and e.g. drift calls are like this + formatter: + indent: 0 + line-length: 100 + cascading-widget-extensions: true