checkContextBoundaries function

BoundaryReport checkContextBoundaries(
  1. String projectPath, {
  2. ContextBoundaryRules? rules,
  3. bool? includeTests,
})

Checks the package at projectPath against its boundaries: rules (rules when given, else read from its buildkit.yaml). includeTests overrides the rules' tests: flag.

Implementation

BoundaryReport checkContextBoundaries(
  String projectPath, {
  ContextBoundaryRules? rules,
  bool? includeTests,
}) {
  final effective = rules ?? ContextBoundaryRules.load(projectPath);
  if (effective == null) {
    return BoundaryReport(projectPath: projectPath, measured: false);
  }
  return _Checker(
    projectPath,
    effective,
    includeTests ?? effective.includeTests,
  ).run();
}