mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Analyze package:testing.
R=johnniwinther@google.com Review-Url: https://codereview.chromium.org/2941493002 .
This commit is contained in:
parent
5917139015
commit
964384424a
9
pkg/testing/analysis_options.yaml
Normal file
9
pkg/testing/analysis_options.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
||||
# for details. All rights reserved. Use of this source code is governed by a
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
analyzer:
|
||||
strong-mode: true
|
||||
errors:
|
||||
# Allow having TODOs in the code
|
||||
todo: ignore
|
|
@ -158,9 +158,9 @@ Future<Null> analyzeUris(
|
|||
if (uris.isEmpty) return;
|
||||
String topLevel;
|
||||
try {
|
||||
topLevel = Uri
|
||||
.directory(await git("rev-parse", <String>["--show-toplevel"]))
|
||||
.toFilePath();
|
||||
topLevel = new Uri.directory(
|
||||
await git("rev-parse", <String>["--show-toplevel"]).trimRight())
|
||||
.toFilePath(windows: false);
|
||||
} catch (e) {
|
||||
topLevel = Uri.base.toFilePath(windows: false);
|
||||
}
|
||||
|
|
12
pkg/testing/test/analyze_test.dart
Normal file
12
pkg/testing/test/analyze_test.dart
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import "package:testing/src/run_tests.dart" as testing show main;
|
||||
|
||||
main() {
|
||||
// This method is async, but keeps a port open to prevent the VM from exiting
|
||||
// prematurely.
|
||||
return testing.main(
|
||||
<String>["--config=pkg/testing/testing.json", "--verbose", "analyze"]);
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
{ "Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file":0,
|
||||
"for details. All rights reserved. Use of this source code is governed by a":0,
|
||||
"BSD-style license that can be found in the LICENSE.md file.":0,
|
||||
{
|
||||
"":"Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file",
|
||||
"":"for details. All rights reserved. Use of this source code is governed by a",
|
||||
"":"BSD-style license that can be found in the LICENSE.md file.",
|
||||
|
||||
"packages": "../../.packages",
|
||||
|
||||
"suites": [
|
||||
{
|
||||
"name": "dart_vm",
|
||||
|
@ -15,10 +19,14 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
|
||||
"analyze": {
|
||||
"options": "analysis_options.yaml",
|
||||
|
||||
"uris": [
|
||||
"bin/",
|
||||
"lib/",
|
||||
"bin/run_tests.dart"
|
||||
"test/"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue