From 108f51d9b4260b4001f865fc0bde73cb1ec3e4cd Mon Sep 17 00:00:00 2001 From: JeffMo Date: Mon, 26 Mar 2012 16:09:55 -0700 Subject: [PATCH] Fix PhabricatorJavelinLinter regex issue caused by D2023 Summary: D2023 adds a new '*' token to javelinsymbols (indicating that a behavior is 'installed'). This fixes a sanity-check regex in PhabricatorJavelinLinter that validates the output of javelinsymbols so that it is aware of this new token type. Test Plan: Patched javelinsymbols.cpp from D2023 to externals/javelin/support/javelinsymbols, build the new javelinsymbols binary, then ran arc lint --lintall webroot/rsrc/js/application/core/behavior-drag-and-drop-textarea.js (before this diff, that throws an error -- after it works with no lint) Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2025 --- .../lint/linter/javelin/PhabricatorJavelinLinter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/lint/linter/javelin/PhabricatorJavelinLinter.php b/src/infrastructure/lint/linter/javelin/PhabricatorJavelinLinter.php index 4833d5e944..75a0588d26 100644 --- a/src/infrastructure/lint/linter/javelin/PhabricatorJavelinLinter.php +++ b/src/infrastructure/lint/linter/javelin/PhabricatorJavelinLinter.php @@ -216,7 +216,7 @@ final class PhabricatorJavelinLinter extends ArcanistLinter { $symbols = explode("\n", trim($symbols)); foreach ($symbols as $line) { $matches = null; - if (!preg_match('/^([?+])([^:]*):(\d+)$/', $line, $matches)) { + if (!preg_match('/^([?+\*])([^:]*):(\d+)$/', $line, $matches)) { throw new Exception( "Received malformed output from `javelinsymbols`."); }