open:dart-fix

dart fix

$ dart fix  
 
Apply automated fixes to Dart source code.
 
This tool looks for and fixes analysis issues that have associated automated fixes.
 
To use the tool, run either 'dart fix --dry-run' for a preview of the proposed changes for a project, or 'dart fix --apply' to apply the changes.
 
Usage: dart fix [arguments]
-h, --help                      Print this usage information.
-n, --dry-run                   Preview the proposed changes but make no changes.
    --apply                     Apply the proposed changes.
    --code=<code1,code2,...>    Apply fixes for one (or more) diagnostic codes.
 
Run "dart help" to see global options.

$ dart fix -n                                                                                                                                                                      
 
Computing fixes in book_note_flutter_v2 (dry run)... 24.2s
 
25 proposed fixes in 12 files.
 
lib/system/system.dart
  unused_import • 1 fix
 
lib/view/admin/page/admin_page.dart
  unused_import • 1 fix
 
lib/view/book/add/organism/book_add_detail_title.dart
  prefer_const_constructors • 5 fixes
 
lib/view/book/add/organism/book_add_search_background.dart
  sized_box_for_whitespace • 1 fix
  unused_import • 1 fix
 
lib/view/book/add/organism/book_add_search_body.dart
  prefer_const_constructors • 1 fix
 
lib/view/book/add/organism/book_add_search_title.dart
  sized_box_for_whitespace • 1 fix
 
lib/view/book/add/page/book_add_detail_page.dart
  unused_import • 4 fixes
 
lib/view/book/add/page/book_add_search_page.dart
  unused_import • 2 fixes
 
lib/view/book/add/page/text_input.dart
  prefer_const_constructors • 1 fix
 
lib/view/book/search/page/book_search_controller.dart
  unnecessary_overrides • 1 fix
 
lib/view/home/page/home_page.dart
  prefer_const_constructors • 2 fixes
 
lib/view/record/page/record_page.dart
  prefer_const_constructors • 3 fixes
  sized_box_for_whitespace • 1 fix
 
To fix an individual diagnostic, run one of:
  dart fix --apply --code=prefer_const_constructors 
  dart fix --apply --code=sized_box_for_whitespace 
  dart fix --apply --code=unnecessary_overrides 
  dart fix --apply --code=unused_import 
 
To fix all diagnostics, run:
  dart fix --apply 


  • open/dart-fix.txt
  • 마지막으로 수정됨: 2023/05/07 13:14
  • 저자 MORO