[dartdev] turn on the prefer_single_quotes lint

Change-Id: I43c964c769a98ca4796e7172254835088adbc088
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230800
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Devon Carew 2022-01-28 19:21:15 +00:00 committed by Commit Bot
parent e60aafc5be
commit 0571cfe655
4 changed files with 5 additions and 4 deletions

View file

@ -8,4 +8,5 @@ linter:
# Enable additional rules.
depend_on_referenced_packages: true
directives_ordering: true
prefer_single_quotes: true
sort_pub_dependencies: true

View file

@ -67,13 +67,13 @@ For additional documentation generation options, see the 'dartdoc_options.yaml'
// At least one argument, the input directory, is required,
// when we're not generating docs for the Dart SDK.
if (args.rest.isEmpty) {
usageException("Error: Input directory not specified");
usageException('Error: Input directory not specified');
}
// Determine input directory.
final dir = io.Directory(args.rest[0]);
if (!dir.existsSync()) {
usageException("Error: Input directory doesn't exist: ${dir.path}");
usageException('Error: Input directory doesn\'t exist: ${dir.path}');
}
options.add('--input=${dir.path}');
}

View file

@ -20,7 +20,7 @@ import '../utils.dart';
import '../vm_interop_handler.dart';
class RunCommand extends DartdevCommand {
static const bool isProductMode = bool.fromEnvironment("dart.vm.product");
static const bool isProductMode = bool.fromEnvironment('dart.vm.product');
static const String cmdName = 'run';
// kErrorExitCode, as defined in runtime/bin/error_exit.h

View file

@ -33,7 +33,7 @@ void main() {
expect(result.stderr, isNotEmpty);
expect(result.stderr, contains("Error when reading 'foo.dart':"));
expect(result.stdout, isNotEmpty);
expect(result.stdout, contains("Info: Compiling with sound null safety\n"));
expect(result.stdout, contains('Info: Compiling with sound null safety\n'));
expect(result.exitCode, 254);
});
}