Drop some files from the foreach whitelist
GITHUB_BREAKING_CHANGES=none
@@ -461,8 +461,6 @@ public class SoyFileParser {
"foreach loops are no longer supported, please switch to the for loop."
, StyleAllowance.NO_CAPS);
- private static final ImmutableList<String> FOREACH_WHITELISTED_PATHS = ImmutableList.of(
- );
private static final ImmutableSet<String> FOREACH_WHITELISTED_EXACT_PATHS = ImmutableSet.of(
);
@@ -2715,16 +2713,7 @@ private ForNode ForStmt() :
)
{
if (tagBegin.kind == CMD_BEGIN_FOREACH) {
- boolean isWhitelisted = FOREACH_WHITELISTED_EXACT_PATHS.contains(filePath);
- if (!isWhitelisted) {
- for (String whitelisted : FOREACH_WHITELISTED_PATHS) {
- if (filePath.contains(whitelisted)) {
- isWhitelisted = true;
- break;
- }
- }
- }
- if (isWhitelisted) {
+ if (FOREACH_WHITELISTED_EXACT_PATHS.contains(filePath)) {
errorReporter.warn(createSrcLoc(tagBegin), FOREACH_IS_DISABLED);
} else {
errorReporter.report(createSrcLoc(tagBegin), FOREACH_IS_DISABLED);
