diff --git a/lib/src/generators/base.dart b/lib/src/generators/base.dart index 33966c1..e7d1c39 100644 --- a/lib/src/generators/base.dart +++ b/lib/src/generators/base.dart @@ -33,12 +33,14 @@ abstract class BaseGenerator { BaseGeneratorOptions get options; /// Method to generate file(s) - String getHeader() { + String getHeader({ + String ignoreForFile = 'invalid_annotation_target', + }) { String header = """ // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint -// ignore_for_file: invalid_annotation_target +// ignore_for_file: $ignoreForFile """; return header; } diff --git a/lib/src/generators/client.dart b/lib/src/generators/client.dart index f333d80..42080ac 100644 --- a/lib/src/generators/client.dart +++ b/lib/src/generators/client.dart @@ -124,7 +124,7 @@ class ClientGenerator extends BaseGenerator { // Client header file.writeAsStringSync(""" -${getHeader()} +${getHeader(ignoreForFile: 'invalid_annotation_target, unused_import')} import 'dart:io' as io; import 'dart:convert';