Enable prefer_single_quotes in analysis_server_client

Change-Id: I08211c5fd63f69978772558582459fbe5b730743
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132623
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2020-01-21 17:53:12 +00:00 committed by commit-bot@chromium.org
parent 5584c96fde
commit 9f0a25fd8e
5 changed files with 773 additions and 773 deletions

View file

@ -40,7 +40,7 @@ linter:
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
#- prefer_single_quotes # 3434
- prefer_single_quotes
- prefer_spread_collections
- recursive_getters
- slash_for_doc_comments

View file

@ -142,7 +142,7 @@ class Server {
_pendingCommands[id] = completer;
String line = json.encode(command);
_listener?.requestSent(line);
_process.stdin.add(utf8.encoder.convert("$line\n"));
_process.stdin.add(utf8.encoder.convert('$line\n'));
return completer.future;
}

View file

@ -435,7 +435,7 @@ class Response {
Response.invalidAnalysisRoot(Request request, String rootPath)
: this(request.id,
error: RequestError(RequestErrorCode.INVALID_ANALYSIS_ROOT,
"Invalid analysis root: $rootPath"));
'Invalid analysis root: $rootPath'));
/// Initialize a newly created instance to represent an error condition caused
/// by a [request] that specifies an execution context whose context root does
@ -443,7 +443,7 @@ class Response {
Response.invalidExecutionContext(Request request, String contextId)
: this(request.id,
error: RequestError(RequestErrorCode.INVALID_EXECUTION_CONTEXT,
"Invalid execution context: $contextId"));
'Invalid execution context: $contextId'));
/// Initialize a newly created instance to represent the
/// INVALID_FILE_PATH_FORMAT error condition.

View file

@ -201,11 +201,11 @@ class MockStdin implements IOSink {
void write(Object obj) {}
@override
void writeAll(Iterable objects, [String separator = ""]) {}
void writeAll(Iterable objects, [String separator = '']) {}
@override
void writeCharCode(int charCode) {}
@override
void writeln([Object obj = ""]) {}
void writeln([Object obj = '']) {}
}