The literal_only_boolean_expressions analyzer hint flags this code:
while (true) {
...
if (cond) break;
...
}
=> This is very common code.
The unnecessary_await_in_return analyzer hint flags this code:
Future foo() async {
...
return await foo();
}
=> Addressing this hint by removing the `await` changes semantics,
performance characteristics and async stack traces.
Change-Id: I3c126123bfba7386b01033084e954267af21ba13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152001
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This hint flags code such as
int time = watch.elapsedMillisecond;
and encourages using `var` everywhere:
var time = watch.elapsedMillisecond;
Though if the type is not obvious to a developer, we should be allowed
to write it.
Furthermore it copies the rules from
`package:pedantic/analysis_options-1.9.0.yaml` to avoid being
automatically opted-in to new rules when a new package:pedantic
gets rolled into the SDK.
Change-Id: I45c72584885c608a56745685e9068ba83dfbed47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151526
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The benchmark spawns an isolate that compiles hello world app with dart2js, measures time it takes for spawned isolate to get up and running, measures delta rss when isolate is spawned.
This also adds analysis_options.yaml that helps with keeping the code lint-free.
Change-Id: I5f1ffa9706766cd00bf1ea3fdad76957952de8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119538
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>