mirror of
https://github.com/flutter/flutter
synced 2024-08-27 20:10:11 +00:00
enable lint prefer_if_null_operators (#35745)
This commit is contained in:
parent
ad9b077fec
commit
b041a589c8
|
@ -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
|
||||
|
|
|
@ -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>[]
|
||||
|
|
Loading…
Reference in a new issue