From 01010f968bb7a138f1fbdfd5267affb18b137970 Mon Sep 17 00:00:00 2001 From: RTAzis <56228630+RTAzis@users.noreply.github.com> Date: Mon, 28 Oct 2024 03:59:11 +0200 Subject: [PATCH] [generator] Adds a `unnecessary_string_interpolations` rule to suppress the analyzer warnings for the generated files. (#718) * [generator] Adds a unnecessary_string_interpolations rule to suppress the analyzer warnings for the generated files. * [generator] Adds a `unnecessary_string_interpolations` rule to suppress the analyzer warnings for the generated files. --- generator/lib/src/generator.dart | 2 +- generator/test/src/generator_test_src.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/lib/src/generator.dart b/generator/lib/src/generator.dart index fa8abf0b..a0c44038 100644 --- a/generator/lib/src/generator.dart +++ b/generator/lib/src/generator.dart @@ -15,7 +15,7 @@ import 'package:retrofit/retrofit.dart' as retrofit; import 'package:source_gen/source_gen.dart'; const _analyzerIgnores = - '// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element'; + '// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations'; class RetrofitOptions { RetrofitOptions({ diff --git a/generator/test/src/generator_test_src.dart b/generator/test/src/generator_test_src.dart index 9e2f989a..5d0c4dca 100644 --- a/generator/test/src/generator_test_src.dart +++ b/generator/test/src/generator_test_src.dart @@ -142,7 +142,7 @@ abstract class MultipleTypedExtrasTest { @ShouldGenerate( ''' -// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element +// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations class _RestClient implements RestClient { _RestClient(