mirror of
https://github.com/flutter/packages.git
synced 2025-08-24 19:42:17 +08:00
[tool] Add initial file-based command skipping (#8928)
Adds initial file-based filtering. This does not attempt to be comprehensive, just to get some low-hanging fruit, and to create a blueprint for anyone to follow in the future when adding more filtering. I expect that once this is in place, what will happen is that as we notice cases where PRs are hitting slow or flaky tests that they clearly don't need to, we can incrementally improve the filtering on demand. Fixes https://github.com/flutter/flutter/issues/136394
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'common/core.dart';
|
||||
import 'common/file_filters.dart';
|
||||
import 'common/flutter_command_utils.dart';
|
||||
import 'common/output_utils.dart';
|
||||
import 'common/package_looping_command.dart';
|
||||
@ -47,6 +48,15 @@ class XcodeAnalyzeCommand extends PackageLoopingCommand {
|
||||
final String description =
|
||||
'Runs Xcode analysis on the iOS and/or macOS example apps.';
|
||||
|
||||
@override
|
||||
bool shouldIgnoreFile(String path) {
|
||||
return isRepoLevelNonCodeImpactingFile(path) ||
|
||||
isPackageSupportFile(path) ||
|
||||
// These are part of the build, but don't affect native code analysis.
|
||||
path.endsWith('/pubspec.yaml') ||
|
||||
path.endsWith('.dart');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> initializeRun() async {
|
||||
if (!(getBoolArg(platformIOS) || getBoolArg(platformMacOS))) {
|
||||
|
Reference in New Issue
Block a user