From 7b7df5e617ab75d3e5e43160bfc222ff427447dc Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 30 Jun 2026 15:14:40 -0700 Subject: [PATCH 1/3] Check formatting in all packages and in tool/ --- tool/ci/bots.sh | 3 +-- tool/ci/package_tests.sh | 17 +++++++++++++++++ tool/ci/tool_tests.sh | 5 +++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tool/ci/bots.sh b/tool/ci/bots.sh index bd4a4b671b6..877c16a464b 100755 --- a/tool/ci/bots.sh +++ b/tool/ci/bots.sh @@ -15,9 +15,8 @@ echo `pwd` if [ "$BOT" = "main" ]; then - # Verify that dart format has been run. echo "Checking formatting..." - # Here, we use the dart instance from the flutter sdk. + # Here, we use the dart instance from the flutter SDK. $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . # Make sure the app versions are in sync. diff --git a/tool/ci/package_tests.sh b/tool/ci/package_tests.sh index 29e45671952..812ca1cebc3 100755 --- a/tool/ci/package_tests.sh +++ b/tool/ci/package_tests.sh @@ -13,6 +13,11 @@ if [ "$PACKAGE" = "devtools_app_shared" ]; then pushd $DEVTOOLS_DIR/packages/devtools_app_shared echo `pwd` + + echo "Checking formatting..." + # Here, we use the dart instance from the flutter SDK. + $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + flutter test test/ popd @@ -20,6 +25,13 @@ elif [ "$PACKAGE" = "devtools_extensions" ]; then pushd $DEVTOOLS_DIR/packages/devtools_extensions echo `pwd` + + echo "Checking formatting..." + # Here, we use the dart instance from the flutter SDK. + $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + + # Note that this will _not_ test any tests in nested directories, if we add + # any. flutter test test/*_test.dart # Skip this on Windows because `flutter test --platform chrome` # appears to hang there. @@ -33,6 +45,11 @@ elif [ "$PACKAGE" = "devtools_shared" ]; then pushd $DEVTOOLS_DIR/packages/devtools_shared echo `pwd` + + echo "Checking formatting..." + # Here, we use the dart instance from the flutter SDK. + $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + dart test test/ popd diff --git a/tool/ci/tool_tests.sh b/tool/ci/tool_tests.sh index 58feb6ea690..63ac4e5839e 100755 --- a/tool/ci/tool_tests.sh +++ b/tool/ci/tool_tests.sh @@ -11,5 +11,10 @@ source ./tool/ci/setup.sh pushd $DEVTOOLS_DIR/tool echo `pwd` + +echo "Checking formatting..." +# Here, we use the dart instance from the flutter SDK. +$(dirname $(which flutter))/dart format --output=none --set-exit-if-changed lib/ test/ + flutter test test/ popd \ No newline at end of file From e025724a2e0f71fbe71de7994ff92d7924d8bc39 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 6 Jul 2026 10:17:20 -0700 Subject: [PATCH 2/3] feedback --- tool/ci/bots.sh | 2 +- tool/ci/package_tests.sh | 6 +++--- tool/ci/tool_tests.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tool/ci/bots.sh b/tool/ci/bots.sh index 877c16a464b..71371751ae9 100755 --- a/tool/ci/bots.sh +++ b/tool/ci/bots.sh @@ -17,7 +17,7 @@ if [ "$BOT" = "main" ]; then echo "Checking formatting..." # Here, we use the dart instance from the flutter SDK. - $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + dart format --output=none --set-exit-if-changed . # Make sure the app versions are in sync. dt repo-check diff --git a/tool/ci/package_tests.sh b/tool/ci/package_tests.sh index 812ca1cebc3..6e086837e1c 100755 --- a/tool/ci/package_tests.sh +++ b/tool/ci/package_tests.sh @@ -16,7 +16,7 @@ if [ "$PACKAGE" = "devtools_app_shared" ]; then echo "Checking formatting..." # Here, we use the dart instance from the flutter SDK. - $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + dart format --output=none --set-exit-if-changed . flutter test test/ popd @@ -28,7 +28,7 @@ elif [ "$PACKAGE" = "devtools_extensions" ]; then echo "Checking formatting..." # Here, we use the dart instance from the flutter SDK. - $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + dart format --output=none --set-exit-if-changed . # Note that this will _not_ test any tests in nested directories, if we add # any. @@ -48,7 +48,7 @@ elif [ "$PACKAGE" = "devtools_shared" ]; then echo "Checking formatting..." # Here, we use the dart instance from the flutter SDK. - $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + dart format --output=none --set-exit-if-changed . dart test test/ popd diff --git a/tool/ci/tool_tests.sh b/tool/ci/tool_tests.sh index 63ac4e5839e..29aa5dd85cb 100755 --- a/tool/ci/tool_tests.sh +++ b/tool/ci/tool_tests.sh @@ -14,7 +14,7 @@ echo `pwd` echo "Checking formatting..." # Here, we use the dart instance from the flutter SDK. -$(dirname $(which flutter))/dart format --output=none --set-exit-if-changed lib/ test/ +dart format --output=none --set-exit-if-changed lib/ test/ flutter test test/ -popd \ No newline at end of file +popd From 7145f5620c21edf02645548dedfcab4162182b1e Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 6 Jul 2026 10:27:38 -0700 Subject: [PATCH 3/3] format --- .../lib/src/server/handlers/_devtools_extensions.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/devtools_shared/lib/src/server/handlers/_devtools_extensions.dart b/packages/devtools_shared/lib/src/server/handlers/_devtools_extensions.dart index 0ee24d99475..22dded4394a 100644 --- a/packages/devtools_shared/lib/src/server/handlers/_devtools_extensions.dart +++ b/packages/devtools_shared/lib/src/server/handlers/_devtools_extensions.dart @@ -90,7 +90,8 @@ extension _ExtensionsApiHandler on Never { // separators, so the check holds for Windows file URIs as well. Requiring // an empty host rejects UNC paths (e.g. `file://server/share/...`) and // keeps `toFilePath()` from throwing on a non-local authority. - final isFileUri = devtoolsOptionsFileUri.scheme == 'file' && + final isFileUri = + devtoolsOptionsFileUri.scheme == 'file' && devtoolsOptionsFileUri.host.isEmpty; final fileName = isFileUri ? p.basename(devtoolsOptionsFileUri.toFilePath())