From ca5f05e62b099f384b8005a89536e3017b31ead0 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 3 Jul 2014 05:15:09 +1000 Subject: [PATCH] Enable unit tests for `ArcanistJscsLinterTestCase` Summary: https://github.com/mdevils/node-jscs/issues/444 has been resolved in commit [[https://github.com/mdevils/node-jscs/commit/0de667bac2491ba04d930ff94e990965213ba36b | 0de667bac2491ba04d930ff94e990965213ba36b]], which means that `jscs` can be easily run on files with any extension. NOTE: JSCS version 1.5.7 is required. Test Plan: `arc unit` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9789 --- src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php | 6 ------ src/lint/linter/__tests__/jscs/curly-brace.lint-test | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php index 5004a527..d72c44e0 100644 --- a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php @@ -3,12 +3,6 @@ final class ArcanistJscsLinterTestCase extends ArcanistArcanistLinterTestCase { public function testJscsLinter() { - // NOTE: JSCS will only lint files with a `*.js` extension. - // - // See https://github.com/mdevils/node-jscs/issues/444 - $this->assertTrue(true); - return; - $this->executeTestsInDirectory( dirname(__FILE__).'/jscs/', new ArcanistJscsLinter()); diff --git a/src/lint/linter/__tests__/jscs/curly-brace.lint-test b/src/lint/linter/__tests__/jscs/curly-brace.lint-test index e5c37f43..ff3c7868 100644 --- a/src/lint/linter/__tests__/jscs/curly-brace.lint-test +++ b/src/lint/linter/__tests__/jscs/curly-brace.lint-test @@ -1,8 +1,8 @@ function foo() { - if (true) return 'foo'; else return 'bar'; + if (true) return "foo"; else return "bar"; } ~~~~~~~~~~ -error:2: +error:2:3 ~~~~~~~~~~ ~~~~~~~~~~ {