-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
#47941 made it possible to put fix rules in multiple files.
I split up the large fix_data.yaml
file in flutter/flutter, but found there are some bugs. Not all of the fixes are being applied.
See flutter/flutter#114192 where we are seeing these issues.
The PR is huge, so here is one simplified test case where we are seeing fixes not working:
in lib/fix_data/cupertino.yaml
# !---- This fix is being applied ----!
# Changes made in https://github.com/flutter/flutter/pull/41859
- title: "Remove 'brightness'"
date: 2020-12-10
element:
uris: [ 'cupertino.dart' ]
constructor: ''
inClass: 'CupertinoTextThemeData'
changes:
- kind: 'removeParameter'
name: 'brightness'
# !---- This fix is NOT being applied ----!
# Changes made in https://github.com/flutter/flutter/pull/41859
- title: "Remove 'brightness'"
date: 2020-12-10
element:
uris: [ 'cupertino.dart' ]
method: 'copyWith'
inClass: 'CupertinoTextThemeData'
changes:
- kind: 'removeParameter'
name: 'brightness'
in test_fixes/cupertino.dart
(test file)
// Change made in https://github.com/flutter/flutter/pull/41859
CupertinoTextThemeData themeData = CupertinoTextThemeData(brightness: Brightness.dark);
themeData.copyWith(brightness: Brightness.light);
themeData = CupertinoTextThemeData(error: '');
themeData.copyWith(error: '');
in test_fixes/cupertino.dart.expect
(expected transformation)
// Change made in https://github.com/flutter/flutter/pull/41859
CupertinoTextThemeData themeData = CupertinoTextThemeData();
themeData.copyWith();
themeData = CupertinoTextThemeData(error: '');
themeData.copyWith(error: '');
Result
// Change made in https://github.com/flutter/flutter/pull/41859
CupertinoTextThemeData themeData = CupertinoTextThemeData(); // <-- Fix worked
themeData.copyWith(brightness: Brightness.light); // <-- Fix did not work
themeData = CupertinoTextThemeData(error: '');
themeData.copyWith(error: '');
Metadata
Metadata
Assignees
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.