Skip to content

Commit

Permalink
Ignore coverage in generated files
Browse files Browse the repository at this point in the history
(cherry picked from commit 98b32da)
  • Loading branch information
NatsuOnFire authored and nirinchev committed Feb 10, 2025
1 parent b3f1195 commit 1a076bf
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RealmObjectGenerator extends Generator {
if (codeLines.isEmpty) {
return '';
}
return ['// ignore_for_file: type=lint', ...codeLines].join('\n');
return ['// coverage:ignore-file', '// ignore_for_file: type=lint', ...codeLines].join('\n');
},
color: stdout.supportsAnsiEscapes,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'all_named_ctor.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
static var _defaultsSet = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'all_types.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Foo extends _Foo with RealmEntity, RealmObjectBase, RealmObject {
static var _defaultsSet = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'another_mapto.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class MappedToo extends _MappedToo
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'binary_type.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Foo extends _Foo with RealmEntity, RealmObjectBase, RealmObject {
Foo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'const_initializer.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class ConstInitializer extends _ConstInitializer
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'embedded_annotations.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Parent extends _Parent with RealmEntity, RealmObjectBase, RealmObject {
Parent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'embedded_objects.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Parent extends _Parent with RealmEntity, RealmObjectBase, RealmObject {
Parent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'indexable_types.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Indexable extends _Indexable
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'list_initialization.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
Person({
Expand Down
1 change: 1 addition & 0 deletions packages/realm_generator/test/good_test_data/map.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'map.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class LotsOfMaps extends _LotsOfMaps
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'mapto.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Original extends $Original
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'optional_argument.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
Person({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'pinhole.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Foo extends _Foo with RealmEntity, RealmObjectBase, RealmObject {
static var _defaultsSet = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'primary_key.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class IntPK extends _IntPK with RealmEntity, RealmObjectBase, RealmObject {
IntPK(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'private_fields.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class WithPrivateFields extends _WithPrivateFields
with RealmEntity, RealmObjectBase, RealmObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'realm_set.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Car extends _Car with RealmEntity, RealmObjectBase, RealmObject {
Car(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'required_argument.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
Person(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'required_argument_with_default_value.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
static var _defaultsSet = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ part of 'user_defined_getter.dart';
// RealmObjectGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: type=lint
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject {
Person(
Expand Down

0 comments on commit 1a076bf

Please sign in to comment.