-
Notifications
You must be signed in to change notification settings - Fork 399
Check Dart formatting in all packages and in tool/ #9873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,13 +13,25 @@ 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 . | ||||||||
|
Comment on lines
+18
to
+19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [CONCERN] Running
Suggested change
|
||||||||
|
|
||||||||
| flutter test test/ | ||||||||
| popd | ||||||||
|
|
||||||||
| 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 . | ||||||||
|
Comment on lines
+30
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [CONCERN] Running
Suggested change
|
||||||||
|
|
||||||||
| # 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 . | ||||||||
|
Comment on lines
+50
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [CONCERN] Running
Suggested change
|
||||||||
|
|
||||||||
| dart test test/ | ||||||||
| popd | ||||||||
|
|
||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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/ | ||||||||
|
Comment on lines
+16
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [CONCERN] Running
Suggested change
|
||||||||
|
|
||||||||
| flutter test test/ | ||||||||
| popd | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[CONCERN] Running
$(dirname $(which flutter))/dartinvokes the Dart wrapper script fromflutter/bin, which can print "Waiting for another flutter command..." at inopportune times. As documented insetup.sh, thePATHis already configured to prioritize the direct Dart SDK binary. We should rundart formatdirectly instead, which also makes the explanatory comment unnecessary.