Skip to content

Commit

Permalink
🎨 reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Dec 21, 2024
1 parent 17a3e16 commit db7641c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/envied_generator/lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ final class EnviedGenerator extends GeneratorForAnnotation<Envied> {
await _generateClassForEnviedAnnotation(element, reader, buildStep),
);
}

final String? generatedFrom =
_buildOptions.override == true && _buildOptions.path?.isNotEmpty == true
? _buildOptions.path
: annotation.read('path').literalValue as String?;

final String ignore = '// coverage:ignore-file\n'
'// ignore_for_file: type=lint\n'
'// generated_from: ${_buildOptions.override == true && _buildOptions.path?.isNotEmpty == true ? _buildOptions.path : annotation.read('path').literalValue as String?}';
'// generated_from: $generatedFrom';

return DartFormatter().format('$ignore\n$generatedClassesAltogether');
}
Expand Down

0 comments on commit db7641c

Please sign in to comment.