ModulePackage class final
The package of a module and the rules it follows, which the package checks in its own tests with problems:
- the Dart files in
lib/import, export and include as parts onlydart:libraries but those that reach the machine, such asdart:io, the module model ofsmf_contracts(smf_contracts.dartandcore.dart), the files of the package and the public libraries, outsidesrc/, of the packages among its dependencies, and a relative URI does not leavelib/, conditional ones included; - of the SMF packages, the Dart files in
test/use only the module model ofsmf_contractsand the public libraries of the package itself, the packages among its dependencies, such as a module it depends on,smf_pipelineand testModules, and a relative URI does not leavetest/, so a test uses no file of another package; - the package depends on
smf_contractsand dependencies, on no other package, and on none that no file inlib/uses; - of the SMF packages, its dev dependencies are
smf_pipeline, for the contract harness, and testModules.
So the code of a module knows only the module model and the modules it depends on.
test('follows the rules of the package of a module', () {
expect(
const ModulePackage(
'smf_riverpod',
testModules: {'smf_flutter_core'},
).problems(),
isEmpty,
);
});
Constructors
Properties
-
dependencies
→ Set<
String> -
The packages besides
smf_contractsthat the code of the module uses, such asmasonfor the bundles of its bricks, or the package of a module it depends on, which the tests use too.final - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the package, such as
smf_riverpod.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
testModules
→ Set<
String> -
The packages of other modules that the tests use, besides
smf_pipeline, such assmf_flutter_corefor the app entry of the apps they render.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
problems(
{String root = '.', FileSystem fileSystem = const LocalFileSystem()}) → List< String> -
The problems of the package in the directory
root, the current directory by default, which is the package's own whendart testruns its tests: one line for every package and every URI of a file that breaks a rule. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited