@@ -18,14 +18,15 @@
Loading
18 18
    }
19 19
20 20
    final typeSystem = library.element.typeSystem;
21 -
    final file = StoreFileTemplate()..storeSources = _generateCodeForLibrary(library, typeSystem).toSet();
21 +
    final file = StoreFileTemplate()
22 +
      ..storeSources = _generateCodeForLibrary(library, typeSystem).toSet();
22 23
    return file.toString();
23 24
  }
24 25
25 26
  Iterable<String> _generateCodeForLibrary(
26 -
      LibraryReader library,
27 -
      TypeSystem typeSystem,
28 -
      ) sync* {
27 +
    LibraryReader library,
28 +
    TypeSystem typeSystem,
29 +
  ) sync* {
29 30
    for (final classElement in library.classes) {
30 31
      if (isMixinStoreClass(classElement)) {
31 32
        yield* _generateCodeForMixinStore(library, classElement, typeSystem);
@@ -34,10 +35,10 @@
Loading
34 35
  }
35 36
36 37
  Iterable<String> _generateCodeForMixinStore(
37 -
      LibraryReader library,
38 -
      ClassElement baseClass,
39 -
      TypeSystem typeSystem,
40 -
      ) sync* {
38 +
    LibraryReader library,
39 +
    ClassElement baseClass,
40 +
    TypeSystem typeSystem,
41 +
  ) sync* {
41 42
    final typeNameFinder = LibraryScopedNameFinder(library.element);
42 43
    final otherClasses = library.classes.where((c) => c != baseClass);
43 44
    final mixedClass = otherClasses.firstWhere((c) {
@@ -51,22 +52,26 @@
Loading
51 52
      // this has no impact), and perform a supertype check.
52 53
      return typeSystem.isSubtypeOf(
53 54
        c.thisType,
54 -
        baseClass.instantiate(typeArguments: c.supertype.typeArguments, nullabilitySuffix: NullabilitySuffix.none),
55 +
        baseClass.instantiate(
56 +
            typeArguments: c.supertype.typeArguments,
57 +
            nullabilitySuffix: NullabilitySuffix.none),
55 58
      );
56 59
    }, orElse: () => null);
57 60
58 61
    if (mixedClass != null) {
59 -
      yield _generateCodeFromTemplate(mixedClass.name, baseClass, MixinStoreTemplate(), typeNameFinder);
62 +
      yield _generateCodeFromTemplate(
63 +
          mixedClass.name, baseClass, MixinStoreTemplate(), typeNameFinder);
60 64
    }
61 65
  }
62 66
63 67
  String _generateCodeFromTemplate(
64 -
      String publicTypeName,
65 -
      ClassElement userStoreClass,
66 -
      StoreTemplate template,
67 -
      LibraryScopedNameFinder typeNameFinder,
68 -
      ) {
69 -
    final visitor = StoreClassVisitor(publicTypeName, userStoreClass, template, typeNameFinder);
68 +
    String publicTypeName,
69 +
    ClassElement userStoreClass,
70 +
    StoreTemplate template,
71 +
    LibraryScopedNameFinder typeNameFinder,
72 +
  ) {
73 +
    final visitor = StoreClassVisitor(
74 +
        publicTypeName, userStoreClass, template, typeNameFinder);
70 75
    userStoreClass
71 76
      ..accept(visitor)
72 77
      ..visitChildren(visitor);
Files Coverage
flutter_mobx/lib/src 100.00%
mobx/lib/src 98.95%
mobx_codegen/lib/src 30.20%
Project Totals (52 files) 83.90%
296987167
mobx_codegen
296987167
mobx_codegen
296987167
flutter_mobx
296987167
flutter_mobx
1
coverage:
2
  range: 80..100
3
  status:
4
    project:
5
      default: off
6
      mobx:
7
        flags: mobx
8
      mobx_codegen:
9
        flags: mobx_codegen
10
      flutter_mobx:
11
        flags: flutter_mobx
12

13
flags:
14
  # filter the folder(s) you wish to measure by that flag
15
  mobx:
16
    # only include files in the mobx folder
17
    paths:
18
      - mobx/lib/
19
  mobx_codegen:
20
    paths:
21
      - mobx_codegen/lib/
22
  flutter_mobx:
23
    paths:
24
      - flutter_mobx/lib/
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading