Commit 780e4e62 authored by Devon Carew's avatar Devon Carew

move the analysis_options to a file

parent 5fcaebbf
/**
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* This is a library that looks up messages for specific locales by
* delegating to the appropriate library.
......@@ -28,7 +28,7 @@ MessageLookupByLibrary _findExact(localeName) {
}
}
/** User programs should call this before using [localeName] for messages.*/
/// User programs should call this before using [localeName] for messages.
Future initializeMessages(String localeName) {
initializeInternalMessageLookup(() => new CompositeMessageLookup());
var lib = _deferredLibraries[Intl.canonicalizedLocale(localeName)];
......
/**
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* This is a library that provides messages for a en locale. All the
* messages from the main program should be duplicated here with the same
......
/**
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* This is a library that provides messages for a es locale. All the
* messages from the main program should be duplicated here with the same
......
# Specify analysis options.
#
# Note that until there is a default "all-in" lint rule-set we need
# to opt-in to all desired lints (https://github.com/dart-lang/sdk/issues/25843).
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
analyzer:
errors:
# we allow overriding fields (if they use super, ideally...)
strong_mode_invalid_field_override: ignore
# we allow type narrowing
strong_mode_invalid_method_override: ignore
todo: ignore
linter:
rules:
- always_declare_return_types
# we'll turn on avoid_as as soon as it doesn't complain about "as dynamic"
# - avoid_as
- camel_case_types
# sometimes we have no choice (e.g. when matching other platforms)
# - constant_identifier_names
- empty_constructor_bodies
# disabled until regexp fix is pulled in (https://github.com/flutter/flutter/pull/1996)
# - library_names
- library_prefixes
- non_constant_identifier_names
# too many false-positives; code review should catch real instances
# - one_member_abstracts
- slash_for_doc_comments
- super_goes_last
- type_init_formals
- unnecessary_brace_in_string_interp
......@@ -274,43 +274,10 @@ class AnalyzeCommand extends FlutterCommand {
for (String package in packages.keys)
packagesBody.writeln('$package:${path.toUri(packages[package])}');
/// Specify analysis options.
/// Note that until there is a default "all-in" lint rule-set we need
/// to opt-in to all desired lints (https://github.com/dart-lang/sdk/issues/25843).
/// For a list of lints, see: http://dart-lang.github.io/linter/lints/
String optionsBody = '''
analyzer:
errors:
# we allow overriding fields (if they use super, ideally...)
strong_mode_invalid_field_override: ignore
# we allow type narrowing
strong_mode_invalid_method_override: ignore
todo: ignore
linter:
rules:
- always_declare_return_types
# we'll turn on avoid_as as soon as it doesn't complain about "as dynamic"
# - avoid_as
- camel_case_types
# sometimes we have no choice (e.g. when matching other platforms)
# - constant_identifier_names
- empty_constructor_bodies
# disabled until regexp fix is pulled in (https://github.com/flutter/flutter/pull/1996)
# - library_names
- library_prefixes
- non_constant_identifier_names
# too many false-positives; code review should catch real instances
# - one_member_abstracts
- slash_for_doc_comments
- super_goes_last
- type_init_formals
- unnecessary_brace_in_string_interp
''';
// save the Dart file and the .packages file to disk
Directory host = Directory.systemTemp.createTempSync('flutter-analyze-');
File mainFile = new File(path.join(host.path, 'main.dart'))..writeAsStringSync(mainBody.toString());
File optionsFile = new File(path.join(host.path, '_analysis.options'))..writeAsStringSync(optionsBody.toString());
File optionsFile = new File(path.join(ArtifactStore.flutterRoot, 'packages', 'flutter_tools', '.analysis_options'));
File packagesFile = new File(path.join(host.path, '.packages'))..writeAsStringSync(packagesBody.toString());
List<String> cmd = <String>[
......@@ -648,7 +615,7 @@ class PackageDependencyTracker {
result.writeln('Package "$package" has conflicts:');
packages[package].describeConflict(result);
}
return result.toString();
return result.toString();
}
Map<String, String> asPackageMap() {
......
......@@ -2,7 +2,7 @@ import 'package:test/test.dart';
import 'package:flutter_tools/src/ios/simulators.dart';
main() {
void main() {
group('compareIosVersions', () {
test('compares correctly', () {
// This list must be sorted in ascending preference order
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:convert';
import 'dart:io';
......@@ -14,14 +15,14 @@ Process daemon;
// stopAll: stop any running app
// devices: list devices
main() async {
Future main() async {
daemon = await Process.start('flutter', ['daemon']);
print('daemon process started, pid: ${daemon.pid}');
daemon.stdout
.transform(UTF8.decoder)
.transform(const LineSplitter())
.listen((String line) => print('<== ${line}'));
.listen((String line) => print('<== $line'));
daemon.stderr.listen((data) => stderr.add(data));
stdout.write('> ');
......@@ -37,13 +38,13 @@ main() async {
} else if (line == 'devices') {
_send({'method': 'device.getDevices'});
} else {
print('command not understood: ${line}');
print('command not understood: $line');
}
stdout.write('> ');
});
daemon.exitCode.then((int code) {
print('daemon exiting (${code})');
print('daemon exiting ($code)');
exit(code);
});
}
......@@ -54,5 +55,5 @@ void _send(Map map) {
map['id'] = id++;
String str = '[${JSON.encode(map)}]';
daemon.stdin.writeln(str);
print('==> ${str}');
print('==> $str');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment