Make pkg/dart_messages strong.

BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2916023004 .
This commit is contained in:
Devon Carew 2017-06-08 21:55:04 -07:00
parent 3cbacefbe3
commit 303efec911
4 changed files with 6 additions and 4 deletions

View file

@ -0,0 +1,2 @@
analyzer:
strong-mode: true

View file

@ -4,7 +4,7 @@
import 'dart:math' as math; import 'dart:math' as math;
import '../lib/shared_messages.dart' as shared_messages; import 'package:dart_messages/shared_messages.dart' as shared_messages;
math.Random random = new math.Random(); math.Random random = new math.Random();
@ -13,7 +13,7 @@ final $A = "A".codeUnitAt(0);
final $Z = "Z".codeUnitAt(0); final $Z = "Z".codeUnitAt(0);
String computeId() { String computeId() {
List charCodes = []; List<int> charCodes = [];
for (int i = 0; i < idLength; i++) { for (int i = 0; i < idLength; i++) {
charCodes.add($A + random.nextInt($Z - $A)); charCodes.add($A + random.nextInt($Z - $A));
} }

View file

@ -5,7 +5,7 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io' as io; import 'dart:io' as io;
import '../lib/shared_messages.dart'; import 'package:dart_messages/shared_messages.dart';
const String jsonPath = '../lib/generated/shared_messages.json'; const String jsonPath = '../lib/generated/shared_messages.json';
const String dart2jsPath = const String dart2jsPath =

View file

@ -4,7 +4,7 @@
import 'dart:io' as io; import 'dart:io' as io;
import '../lib/shared_messages.dart'; import 'package:dart_messages/shared_messages.dart';
void testJsonIsUpdated() { void testJsonIsUpdated() {
var packageRoot = io.Platform.packageRoot; var packageRoot = io.Platform.packageRoot;