blob: c74aee2273baf02a948f323db86ea83c79a7d40e [file] [log] [blame]
// Copyright (c) 2013, 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.
library analyze_api;
import 'package:sdk_library_metadata/libraries.dart';
import 'analyze_helper.dart';
import 'package:async_helper/async_helper.dart';
/**
* Map of white-listed warnings and errors.
*
* Only add a white-listing together with a bug report to dartbug.com and add
* the bug issue number as a comment on the white-listing.
*
* Use an identifiable suffix of the file uri as key. Use a fixed substring of
* the error/warning message in the list of white-listings for each file.
*/
// TODO(johnniwinther): Support canonical URIs as keys.
const Map<String, List<String>> WHITE_LIST = const {
"sdk/lib/_internal/js_runtime/lib/js_array.dart": const [
"Method type variables do not have a runtime value.",
],
"sdk/lib/collection/iterable.dart": const [
"Method type variables do not have a runtime value.",
],
"sdk/lib/collection/list.dart": const [
"Method type variables do not have a runtime value.",
"Method type variables are treated as `dynamic` in `as` expressions.",
],
"sdk/lib/collection/set.dart": const [
"Method type variables do not have a runtime value.",
],
"sdk/lib/core/iterable.dart": const [
"Method type variables do not have a runtime value.",
"Method type variables are treated as `dynamic` in `as` expressions.",
],
};
void main() {
var uriList = new List<Uri>();
libraries.forEach((String name, LibraryInfo info) {
if (info.documented) {
uriList.add(new Uri(scheme: 'dart', path: name));
}
});
asyncTest(() => analyze(uriList, WHITE_LIST, mode: AnalysisMode.ALL));
}