diff --git a/.editorconfig b/.editorconfig index cb3e2fa0..cbf4b57a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,11 +11,11 @@ insert_final_newline = true trim_trailing_whitespace = false insert_final_newline = false -[src/parser/__tests__/diff/*] +[src/parser/__tests__/diff/*.{git,hg,svn,u}diff] trim_trailing_whitespace = false insert_final_newline = false -[src/parser/__tests__/patches/*] +[src/parser/__tests__/patches/*.gitpatch] trim_trailing_whitespace = false insert_final_newline = false diff --git a/src/lint/linter/ArcanistJSONLintLinter.php b/src/lint/linter/ArcanistJSONLintLinter.php index a4591cfa..1cd4e9bd 100644 --- a/src/lint/linter/ArcanistJSONLintLinter.php +++ b/src/lint/linter/ArcanistJSONLintLinter.php @@ -68,8 +68,8 @@ final class ArcanistJSONLintLinter extends ArcanistExternalLinter { foreach ($lines as $line) { $matches = null; $match = preg_match( - '/^(?:(?.+): )?' . - 'line (?\d+), col (?\d+), ' . + '/^(?:(?.+): )?'. + 'line (?\d+), col (?\d+), '. '(?.*)$/', $line, $matches); diff --git a/src/lint/linter/ArcanistLesscLinter.php b/src/lint/linter/ArcanistLesscLinter.php index cc881fc9..810944cb 100644 --- a/src/lint/linter/ArcanistLesscLinter.php +++ b/src/lint/linter/ArcanistLesscLinter.php @@ -131,8 +131,8 @@ final class ArcanistLesscLinter extends ArcanistExternalLinter { foreach ($lines as $line) { $matches = null; $match = preg_match( - '/^(?P\w+): (?P.+) ' . - 'in (?P.+|-) ' . + '/^(?P\w+): (?P.+) '. + 'in (?P.+|-) '. 'on line (?P\d+), column (?P\d+):$/', $line, $matches); diff --git a/src/lint/linter/ArcanistTextLinter.php b/src/lint/linter/ArcanistTextLinter.php index c7558199..5de9a618 100644 --- a/src/lint/linter/ArcanistTextLinter.php +++ b/src/lint/linter/ArcanistTextLinter.php @@ -252,7 +252,7 @@ final class ArcanistTextLinter extends ArcanistLinter { $this->raiseLintAtOffset( $offset, self::LINT_BOF_WHITESPACE, - 'This file contains leading whitespace at the beginning of the file. ' . + 'This file contains leading whitespace at the beginning of the file. '. 'This is unnecessary and should be avoided when possible.', $string, ''); @@ -276,7 +276,7 @@ final class ArcanistTextLinter extends ArcanistLinter { $this->raiseLintAtOffset( $offset, self::LINT_EOF_WHITESPACE, - 'This file contains trailing whitespace at the end of the file. This ' . + 'This file contains trailing whitespace at the end of the file. This '. 'is unnecessary and should be avoided when possible.', $string, ''); diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php index 0776a346..2bd9063d 100644 --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -1081,8 +1081,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { $this->raiseLintAtNode( $var, self::LINT_REUSED_ITERATOR_REFERENCE, - 'This variable was used already as a by-reference iterator ' . - 'variable. Such variables survive outside the foreach loop, ' . + 'This variable was used already as a by-reference iterator '. + 'variable. Such variables survive outside the foreach loop, '. 'do not reuse.'); } } diff --git a/src/lint/renderer/ArcanistLintConsoleRenderer.php b/src/lint/renderer/ArcanistLintConsoleRenderer.php index 6e3076e7..53db10dc 100644 --- a/src/lint/renderer/ArcanistLintConsoleRenderer.php +++ b/src/lint/renderer/ArcanistLintConsoleRenderer.php @@ -62,7 +62,7 @@ final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer { if ($text) { $prefix = phutil_console_format("**>>>** Lint for __%s__:\n\n\n", $path); - return $prefix . implode("\n", $text); + return $prefix.implode("\n", $text); } else { return null; } diff --git a/src/parser/ArcanistDiffParser.php b/src/parser/ArcanistDiffParser.php index 7575d311..7c772687 100644 --- a/src/parser/ArcanistDiffParser.php +++ b/src/parser/ArcanistDiffParser.php @@ -279,7 +279,7 @@ final class ArcanistDiffParser { "Expected a hunk header, like 'Index: /path/to/file.ext' (svn), ". "'Property changes on: /path/to/file.ext' (svn properties), ". "'commit 59bcc3ad6775562f845953cf01624225' (git show), ". - "'diff --git' (git diff), '--- filename' (unified diff), or " . + "'diff --git' (git diff), '--- filename' (unified diff), or ". "'diff -r' (hg diff or patch)."); } diff --git a/src/parser/__tests__/base85/expect1.txt b/src/parser/__tests__/base85/expect1.txt index b7d5507b..67fc430a 100644 --- a/src/parser/__tests__/base85/expect1.txt +++ b/src/parser/__tests__/base85/expect1.txt @@ -1 +1 @@ -009C61O)~M2nh-c3=Iws5D^j+6crX17#SKH9337XAR!_nBqb&%C@Cr{EG;fCFflSSG&MFiI5|2yJUu=?KtV!7L`6nNNJ&adOifNtP*GA-R8>}2SXo+ITwPvYU}0ioWMyV&XlZI|Y;A6DaB*^Tbai%jczJqze0_d@fPsR8goTEOh>41ejE#+0#~=jP?)3Q(qoSdppPrqZo0^%JmzI^3lai5;kB*Iui;9VehlYiOgMxv8e|~*@dwO|zcXoAjb8>NTZ*FaDYiem|XJ%z&V`5=oUtV2YTUuFIS5{S2Q&Le-PfkrtOG-&dM@B_NLqb77KR!J?J32WyH#RjiGcqwSFD@-CD=H}{CnhB%BO)OnA08bX8yXoH7Zw#16A}>+4-O3s3knGc2L=TM0|Eg6 \ No newline at end of file +009C61O)~M2nh-c3=Iws5D^j+6crX17#SKH9337XAR!_nBqb&%C@Cr{EG;fCFflSSG&MFiI5|2yJUu=?KtV!7L`6nNNJ&adOifNtP*GA-R8>}2SXo+ITwPvYU}0ioWMyV&XlZI|Y;A6DaB*^Tbai%jczJqze0_d@fPsR8goTEOh>41ejE#+0#~=jP?)3Q(qoSdppPrqZo0^%JmzI^3lai5;kB*Iui;9VehlYiOgMxv8e|~*@dwO|zcXoAjb8>NTZ*FaDYiem|XJ%z&V`5=oUtV2YTUuFIS5{S2Q&Le-PfkrtOG-&dM@B_NLqb77KR!J?J32WyH#RjiGcqwSFD@-CD=H}{CnhB%BO)OnA08bX8yXoH7Zw#16A}>+4-O3s3knGc2L=TM0|Eg6 diff --git a/src/parser/__tests__/base85/expect2.txt b/src/parser/__tests__/base85/expect2.txt index c752a6c6..1f47b081 100644 --- a/src/parser/__t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HRo05Qf+{CZ+*64t_d5Ou?_jbre7qCHJ=)j%xM6*1t`3@U)&M4#|J&xiMS8UWG5v7N*EERa1!47a9Tf0>klPN&+SK!z)L_}C$XhcswIg&aUu#yCoEs{v`Tj=3@tY)mOUfl!K@el;=V;o@woO})$*D2xTq@6l`e`x`ol>VxwRU@fRhZ^YW@E2hYV4SokS1@k4Pu(SZ@1Bl`YuFGY!bDSZWRE~1;pn2UKZ*xt&16rU9*K4YZL7k&7KMNTrLp1?1THy;jPAVq2WHh7)Lv$n8|EvBae||Yn6MVvyO)bsc|lfg!jIqjTgPZyxCucqd>P@DE(J`iIDy);i#{BAnlY?CJ#DM=T3*L)jycVHZ({DbbKQbMZwchXu9D~&nV?>x67=HW=9O4FMXmlLd0&Fgm56ieM#uoH!z$cyy#1N3Os9A2d|1D`QfOj53wdNXWv9z~>9RAmSyFo!v;r#!4LT85lBFUmyylk$5(Vdx^ZclJxot$;GllE1F}wih=|$_vtVNXEM=28fk91_+M?esa(9&9NFxHM=OQr9rV(TcNUO&OS3TUg>`l7dw60n)PlOVX2jmpQT*)AEZ2DwgFj&$!T1lV;1I4Z}Wq>1ySiqtGDSZ@FWBe<^uNPSR7Z(0aJ<5q3U;!o<1t8~rz@6Y)j@%XuHsyjE)Awp;D)HU;Yd diff --git a/src/repository/api/ArcanistSubversionAPI.php b/src/repository/api/ArcanistSubversionAPI.php index 27e2aeef..1d2157e6 100644 --- a/src/repository/api/ArcanistSubversionAPI.php +++ b/src/repository/api/ArcanistSubversionAPI.php @@ -128,7 +128,7 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI { foreach ($files as $path => $mask) { foreach ($externals as $external) { - if (!strncmp($path . '/', $external . '/', strlen($external) + 1)) { + if (!strncmp($path.'/', $external.'/', strlen($external) + 1)) { $files[$path] |= self::FLAG_EXTERNALS; } } diff --git a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php index 0ef7e7cb..d349d5e5 100644 --- a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php +++ b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php @@ -27,7 +27,7 @@ final class ArcanistRepositoryAPIStateTestCase extends ArcanistTestCase { } private function parseState($test) { - $dir = dirname(__FILE__) . '/state/'; + $dir = dirname(__FILE__).'/state/'; $fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test); $fixture_path = $fixture->getPath(); diff --git a/src/unit/engine/NoseTestEngine.php b/src/unit/engine/NoseTestEngine.php index b1f95317..f59dcd09 100644 --- a/src/unit/engine/NoseTestEngine.php +++ b/src/unit/engine/NoseTestEngine.php @@ -91,7 +91,7 @@ final class NoseTestEngine extends ArcanistBaseUnitTestEngine { $xunit_tmp); if ($this->getEnableCoverage() !== false) { - $cmd_line .= csprintf(' --with-coverage --cover-xml ' . + $cmd_line .= csprintf(' --with-coverage --cover-xml '. '--cover-xml-file=%s', $cover_tmp); } diff --git a/src/unit/engine/PhpunitResultParser.php b/src/unit/engine/PhpunitResultParser.php index 152d337d..0868fae1 100644 --- a/src/unit/engine/PhpunitResultParser.php +++ b/src/unit/engine/PhpunitResultParser.php @@ -56,7 +56,7 @@ final class PhpunitResultParser extends ArcanistBaseTestResultParser { if ('fail' == $event->status) { $status = ArcanistUnitTestResult::RESULT_FAIL; - $user_data .= $event->message . "\n"; + $user_data .= $event->message."\n"; foreach ($event->trace as $trace) { $user_data .= sprintf("\n%s:%s", $trace->file, $trace->line); } @@ -150,7 +150,7 @@ final class PhpunitResultParser extends ArcanistBaseTestResultParser { $coverage .= 'N'; } - $len = strlen($this->projectRoot . DIRECTORY_SEPARATOR); + $len = strlen($this->projectRoot.DIRECTORY_SEPARATOR); $class_path = substr($class_path, $len); $reports[$class_path] = $coverage; } @@ -169,16 +169,16 @@ final class PhpunitResultParser extends ArcanistBaseTestResultParser { private function getJsonReport($json) { if (empty($json)) { - throw new Exception('JSON report file is empty, ' - . 'it probably means that phpunit failed to run tests. ' - . 'Try running arc unit with --trace option and then run ' - . 'generated phpunit command yourself, you might get the ' - . 'answer.' + throw new Exception('JSON report file is empty, '. + 'it probably means that phpunit failed to run tests. '. + 'Try running arc unit with --trace option and then run '. + 'generated phpunit command yourself, you might get the '. + 'answer.' ); } $json = preg_replace('/}{\s*"/', '},{"', $json); - $json = '[' . $json . ']'; + $json = '['.$json.']'; $json = json_decode($json); if (!is_array($json)) { throw new Exception('JSON could not be decoded'); diff --git a/src/unit/engine/PhpunitTestEngine.php b/src/unit/engine/PhpunitTestEngine.php index 59b4a296..d36f00b3 100644 --- a/src/unit/engine/PhpunitTestEngine.php +++ b/src/unit/engine/PhpunitTestEngine.php @@ -261,16 +261,16 @@ final class PhpunitTestEngine extends ArcanistBaseUnitTestEngine { * based on phpunit_config option in .arcconfig */ private function prepareConfigFile() { - $project_root = $this->projectRoot . DIRECTORY_SEPARATOR; + $project_root = $this->projectRoot.DIRECTORY_SEPARATOR; $config = $this->getConfigurationManager()->getConfigFromAnySource( 'phpunit_config'); if ($config) { - if (Filesystem::pathExists($project_root . $config)) { - $this->configFile = $project_root . $config; + if (Filesystem::pathExists($project_root.$config)) { + $this->configFile = $project_root.$config; } else { - throw new Exception('PHPUnit configuration file was not ' . - 'found in ' . $project_root . $config); + throw new Exception('PHPUnit configuration file was not '. + 'found in '.$project_root.$config); } } $bin = $this->getConfigurationManager()->getConfigFromAnySource( diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 7e09fb5c..be78bc60 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -791,7 +791,7 @@ abstract class ArcanistBaseWorkflow extends Phobject { if ($this->stashed) { $api = $this->getRepositoryAPI(); $api->unstashChanges(); - echo pht('Restored stashed changes to the working directory.') . "\n"; + echo pht('Restored stashed changes to the working directory.')."\n"; } } diff --git a/src/workflow/ArcanistFeatureWorkflow.php b/src/workflow/ArcanistFeatureWorkflow.php index 164daf89..25103f75 100644 --- a/src/workflow/ArcanistFeatureWorkflow.php +++ b/src/workflow/ArcanistFeatureWorkflow.php @@ -351,7 +351,7 @@ EOTEXT foreach ($out as &$feature) { unset($feature['color'], $feature['ssort'], $feature['esort']); } - echo json_encode(ipull($out, null, 'name')) . "\n"; + echo json_encode(ipull($out, null, 'name'))."\n"; } else { $console = PhutilConsole::getConsole(); foreach ($out as $line) { diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php index 84364f9d..6b3fe8cf 100644 --- a/src/workflow/ArcanistLandWorkflow.php +++ b/src/workflow/ArcanistLandWorkflow.php @@ -309,7 +309,7 @@ EOTEXT $this->branch, $this->onto); if (!$this->isHistoryImmutable()) { - $message .= ' ' . pht("You may be able to 'arc amend' instead."); + $message .= ' '.pht("You may be able to 'arc amend' instead."); } throw new ArcanistUsageException($message); } @@ -571,7 +571,7 @@ EOTEXT } else if ($this->isHg) { echo phutil_console_format(pht( 'Updating **%s**...', - $this->onto) . "\n"); + $this->onto)."\n"); try { list($out, $err) = $repository_api->execxLocal('pull'); @@ -962,7 +962,7 @@ EOTEXT if ($this->getArgument('hold')) { echo phutil_console_format(pht( 'Holding change in **%s**: it has NOT been pushed yet.', - $this->onto). "\n"); + $this->onto)."\n"); } else { echo pht('Pushing change...'), "\n\n"; diff --git a/src/workflow/ArcanistLintWorkflow.php b/src/workflow/ArcanistLintWorkflow.php index ab35fee6..545481ba 100644 --- a/src/workflow/ArcanistLintWorkflow.php +++ b/src/workflow/ArcanistLintWorkflow.php @@ -63,7 +63,7 @@ EOTEXT return array( 'lintall' => array( 'help' => - 'Show all lint warnings, not just those on changed lines. When ' . + 'Show all lint warnings, not just those on changed lines. When '. 'paths are specified, this is the default behavior.', 'conflicts' => array( 'only-changed' => true, @@ -71,9 +71,9 @@ EOTEXT ), 'only-changed' => array( 'help' => - 'Show lint warnings just on changed lines. When no paths are ' . - 'specified, this is the default. This differs from only-new ' . - 'in cases where line modifications introduce lint on other ' . + 'Show lint warnings just on changed lines. When no paths are '. + 'specified, this is the default. This differs from only-new '. + 'in cases where line modifications introduce lint on other '. 'unmodified lines.', 'conflicts' => array( 'lintall' => true, diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index 68bf6cdb..b5533c8e 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -984,12 +984,12 @@ EOTEXT $source_revision = $this->loadRevisionFromHash($hash); if ($bundle_revision) { - $bundle_base_rev_str = $bundle_base_rev . - ' \ D' . $bundle_revision['id']; + $bundle_base_rev_str = $bundle_base_rev. + ' \ D'.$bundle_revision['id']; } if ($source_revision) { - $source_base_rev_str = $source_base_rev . - ' \ D' . $source_revision['id']; + $source_base_rev_str = $source_base_rev. + ' \ D'.$source_revision['id']; } } $bundle_base_rev_str = nonempty($bundle_base_rev_str,