From 17352ff07ebaa5e7ec18bb849ae70bdef436a8ca Mon Sep 17 00:00:00 2001 From: Kenzie Davisson Date: Thu, 30 Jul 2026 10:53:16 -0700 Subject: [PATCH] Run dcm unused-code check over devtools_shared --- .github/workflows/build.yaml | 2 +- packages/devtools_shared/lib/src/server/flutter_store.dart | 6 ------ packages/devtools_shared/lib/src/utils/file_utils.dart | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f94a514ff7..ed990d47efa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,7 +86,7 @@ jobs: - name: Run dcm checks on packages # TODO(https://github.com/flutter/devtools/issues/9906): run on all DevTools packages. run: | - dcm check-unused-code packages/devtools_app --exclude-public-api + dcm check-unused-code packages/devtools_app packages/devtools_shared --exclude-public-api test-packages: name: ${{ matrix.os }} ${{ matrix.package }} test diff --git a/packages/devtools_shared/lib/src/server/flutter_store.dart b/packages/devtools_shared/lib/src/server/flutter_store.dart index a45ebdae279..e316c566ddd 100644 --- a/packages/devtools_shared/lib/src/server/flutter_store.dart +++ b/packages/devtools_shared/lib/src/server/flutter_store.dart @@ -7,16 +7,10 @@ import 'file_system.dart'; /// Provides access to the local Flutter store (~/.flutter). class FlutterStore { static const storeName = '.flutter'; - static const firstRunKey = 'firstRun'; - static const gaEnabledKey = 'enabled'; static const flutterClientIdKey = 'clientId'; final properties = IOPersistentProperties(storeName); - bool get isFirstRun => properties[firstRunKey] == true; - - bool get gaEnabled => properties[gaEnabledKey] == true; - String get flutterClientId => (properties[flutterClientIdKey] as String?) ?? ''; } diff --git a/packages/devtools_shared/lib/src/utils/file_utils.dart b/packages/devtools_shared/lib/src/utils/file_utils.dart index 38227205509..e9137974545 100644 --- a/packages/devtools_shared/lib/src/utils/file_utils.dart +++ b/packages/devtools_shared/lib/src/utils/file_utils.dart @@ -5,6 +5,7 @@ import 'package:dtd/dtd.dart'; import 'package:meta/meta.dart'; +// ignore: unused-code, false positive. const _fileUriPrefix = 'file://'; /// Attempts to detect the package root of [fileUriString], which is expected to