shouldExcludePath function

bool shouldExcludePath(
  1. String path,
  2. Iterable<String> exclude
)

checks if the path should be excluded

Implementation

bool shouldExcludePath(
  String path,
  Iterable<String> exclude,
) {
  for (final pattern in {
    ...exclude,
    ...Constants.excludedDirs,
  }) {
    if (Glob(pattern).matches(path)) {
      return true;
    }
  }

  return false;
}