Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
780e4e62
Commit
780e4e62
authored
Mar 10, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move the analysis_options to a file
parent
5fcaebbf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
45 deletions
+45
-45
stock_messages_all.dart
examples/stocks/lib/i18n/stock_messages_all.dart
+2
-2
stock_messages_en.dart
examples/stocks/lib/i18n/stock_messages_en.dart
+1
-1
stock_messages_es.dart
examples/stocks/lib/i18n/stock_messages_es.dart
+1
-1
.analysis_options
packages/flutter_tools/.analysis_options
+32
-0
analyze.dart
packages/flutter_tools/lib/src/commands/analyze.dart
+2
-35
simulators_test.dart
packages/flutter_tools/test/src/ios/simulators_test.dart
+1
-1
daemon_client.dart
packages/flutter_tools/tool/daemon_client.dart
+6
-5
No files found.
examples/stocks/lib/i18n/stock_messages_all.dart
View file @
780e4e62
/*
*
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* 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
* This is a library that looks up messages for specific locales by
* delegating to the appropriate library.
* delegating to the appropriate library.
...
@@ -28,7 +28,7 @@ MessageLookupByLibrary _findExact(localeName) {
...
@@ -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
)
{
Future
initializeMessages
(
String
localeName
)
{
initializeInternalMessageLookup
(()
=>
new
CompositeMessageLookup
());
initializeInternalMessageLookup
(()
=>
new
CompositeMessageLookup
());
var
lib
=
_deferredLibraries
[
Intl
.
canonicalizedLocale
(
localeName
)];
var
lib
=
_deferredLibraries
[
Intl
.
canonicalizedLocale
(
localeName
)];
...
...
examples/stocks/lib/i18n/stock_messages_en.dart
View file @
780e4e62
/*
*
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* 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
* 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
* messages from the main program should be duplicated here with the same
...
...
examples/stocks/lib/i18n/stock_messages_es.dart
View file @
780e4e62
/*
*
/*
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
* 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
* 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
* messages from the main program should be duplicated here with the same
...
...
packages/flutter_tools/.analysis_options
0 → 100644
View file @
780e4e62
# 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
packages/flutter_tools/lib/src/commands/analyze.dart
View file @
780e4e62
...
@@ -274,43 +274,10 @@ class AnalyzeCommand extends FlutterCommand {
...
@@ -274,43 +274,10 @@ class AnalyzeCommand extends FlutterCommand {
for
(
String
package
in
packages
.
keys
)
for
(
String
package
in
packages
.
keys
)
packagesBody
.
writeln
(
'
$package
:
${path.toUri(packages[package])}
'
);
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
// save the Dart file and the .packages file to disk
Directory
host
=
Directory
.
systemTemp
.
createTempSync
(
'flutter-analyze-'
);
Directory
host
=
Directory
.
systemTemp
.
createTempSync
(
'flutter-analyze-'
);
File
mainFile
=
new
File
(
path
.
join
(
host
.
path
,
'main.dart'
))..
writeAsStringSync
(
mainBody
.
toString
());
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
());
File
packagesFile
=
new
File
(
path
.
join
(
host
.
path
,
'.packages'
))..
writeAsStringSync
(
packagesBody
.
toString
());
List
<
String
>
cmd
=
<
String
>[
List
<
String
>
cmd
=
<
String
>[
...
@@ -648,7 +615,7 @@ class PackageDependencyTracker {
...
@@ -648,7 +615,7 @@ class PackageDependencyTracker {
result
.
writeln
(
'Package "
$package
" has conflicts:'
);
result
.
writeln
(
'Package "
$package
" has conflicts:'
);
packages
[
package
].
describeConflict
(
result
);
packages
[
package
].
describeConflict
(
result
);
}
}
return
result
.
toString
();
return
result
.
toString
();
}
}
Map
<
String
,
String
>
asPackageMap
()
{
Map
<
String
,
String
>
asPackageMap
()
{
...
...
packages/flutter_tools/test/src/ios/simulators_test.dart
View file @
780e4e62
...
@@ -2,7 +2,7 @@ import 'package:test/test.dart';
...
@@ -2,7 +2,7 @@ import 'package:test/test.dart';
import
'package:flutter_tools/src/ios/simulators.dart'
;
import
'package:flutter_tools/src/ios/simulators.dart'
;
main
()
{
void
main
(
)
{
group
(
'compareIosVersions'
,
()
{
group
(
'compareIosVersions'
,
()
{
test
(
'compares correctly'
,
()
{
test
(
'compares correctly'
,
()
{
// This list must be sorted in ascending preference order
// This list must be sorted in ascending preference order
...
...
packages/flutter_tools/tool/daemon_client.dart
View file @
780e4e62
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:io'
;
...
@@ -14,14 +15,14 @@ Process daemon;
...
@@ -14,14 +15,14 @@ Process daemon;
// stopAll: stop any running app
// stopAll: stop any running app
// devices: list devices
// devices: list devices
main
()
async
{
Future
main
(
)
async
{
daemon
=
await
Process
.
start
(
'flutter'
,
[
'daemon'
]);
daemon
=
await
Process
.
start
(
'flutter'
,
[
'daemon'
]);
print
(
'daemon process started, pid:
${daemon.pid}
'
);
print
(
'daemon process started, pid:
${daemon.pid}
'
);
daemon
.
stdout
daemon
.
stdout
.
transform
(
UTF8
.
decoder
)
.
transform
(
UTF8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
transform
(
const
LineSplitter
())
.
listen
((
String
line
)
=>
print
(
'<==
$
{line}
'
));
.
listen
((
String
line
)
=>
print
(
'<==
$
line
'
));
daemon
.
stderr
.
listen
((
data
)
=>
stderr
.
add
(
data
));
daemon
.
stderr
.
listen
((
data
)
=>
stderr
.
add
(
data
));
stdout
.
write
(
'> '
);
stdout
.
write
(
'> '
);
...
@@ -37,13 +38,13 @@ main() async {
...
@@ -37,13 +38,13 @@ main() async {
}
else
if
(
line
==
'devices'
)
{
}
else
if
(
line
==
'devices'
)
{
_send
({
'method'
:
'device.getDevices'
});
_send
({
'method'
:
'device.getDevices'
});
}
else
{
}
else
{
print
(
'command not understood:
$
{line}
'
);
print
(
'command not understood:
$
line
'
);
}
}
stdout
.
write
(
'> '
);
stdout
.
write
(
'> '
);
});
});
daemon
.
exitCode
.
then
((
int
code
)
{
daemon
.
exitCode
.
then
((
int
code
)
{
print
(
'daemon exiting (
$
{code}
)'
);
print
(
'daemon exiting (
$
code
)'
);
exit
(
code
);
exit
(
code
);
});
});
}
}
...
@@ -54,5 +55,5 @@ void _send(Map map) {
...
@@ -54,5 +55,5 @@ void _send(Map map) {
map
[
'id'
]
=
id
++;
map
[
'id'
]
=
id
++;
String
str
=
'[
${JSON.encode(map)}
]'
;
String
str
=
'[
${JSON.encode(map)}
]'
;
daemon
.
stdin
.
writeln
(
str
);
daemon
.
stdin
.
writeln
(
str
);
print
(
'==>
$
{str}
'
);
print
(
'==>
$
str
'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment