Skip to content

Commit fca6e56

Browse files
committed
Coverage: fix coverage filters
1 parent b48189f commit fca6e56

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

utils/generate-coverage.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
}
2727

2828
$filter = new Filter();
29-
$filter->includeDirectory( "{$root_folder}/includes" );
30-
$filter->includeFiles( array( "{$root_folder}/plugin.php" ) );
29+
// In wp-cli/wp-cli, all source code is in the "php" folder.
30+
$filter->includeDirectory( "{$root_folder}/php" );
31+
32+
// In commands, all source code is in the "src" folder.
33+
$filter->includeDirectory( "{$root_folder}/src" );
34+
// There is also a "*-command.php" file.
35+
$filter->includeDirectory( $root_folder, '-command.php' );
3136

3237
$coverage = new CodeCoverage(
3338
( new Selector() )->forLineCoverage( $filter ),

0 commit comments

Comments
 (0)