Skip to content

Commit 6e1b5da

Browse files
author
epriestley
committedSep 8, 2020
Fix additional "xprintf()"-class static parameter lint errors
Summary: Ref T13577. After the fix in D21453, lint identifies additional static errors in Phabricator; fix them. Test Plan: Ran `arc lint`; these messages are essentially all very obscure. Subscribers: hach-que, yelirekim, PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13577 Differential Revision: https://secure.phabricator.com/D21457
1 parent 7daaaa8 commit 6e1b5da

18 files changed

+30
-14
lines changed
 

‎resources/sql/autopatches/20150602.mlist.2.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
if (!$username_okay) {
4141
echo pht(
4242
'Failed to migrate mailing list "%s": unable to generate a unique '.
43-
'username for it.')."\n";
43+
'username for it.',
44+
$name)."\n";
4445
continue;
4546
}
4647

‎src/applications/differential/management/PhabricatorDifferentialRebuildChangesetsWorkflow.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function execute(PhutilArgumentParser $args) {
3636
throw new PhutilArgumentUsageException(
3737
pht(
3838
'Object "%s" specified by "--revision" must be a Differential '.
39-
'revision.'));
39+
'revision.',
40+
$revision_identifier));
4041
}
4142
} else {
4243
$revision = id(new DifferentialRevisionQuery())

‎src/applications/differential/xaction/DifferentialRevisionRepositoryTransaction.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public function validateTransactions($object, array $xactions) {
8484
$errors[] = $this->newInvalidError(
8585
pht(
8686
'Repository "%s" is not a valid repository, or you do not have '.
87-
'permission to view it.'),
87+
'permission to view it.',
88+
$new_value),
8889
$xaction);
8990
}
9091
}

‎src/applications/fact/chart/PhabricatorChartFunctionArgumentParser.php

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function addArgument(PhabricatorChartFunctionArgument $spec) {
4343
pht(
4444
'Chart function "%s" emitted an argument specification ("%s") with '.
4545
'no type. Each argument specification must have a valid type.',
46+
$this->getFunctionArgumentSignature(),
4647
$name));
4748
}
4849

‎src/applications/harbormaster/management/HarbormasterManagementPublishWorkflow.php

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function execute(PhutilArgumentParser $args) {
5454
pht(
5555
'Object "%s" is not a HarbormasterBuildable (it is a "%s"). '.
5656
'Name one or more buildables to publish, like "B123".',
57+
$name,
5758
get_class($result)));
5859
}
5960
}

‎src/applications/harbormaster/storage/build/HarbormasterBuildLog.php

+2
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ public function loadData($offset, $length) {
177177
pht(
178178
'Attempt to load log bytes (%d - %d) failed: failed to '.
179179
'load a single contiguous range. Actual ranges: %s.',
180+
$offset,
181+
$end,
180182
implode('; ', $display_ranges)));
181183
}
182184

‎src/applications/maniphest/constants/ManiphestTaskPriority.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ public static function validateConfiguration($config) {
199199
throw new Exception(
200200
pht(
201201
'Configuration is not valid. Maniphest priority configurations '.
202-
'must be dictionaries.',
203-
$config));
202+
'must be dictionaries.'));
204203
}
205204

206205
$all_keywords = array();

‎src/applications/metamta/adapter/PhabricatorMailAdapter.php

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ final public function setMedia(array $media) {
6565
pht(
6666
'Adapter ("%s") is configured for medium "%s", but this is not '.
6767
'a supported delivery medium. Supported media are: %s.',
68+
get_class($this),
6869
$medium,
6970
implode(', ', $native_map)));
7071
}

‎src/applications/notification/config/PhabricatorNotificationServersConfigType.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ public function validateStoredValue(
9898
'Notification server configuration describes an invalid host '.
9999
'("%s", at index "%s"). This is an "admin" service but it has a '.
100100
'"path" property. This property is only valid for "client" '.
101-
'services.'));
101+
'services.',
102+
$host,
103+
$index));
102104
}
103105

104106
// We can't guarantee that you didn't just give the same host two

‎src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ private function readTestCases($path) {
8585
throw new Exception(
8686
pht(
8787
'Expected test file "%s" to contain exactly two sections, '.
88-
'but it has more than two sections.'));
88+
'but it has more than two sections.',
89+
$file));
8990
}
9091

9192
list($input, $expect) = $parts;

‎src/applications/phragment/controller/PhragmentRevertController.php

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public function createDialog(
7171
->appendParagraph(pht(
7272
'Reverting this fragment to version %d will create a new version of '.
7373
'the fragment. It will not delete any version history.',
74-
$version->getSequence(),
7574
$version->getSequence()));
7675
return id(new AphrontDialogResponse())->setDialog($dialog);
7776
}

‎src/applications/policy/storage/PhabricatorPolicy.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ public static function getOpaquePolicyExplanation(
266266
return pht(
267267
'Members of a particular project can take this action. (You '.
268268
'can not see this object, so the name of this project is '.
269-
'restricted.)',
270-
$handle->getFullName());
269+
'restricted.)');
271270
} else if ($type == PhabricatorPeopleUserPHIDType::TYPECONST) {
272271
return pht(
273272
'%s can take this action.',

‎src/applications/project/icon/PhabricatorProjectIconSet.php

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ public static function validateConfiguration($config) {
224224
'Icon key "%s" is not a valid icon key. Icon keys must be 1-32 '.
225225
'characters long and contain only lowercase letters. For example, '.
226226
'"%s" and "%s" are reasonable keys.',
227+
$value['key'],
227228
'tag',
228229
'group'));
229230
}

‎src/applications/search/ferret/function/FerretSearchFunction.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ final public static function validateFerretFunctionName($function_name) {
1717
pht(
1818
'Ferret search engine function name ("%s") is invalid. Function '.
1919
'names must be nonempty and may only contain latin letters and '.
20-
'hyphens.'));
20+
'hyphens.',
21+
$function_name));
2122
}
2223
}
2324

@@ -77,6 +78,7 @@ final public static function newFerretSearchFunctions() {
7778
'Ferret function "%s" is specified with a denormalized name. '.
7879
'Instead, specify the function using the normalized '.
7980
'function name ("%s").',
81+
$function_name,
8082
$normal_name));
8183
}
8284

‎src/applications/transactions/editengine/PhabricatorEditEngine.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,9 @@ final public function newBulkEditGroupMap() {
25482548
pht(
25492549
'Extension "%s" defines a bulk edit group with the same key '.
25502550
'("%s") as the main editor or another extension. Each bulk '.
2551-
'edit group must have a unique key.'));
2551+
'edit group must have a unique key.',
2552+
get_class($extension),
2553+
$key));
25522554
}
25532555

25542556
$map[$key] = $group;

‎src/applications/transactions/editengine/PhabricatorEditEngineSubtype.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ public static function validateConfiguration($config) {
204204
pht(
205205
'Subtype configuration is invalid: subtype with key "%s" '.
206206
'specifies both child subtypes and child forms. Specify one '.
207-
'or the other, but not both.'));
207+
'or the other, but not both.',
208+
$key));
208209
}
209210
}
210211

‎src/infrastructure/cluster/PhabricatorDatabaseRefParser.php

+2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ public function newRefs(array $config) {
205205
'Database "%s" is configured as a replica and specifies a '.
206206
'master ("%s"), but that master is not a valid master. Valid '.
207207
'masters are: %s.',
208+
$ref->getRefKey(),
209+
$master_key,
208210
implode(', ', $master_keys)));
209211
}
210212

‎src/infrastructure/customfield/datasource/PhabricatorCustomFieldApplicationSearchNoneFunctionDatasource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function getDatasourceFunctions() {
2222
'summary' => pht('Find results with no value.'),
2323
'description' => pht(
2424
"This function includes results which have no value. Use a query ".
25-
"like this to find results with no value:\n\n%s\n\n",
25+
"like this to find results with no value:\n\n%s\n\n".
2626
'If you combine this function with other constraints, results '.
2727
'which have no value or the specified values will be returned.',
2828
'> any()'),

0 commit comments

Comments
 (0)
Failed to load comments.