Open zanderso opened 3 years ago
The easiest way to fix this is in the IDE (using "Organize Imports..." or similar) or from the command line using dart fix
. That said, I'm really sorry these issues keep popping up. I'll follow-up to better understand where I misstepped.
The case that was happening here, where an IDE probably would not help, was directives not being sorted in generated code noted in text logs on CI.
@pq Sadly this lint does not end up with fixes in dart fix
?
For example:
navaronbracke@MacBook-Pro-van-Navaron weforza % dart analyze .
Analyzing .... 4.0s
info • lib/model/image/io_pick_image_delegate.dart:9:1 • Sort directive sections alphabetically. Try sorting the directives. •
directives_ordering
info • lib/native_service/io_file_storage_delegate.dart:8:1 • Sort directive sections alphabetically. Try sorting the directives.
• directives_ordering
info • lib/widgets/pages/export_data_page/export_data_file_name_text_field.dart:10:1 • Sort directive sections alphabetically. Try
sorting the directives. • directives_ordering
info • lib/widgets/pages/export_data_page/export_data_page.dart:15:1 • Sort directive sections alphabetically. Try sorting the
directives. • directives_ordering
info • lib/widgets/pages/ride_attendee_scanning_page/generic_scan_error.dart:8:1 • Sort directive sections alphabetically. Try
sorting the directives. • directives_ordering
5 issues found.
navaronbracke@MacBook-Pro-van-Navaron weforza % dart fix --dry-run
Computing fixes in weforza (dry run)... 2.7s
Nothing to fix!
navaronbracke@MacBook-Pro-van-Navaron weforza %
I'll file an issue for that bug.
The errors currently in the Flutter framework on the Engine -> Framework roll look lik
Fixing these would be much easier if the lint told me how it was expecting the imports to look.
/cc @pq