From 7112ee3d596019f0807748e6a7ec709041cdf166 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 4 Sep 2020 17:30:36 -0700 Subject: [PATCH] Fix additional "xsprintf()"-family static parameter errors Summary: Ref T13577. After the lint rule fix in D21453, it can identify more errors. Fix the errors it identifies in "arcanist/". These all seem fairly obscure/benign. Test Plan: Ran `arc lint` on the files before and after these changes. Did not specifically re-test these particular messages, but they mostly very obscure. Maniphest Tasks: T13577 Differential Revision: https://secure.phabricator.com/D21456 --- src/hardpoint/ArcanistHardpointList.php | 4 +++- src/land/engine/ArcanistLandEngine.php | 1 + src/repository/api/ArcanistMercurialAPI.php | 2 +- src/runtime/ArcanistRuntime.php | 1 + src/toolset/ArcanistAliasEngine.php | 4 ++-- src/workflow/ArcanistCloseRevisionWorkflow.php | 3 +-- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/hardpoint/ArcanistHardpointList.php b/src/hardpoint/ArcanistHardpointList.php index bc44bdde..1b93a1d7 100644 --- a/src/hardpoint/ArcanistHardpointList.php +++ b/src/hardpoint/ArcanistHardpointList.php @@ -27,7 +27,9 @@ final class ArcanistHardpointList pht( 'Hardpoint (at index "%s") has the same key ("%s") as an earlier '. 'hardpoint. Each hardpoint must have a key that is unique '. - 'among hardpoints on the object.')); + 'among hardpoints on the object.', + $idx, + $key)); } $map[$key] = $hardpoint; diff --git a/src/land/engine/ArcanistLandEngine.php b/src/land/engine/ArcanistLandEngine.php index 1bafeb23..5722073b 100644 --- a/src/land/engine/ArcanistLandEngine.php +++ b/src/land/engine/ArcanistLandEngine.php @@ -1459,6 +1459,7 @@ abstract class ArcanistLandEngine 'Merge strategy "%s" specified in "%s" configuration is '. 'unknown. Supported merge strategies are: %s.', $strategy, + $this->getStrategyConfigurationKey(), $strategy_list)); } diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php index cbc6b5a0..e5c2078b 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -778,7 +778,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { pht( "'%s' has been amended with 'Differential Revision:', ". "as specified by '%s' in your %s 'base' configuration.", - '.'. + '.', $rule, $source)); // NOTE: This should be safe because Mercurial doesn't support diff --git a/src/runtime/ArcanistRuntime.php b/src/runtime/ArcanistRuntime.php index 87d574a5..35099b2c 100644 --- a/src/runtime/ArcanistRuntime.php +++ b/src/runtime/ArcanistRuntime.php @@ -553,6 +553,7 @@ final class ArcanistRuntime { 'workflow in a given toolset must have a unique name.', get_class($workflow), get_class($map[$key]), + $key, get_class($toolset), $toolset->getToolsetKey())); } diff --git a/src/toolset/ArcanistAliasEngine.php b/src/toolset/ArcanistAliasEngine.php index cba6d723..baa4ab56 100644 --- a/src/toolset/ArcanistAliasEngine.php +++ b/src/toolset/ArcanistAliasEngine.php @@ -72,8 +72,8 @@ final class ArcanistAliasEngine pht( 'Configuration source ("%s") defines an invalid alias, which '. 'will be ignored: %s', - $alias->getConfigurationSource()->getSourceDisplayName()), - $exception->getMessage()); + $alias->getConfigurationSource()->getSourceDisplayName(), + $exception->getMessage())); } $command = array_shift($argv); diff --git a/src/workflow/ArcanistCloseRevisionWorkflow.php b/src/workflow/ArcanistCloseRevisionWorkflow.php index 363b5dbe..8ed435a1 100644 --- a/src/workflow/ArcanistCloseRevisionWorkflow.php +++ b/src/workflow/ArcanistCloseRevisionWorkflow.php @@ -35,8 +35,7 @@ EOTEXT 'help' => pht( "Close only if the repository is untracked and the revision is ". "accepted. Continue even if the close can't happen. This is a soft ". - "version of '' used by other workflows.", - 'close-revision'), + "version of 'close-revision' used by other workflows."), ), 'quiet' => array( 'help' => pht('Do not print a success message.'),