enable lint prefer_if_null_operators (#35745)

This commit is contained in:
Alexandre Ardhuin 2019-07-09 10:53:35 +02:00 committed by GitHub
parent ad9b077fec
commit b041a589c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 13 deletions

View file

@ -141,7 +141,7 @@ linter:
# - prefer_function_declarations_over_variables # not yet tested
- prefer_generic_function_type_aliases
# - prefer_if_elements_to_conditional_expressions # not yet tested
# - prefer_if_null_operators # not yet tested
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
# - prefer_int_literals # not yet tested

View file

@ -41,18 +41,17 @@ void main() {
final MockProcessResult result = MockProcessResult();
when(result.exitCode).thenReturn(0);
when<String>(result.stdout).thenReturn(response == null
? json.encode(<Map<String, dynamic>>[
<String, dynamic>{
'installationPath': visualStudioPath,
'displayName': 'Visual Studio Community 2017',
'installationVersion': '15.9.28307.665',
'catalog': <String, String>{
'productDisplayVersion': '15.9.12',
},
}
])
: response);
when<String>(result.stdout).thenReturn(response ??
json.encode(<Map<String, dynamic>>[
<String, dynamic>{
'installationPath': visualStudioPath,
'displayName': 'Visual Studio Community 2017',
'installationVersion': '15.9.28307.665',
'catalog': <String, String>{
'productDisplayVersion': '15.9.12',
},
},
]));
final List<String> requirementArguments = requiredComponents == null
? <String>[]