From f8f911c92037b8c27df511f38ac35c9d161ef179 Mon Sep 17 00:00:00 2001 From: zarzet <42882290+zarzet@users.noreply.github.com> Date: Sun, 18 Oct 2026 22:02:48 +0700 Subject: [PATCH] chore(analysis): analyze hand-written l10n files and correct the lint comment Only the generated app_localizations*.dart files need excluding; l10n.dart and supported_locales.dart are hand-written. The unreachable_from_main comment now states what the lint actually checks. --- analysis_options.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index a414d5a1..789ef5df 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,7 +9,7 @@ analyzer: - .dart_tool/** - docs/internal/** - lib/**/*.g.dart - - lib/l10n/*.dart + - lib/l10n/app_localizations*.dart - android/** - ios/** - web/** @@ -31,6 +31,8 @@ linter: type_annotate_public_apis: true cancel_subscriptions: true close_sinks: true - # Catches dead cross-layer chains (Dart wrapper kept alive only by its own - # declaration) before they accumulate into another dedup campaign. + # Reports top-level declarations unreachable from the `main` of an + # analyzed executable library (the app entry point and test files). It does + # not detect unused public members of library files, such as services or + # providers, which have no `main` of their own. unreachable_from_main: true