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()) diff --git a/tool/ci/bots.sh b/tool/ci/bots.sh index bd4a4b671b6..71371751ae9 100755 --- a/tool/ci/bots.sh +++ b/tool/ci/bots.sh @@ -15,10 +15,9 @@ 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. - $(dirname $(which flutter))/dart format --output=none --set-exit-if-changed . + # Here, we use the dart instance from the flutter SDK. + 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 29e45671952..6e086837e1c 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. + 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. + 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. + 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..29aa5dd85cb 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. +dart format --output=none --set-exit-if-changed lib/ test/ + flutter test test/ -popd \ No newline at end of file +popd