clean-up analysis_options.yaml's across the repository (#81986)
This commit is contained in:
parent
4a939d7a57
commit
2bf42e7047
@ -11,9 +11,9 @@
|
|||||||
# which should be kept in sync with this file:
|
# which should be kept in sync with this file:
|
||||||
#
|
#
|
||||||
# - analysis_options.yaml (this file)
|
# - analysis_options.yaml (this file)
|
||||||
# - packages/flutter/lib/analysis_options_user.yaml
|
|
||||||
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
|
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
|
||||||
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
|
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
|
||||||
|
# - https://github.com/flutter/packages/blob/master/analysis_options.yaml
|
||||||
#
|
#
|
||||||
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
|
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
|
||||||
# Android Studio, and the `flutter analyze` command.
|
# Android Studio, and the `flutter analyze` command.
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# Exclude lib/main.dart to avoid warnings about the non_nullable
|
|
||||||
# experiment before it is enabled.
|
|
||||||
analyzer:
|
|
||||||
exclude:
|
|
||||||
- lib/null_safe_main.dart
|
|
||||||
- lib/sound_mode.dart
|
|
@ -15,13 +15,13 @@ import 'package:flutter/widgets.dart';
|
|||||||
//
|
//
|
||||||
// See also `dev/integration_tests/web/lib/stack_trace.dart` that tests the
|
// See also `dev/integration_tests/web/lib/stack_trace.dart` that tests the
|
||||||
// framework's ability to parse stack traces in all build modes.
|
// framework's ability to parse stack traces in all build modes.
|
||||||
void main() async {
|
Future<void> main() async {
|
||||||
final StringBuffer errorMessage = StringBuffer();
|
final StringBuffer errorMessage = StringBuffer();
|
||||||
debugPrint = (String? message, { int? wrapWidth }) {
|
debugPrint = (String? message, { int? wrapWidth }) {
|
||||||
errorMessage.writeln(message);
|
errorMessage.writeln(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
runApp(ThrowingWidget());
|
runApp(const ThrowingWidget());
|
||||||
|
|
||||||
// Let the framework flush error messages.
|
// Let the framework flush error messages.
|
||||||
await Future<void>.delayed(Duration.zero);
|
await Future<void>.delayed(Duration.zero);
|
||||||
@ -63,6 +63,8 @@ bool _errorMessageFormattedCorrectly(String errorMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ThrowingWidget extends StatefulWidget {
|
class ThrowingWidget extends StatefulWidget {
|
||||||
|
const ThrowingWidget({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ThrowingWidgetState createState() => _ThrowingWidgetState();
|
_ThrowingWidgetState createState() => _ThrowingWidgetState();
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
await html.window.navigator.serviceWorker?.ready;
|
await html.window.navigator.serviceWorker?.ready;
|
||||||
final String response = 'CLOSE?version=1';
|
const String response = 'CLOSE?version=1';
|
||||||
await html.HttpRequest.getString(response);
|
await html.HttpRequest.getString(response);
|
||||||
html.document.body?.appendHtml(response);
|
html.document.body?.appendHtml(response);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import 'dart:html' as html;
|
|||||||
|
|
||||||
// Verify that web applications can be run in sound mode.
|
// Verify that web applications can be run in sound mode.
|
||||||
void main() {
|
void main() {
|
||||||
const isWeak = <int?>[] is List<int>;
|
const bool isWeak = <int?>[] is List<int>;
|
||||||
String output;
|
String output;
|
||||||
if (isWeak) {
|
if (isWeak) {
|
||||||
output = '--- TEST FAILED ---';
|
output = '--- TEST FAILED ---';
|
||||||
@ -19,6 +19,6 @@ void main() {
|
|||||||
html.HttpRequest.request(
|
html.HttpRequest.request(
|
||||||
'/test-result',
|
'/test-result',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
sendData: '$output',
|
sendData: output,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
include: ../../../analysis_options.yaml
|
|
@ -1,24 +1,16 @@
|
|||||||
# Specify analysis options.
|
# This file is deprecated and only included in the framework to maintain
|
||||||
|
# backwards compatibility. DO NOT MAKE CHANGES TO THIS FILE.
|
||||||
#
|
#
|
||||||
# Until there are meta linter rules, each desired lint must be explicitly enabled.
|
# The recommended analyzer options for Flutter code (apps, packages, and
|
||||||
# See: https://github.com/dart-lang/linter/issues/288
|
# plugins) outside the Flutter repositories are now defined by
|
||||||
#
|
# package:flutter_lints located at
|
||||||
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
|
# https://github.com/flutter/packages/tree/master/packages/flutter_lints
|
||||||
# See the configuration guide for more
|
|
||||||
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
|
|
||||||
#
|
|
||||||
# There are four similar analysis options files in the flutter repos:
|
|
||||||
# - analysis_options.yaml
|
|
||||||
# - packages/flutter/lib/analysis_options_user.yaml (this file)
|
|
||||||
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
|
|
||||||
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
|
|
||||||
#
|
#
|
||||||
|
# Old documentation:
|
||||||
# This file contains the analysis options used by "flutter analyze" and the
|
# This file contains the analysis options used by "flutter analyze" and the
|
||||||
# dartanalyzer when analyzing code outside the flutter repository. It isn't named
|
# dartanalyzer when analyzing code outside the flutter repository. It isn't named
|
||||||
# 'analysis_options.yaml' because otherwise editors would use it when analyzing
|
# 'analysis_options.yaml' because otherwise editors would use it when analyzing
|
||||||
# the flutter tool itself.
|
# the flutter tool itself.
|
||||||
#
|
|
||||||
# When editing, make sure you keep this and /analysis_options.yaml consistent.
|
|
||||||
|
|
||||||
analyzer:
|
analyzer:
|
||||||
errors:
|
errors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user