@@ -295,6 +295,13 @@ StringBuffer bar = StringBuffer('baz');
295
295
int analyze() {}
296
296
''' ;
297
297
298
+ final File optionsFile = fileSystem.file (fileSystem.path.join (projectPath, 'analysis_options.yaml' ));
299
+ optionsFile.writeAsStringSync ('''
300
+ analyzer:
301
+ errors:
302
+ missing_return: info
303
+ ''' );
304
+
298
305
fileSystem.directory (projectPath).childFile ('main.dart' ).writeAsStringSync (infoSourceCode);
299
306
await runCommand (
300
307
arguments: < String > ['analyze' , '--no-pub' ],
@@ -305,13 +312,20 @@ int analyze() {}
305
312
exitMessageContains: '1 issue found.' ,
306
313
exitCode: 1 ,
307
314
);
308
- }, skip : true ); // https://github.com/flutter/flutter/issues/120750
315
+ });
309
316
310
317
testWithoutContext ('analyze once with no-fatal-infos has info issue finally exit code 0.' , () async {
311
318
const String infoSourceCode = '''
312
319
int analyze() {}
313
320
''' ;
314
321
322
+ final File optionsFile = fileSystem.file (fileSystem.path.join (projectPath, 'analysis_options.yaml' ));
323
+ optionsFile.writeAsStringSync ('''
324
+ analyzer:
325
+ errors:
326
+ missing_return: info
327
+ ''' );
328
+
315
329
fileSystem.directory (projectPath).childFile ('main.dart' ).writeAsStringSync (infoSourceCode);
316
330
await runCommand (
317
331
arguments: < String > ['analyze' , '--no-pub' , '--no-fatal-infos' ],
@@ -321,13 +335,20 @@ int analyze() {}
321
335
],
322
336
exitMessageContains: '1 issue found.' ,
323
337
);
324
- }, skip : true ); // https://github.com/flutter/flutter/issues/120750
338
+ });
325
339
326
340
testWithoutContext ('analyze once only fatal-warnings has info issue finally exit code 0.' , () async {
327
341
const String infoSourceCode = '''
328
342
int analyze() {}
329
343
''' ;
330
344
345
+ final File optionsFile = fileSystem.file (fileSystem.path.join (projectPath, 'analysis_options.yaml' ));
346
+ optionsFile.writeAsStringSync ('''
347
+ analyzer:
348
+ errors:
349
+ missing_return: info
350
+ ''' );
351
+
331
352
fileSystem.directory (projectPath).childFile ('main.dart' ).writeAsStringSync (infoSourceCode);
332
353
await runCommand (
333
354
arguments: < String > ['analyze' , '--no-pub' , '--fatal-warnings' , '--no-fatal-infos' ],
@@ -337,7 +358,7 @@ int analyze() {}
337
358
],
338
359
exitMessageContains: '1 issue found.' ,
339
360
);
340
- }, skip : true ); // https://github.com/flutter/flutter/issues/120750
361
+ });
341
362
342
363
testWithoutContext ('analyze once only fatal-infos has warning issue finally exit code 0.' , () async {
343
364
const String warningSourceCode = '''
0 commit comments