Skip to content

Use AutoTestLintOffsets in remaining AnalysisRuleTest suites #306

Description

@solid-illiaaihistov

Instead of:

await assertDiagnostics(r'''
void fn(int? value) {
  print(value!);
}''',
 [lint(35, 1)],
);

=>

 await assertAutoDiagnostics('''
 void fn(int? value) {
   print(value${expectLint('!')}); 
 }
 ''',);

Rules requiring AutoTestLintOffsets migration:

  1. avoid_unused_parameters_rule_test.dart
  2. newline_before_return_rule_test.dart
  3. proper_super_calls_rule_test.dart
  4. avoid_unrelated_type_assertions_rule_test.dart
  5. avoid_debug_print_in_release_rule_test.dart
  6. avoid_unnecessary_return_variable_rule_test.dart
  7. avoid_unnecessary_set_state_rule_test.dart
  8. no_equal_then_else_rule_test.dart
  9. avoid_global_state_rule_test.dart
  10. prefer_early_return_rule_test.dart
  11. avoid_non_null_assertion_rule_test.dart
  12. double_literal_format_rule_test.dart
  13. avoid_returning_widgets_rule_test.dart
  14. avoid_final_with_getter_rule_test.dart

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions