mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:51:29 +00:00
Enable v1.9 pedantic lints...
...except for `omit_local_variable_types` Change-Id: Ifd9ac78fedf99786a07b2cee5a3891378a49ef5d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151885 Auto-Submit: Kevin Moore <kevmoo@google.com> Commit-Queue: Jaime Wren <jwren@google.com> Reviewed-by: Jaime Wren <jwren@google.com>
This commit is contained in:
parent
d46a696957
commit
762113758d
|
@ -1,4 +1,4 @@
|
|||
include: package:pedantic/analysis_options.1.8.0.yaml
|
||||
include: package:pedantic/analysis_options.1.9.0.yaml
|
||||
|
||||
analyzer:
|
||||
errors:
|
||||
|
@ -7,9 +7,11 @@ analyzer:
|
|||
unused_import: warning
|
||||
unnecessary_brace_in_string_interps: warning
|
||||
|
||||
# Ignore one pedantic lint
|
||||
omit_local_variable_types: ignore
|
||||
|
||||
linter:
|
||||
rules:
|
||||
- directives_ordering
|
||||
- prefer_relative_imports
|
||||
- prefer_single_quotes
|
||||
- unnecessary_brace_in_string_interps
|
||||
|
|
|
@ -105,9 +105,7 @@ void runDartdev(List<String> args) async {
|
|||
stopwatch.stop();
|
||||
|
||||
// Set the exitCode, if it wasn't set in the catch block above.
|
||||
if (exitCode == null) {
|
||||
exitCode = result is int ? result : 0;
|
||||
}
|
||||
exitCode ??= result is int ? result : 0;
|
||||
|
||||
// Send analytics before exiting
|
||||
if (analytics.enabled) {
|
||||
|
|
|
@ -13,6 +13,7 @@ import '../sdk.dart';
|
|||
class PubCommand extends DartdevCommand<int> {
|
||||
PubCommand({bool verbose = false}) : super('pub', 'Work with packages.');
|
||||
|
||||
@override
|
||||
final ArgParser argParser = ArgParser.allowAnything();
|
||||
|
||||
@override
|
||||
|
|
|
@ -15,6 +15,7 @@ import '../sdk.dart';
|
|||
import '../utils.dart';
|
||||
|
||||
class RunCommand extends DartdevCommand<int> {
|
||||
@override
|
||||
final ArgParser argParser = ArgParser.allowAnything();
|
||||
final bool verbose;
|
||||
RunCommand({this.verbose = false}) : super('run', '''
|
||||
|
|
|
@ -14,6 +14,7 @@ class TestCommand extends DartdevCommand<int> {
|
|||
TestCommand({bool verbose = false})
|
||||
: super('test', 'Runs tests in this project.');
|
||||
|
||||
@override
|
||||
final ArgParser argParser = ArgParser.allowAnything();
|
||||
|
||||
@override
|
||||
|
|
|
@ -48,7 +48,7 @@ Future<Process> startProcess(
|
|||
void routeToStdout(
|
||||
Process process, {
|
||||
bool logToTrace = false,
|
||||
void listener(String str),
|
||||
void Function(String str) listener,
|
||||
}) {
|
||||
if (isVerbose) {
|
||||
_streamLineTransform(process.stdout, (String line) {
|
||||
|
@ -72,7 +72,10 @@ void routeToStdout(
|
|||
}
|
||||
}
|
||||
|
||||
void _streamLineTransform(Stream<List<int>> stream, handler(String line)) {
|
||||
void _streamLineTransform(
|
||||
Stream<List<int>> stream,
|
||||
Function(String line) handler,
|
||||
) {
|
||||
stream
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
|
|
|
@ -20,4 +20,4 @@ dependencies:
|
|||
|
||||
dev_dependencies:
|
||||
test: ^1.0.0
|
||||
pedantic: ^1.8.0
|
||||
pedantic: ^1.9.0
|
||||
|
|
|
@ -18,7 +18,7 @@ import 'core_test.dart' as core;
|
|||
import 'sdk_test.dart' as sdk;
|
||||
import 'utils_test.dart' as utils;
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
group('dart', () {
|
||||
analytics.main();
|
||||
analyze.main();
|
||||
|
|
Loading…
Reference in a new issue