Added a check to the analyzer script to detect skipped tests. (#88003)

Added a check to the analyzer script to detect skipped tests that aren't commented.

The comment following the `skip` parameter should include either a link to a
github issue tracking the reenabling of the test, or a '[intended]' tag with
a brief description of why the test should never be enabled for the given
condition.
This commit is contained in:
Darren Austin
2021-08-10 23:03:48 -07:00
committed by GitHub
parent b08366ce7b
commit 41ff30c871
2 changed files with 36 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ Future<double> findCostsForFile(File file) async {
total += deprecationCost;
if (line.contains(legacyDeprecationPattern))
total += legacyDeprecationCost;
if (isTest && line.contains('skip:'))
if (isTest && line.contains('skip:') && !line.contains('[intended]'))
total += skipCost;
if (isDart && isOptingOutOfNullSafety(line))
total += fileNullSafetyMigrationCost;