-
Notifications
You must be signed in to change notification settings - Fork 705
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
Tidying lint warnings #1691
Tidying lint warnings #1691
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 |
---|---|---|
|
@@ -28,8 +28,7 @@ Future main() async { | |
); | ||
print('Listening on localhost:${server.port}'); | ||
await for (HttpRequest request in server) { | ||
request.response | ||
..write('Hello, world!') | ||
..close(); | ||
request.response.write('Hello, world!'); | ||
await request.response.close(); | ||
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. 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. Aye, I'll do a full sweep of the tutorial samples 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. Also somewhere in dart-archive/dart-tutorials-samples#49 |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
// #docregion | ||
class Logger { | ||
final String name; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
// #docregion Musical | ||
mixin Musical { | ||
bool canPlayPiano = false; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
// #docregion class-with-distanceTo | ||
import 'dart:math'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
class Point { | ||
num x, y; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
import 'dart:math'; | ||
|
||
class Point { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
import 'dart:math'; | ||
|
||
class Point { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
class Rectangle { | ||
num left, top, width, height; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
// #docregion '' | ||
class Vector { | ||
final int x, y; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
library todo; | ||
|
||
class Todo { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
class SortedCollection { | ||
Function compare; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
class FooException implements Exception { | ||
final String msg; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// ignore_for_file: sort_constructors_first | ||
// #docregion class | ||
class Spacecraft { | ||
String name; | ||
|
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.
Do these *_.server.dart examples need to be kept in sync with their counterparts in
dart-lang/dart-tutorials-samples
? Not a blocker for this PR, I'm mostly asking just to get a general sense of our approach to this right now.See, e.g. https://github.com/dart-lang/dart-tutorials-samples/blob/master/httpserver/bin/hello_world_server.dart
(There are very slight differences between the code for these examples between dart-lang/site-www and dart-lang/dart-tutorials-samples)
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.
I'll create a PR for dart-lang/dart-tutorials-samples repo to bring those samples up to date. I see anagram, for example, is stuck in Dart v1.
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.
That took slightly longer than expected.
dart-archive/dart-tutorials-samples#49