mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 14:22:40 +01:00
Minor linter fixes
Summary: Apply some linter autofixes. Test Plan: `arc lint` and `arc unit` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10568
This commit is contained in:
parent
8ed1459ecd
commit
b1112e73c4
21 changed files with 40 additions and 31 deletions
|
@ -46,7 +46,7 @@ $base_args->parsePartial(
|
|||
'repeat' => true,
|
||||
'help' =>
|
||||
'Specify a runtime configuration value. This will take precedence '.
|
||||
'over static values, and only affect the current arcanist invocation.'
|
||||
'over static values, and only affect the current arcanist invocation.',
|
||||
),
|
||||
));
|
||||
|
||||
|
@ -413,7 +413,7 @@ function sanity_check_environment() {
|
|||
'text',
|
||||
"You need to install the cURL PHP extension, maybe with ".
|
||||
"'apt-get install php5-curl' or 'yum install php53-curl' or ".
|
||||
"something similar."),
|
||||
"something similar.",),
|
||||
'json_decode' => array('flag', '--without-json'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ final class ArcanistSettings {
|
|||
"Path to a custom CA bundle file to be used for arcanist's cURL ".
|
||||
"calls. This is used primarily when your conduit endpoint is ".
|
||||
"behind https signed by your organization's internal CA.",
|
||||
'example' => 'support/yourca.pem'
|
||||
'example' => 'support/yourca.pem',
|
||||
),
|
||||
'https.blindly-trust-domains' => array(
|
||||
'type' => 'list',
|
||||
|
|
|
@ -52,7 +52,7 @@ final class ArcanistDiffUtils {
|
|||
if (($o === $n) || !$ol || !$nl) {
|
||||
return array(
|
||||
array(array(0, $ol)),
|
||||
array(array(0, $nl))
|
||||
array(array(0, $nl)),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ final class ArcanistHgProxyServer {
|
|||
array_merge($clients, array($hg)),
|
||||
array(
|
||||
'read' => $socket ? array($socket) : array(),
|
||||
'except' => $socket ? array($socket) : array()
|
||||
'except' => $socket ? array($socket) : array(),
|
||||
));
|
||||
|
||||
if (!$hg->update()) {
|
||||
|
|
|
@ -432,7 +432,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
|
|||
'Specify a string (or list of strings) identifying the binary '.
|
||||
'which should be invoked to execute this linter. This overrides '.
|
||||
'the default binary. If you provide a list of possible binaries, '.
|
||||
'the first one which exists will be used.')
|
||||
'the first one which exists will be used.'),
|
||||
),
|
||||
'flags' => array(
|
||||
'type' => 'optional list<string>',
|
||||
|
|
|
@ -121,7 +121,8 @@ final class ArcanistLesscLinter extends ArcanistExternalLinter {
|
|||
'--lint',
|
||||
'--no-color',
|
||||
'--strict-math='.($this->strictMath ? 'on' : 'off'),
|
||||
'--strict-units='.($this->strictUnits ? 'on' : 'off'));
|
||||
'--strict-units='.($this->strictUnits ? 'on' : 'off'),
|
||||
);
|
||||
}
|
||||
|
||||
protected function parseLinterOutput($path, $err, $stdout, $stderr) {
|
||||
|
|
|
@ -351,7 +351,7 @@ abstract class ArcanistLinter {
|
|||
'type' => 'optional map<string|int, string>',
|
||||
'help' => pht(
|
||||
'Provide a map from lint codes to adjusted severity levels: error, '.
|
||||
'warning, advice, autofix or disabled.')
|
||||
'warning, advice, autofix or disabled.'),
|
||||
),
|
||||
'severity.rules' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
|
|
|
@ -63,7 +63,9 @@ final class ArcanistPuppetLintLinter extends ArcanistExternalLinter {
|
|||
'%{column}',
|
||||
'%{kind}',
|
||||
'%{check}',
|
||||
'%{message}'))));
|
||||
'%{message}',
|
||||
))),
|
||||
);
|
||||
}
|
||||
|
||||
public function getLinterConfigurationOptions() {
|
||||
|
|
|
@ -1840,7 +1840,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
|||
$global,
|
||||
|
||||
// No advice for globals, but hooks have an option to provide some.
|
||||
null);
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
// Exclude access of static properties, since lint will be raised at
|
||||
|
|
|
@ -564,7 +564,7 @@ final class ArcanistDiffParser {
|
|||
'rename from (?P<old>.*)',
|
||||
'(?P<move>rename) to (?P<cur>.*)',
|
||||
'copy from (?P<old>.*)',
|
||||
'(?P<copy>copy) to (?P<cur>.*)'
|
||||
'(?P<copy>copy) to (?P<cur>.*)',
|
||||
);
|
||||
|
||||
$ok = false;
|
||||
|
|
|
@ -1054,7 +1054,8 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
$bookmarks[] = array(
|
||||
'is_active' => $is_active,
|
||||
'name' => $name,
|
||||
'revision' => $revision);
|
||||
'revision' => $revision,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@ final class CSharpToolsTestEngine extends XUnitTestEngine {
|
|||
return array(
|
||||
$future,
|
||||
$assembly_dir.DIRECTORY_SEPARATOR.$xunit_temp,
|
||||
$cover_temp);
|
||||
$cover_temp,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -195,7 +196,8 @@ final class CSharpToolsTestEngine extends XUnitTestEngine {
|
|||
$results[] = array(
|
||||
'file' => $tag->getAttribute('file'),
|
||||
'start' => $tag->getAttribute('start'),
|
||||
'end' => $tag->getAttribute('end'));
|
||||
'end' => $tag->getAttribute('end'),
|
||||
);
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ EOTEXT
|
|||
array(
|
||||
'revision_id' => null,
|
||||
'edit' => 'create',
|
||||
'fields' => $fields
|
||||
'fields' => $fields,
|
||||
));
|
||||
$template = $this->newInteractiveEditor($template)
|
||||
->setName('new-commit')
|
||||
|
|
|
@ -129,7 +129,7 @@ EOTEXT
|
|||
$info = $conduit->callMethodSynchronous(
|
||||
'maniphest.info',
|
||||
array(
|
||||
'task_id' => $task_id
|
||||
'task_id' => $task_id,
|
||||
));
|
||||
if ($info['status'] == $status) {
|
||||
return false;
|
||||
|
@ -139,7 +139,7 @@ EOTEXT
|
|||
array(
|
||||
'id' => $task_id,
|
||||
'status' => $status,
|
||||
'comments' => $comment
|
||||
'comments' => $comment,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ EOTEXT
|
|||
'show' => array(
|
||||
'help' =>
|
||||
'Show the command which would be issued, but do not actually '.
|
||||
'commit anything.'
|
||||
'commit anything.',
|
||||
),
|
||||
'revision' => array(
|
||||
'param' => 'revision_id',
|
||||
'help' =>
|
||||
'Commit a specific revision. If you do not specify a revision, '.
|
||||
'arc will look for committable revisions.',
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ EOTEXT
|
|||
'lintall' => '--head suppresses lint.',
|
||||
'advice' => '--head suppresses lint.',
|
||||
),
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
return $arguments;
|
||||
|
|
|
@ -70,13 +70,13 @@ EOTEXT
|
|||
'param' => 'revision_id',
|
||||
'help' =>
|
||||
'Instead of exporting changes from the working copy, export them '.
|
||||
'from a Differential revision.'
|
||||
'from a Differential revision.',
|
||||
),
|
||||
'diff' => array(
|
||||
'param' => 'diff_id',
|
||||
'help' =>
|
||||
'Instead of exporting changes from the working copy, export them '.
|
||||
'from a Differential diff.'
|
||||
'from a Differential diff.',
|
||||
),
|
||||
'*' => 'paths',
|
||||
);
|
||||
|
|
|
@ -95,7 +95,7 @@ EOTEXT
|
|||
"With 'json', show lint warnings in machine-readable JSON format. ".
|
||||
"With 'none', show no lint warnings. ".
|
||||
"With 'compiler', show lint warnings in suitable for your editor. ".
|
||||
"With 'xml', show lint warnings in the Checkstyle XML format."
|
||||
"With 'xml', show lint warnings in the Checkstyle XML format.",
|
||||
),
|
||||
'only-new' => array(
|
||||
'param' => 'bool',
|
||||
|
@ -105,7 +105,7 @@ EOTEXT
|
|||
'engine' => array(
|
||||
'param' => 'classname',
|
||||
'help' =>
|
||||
'Override configured lint engine for this project.'
|
||||
'Override configured lint engine for this project.',
|
||||
),
|
||||
'apply-patches' => array(
|
||||
'help' =>
|
||||
|
@ -135,7 +135,7 @@ EOTEXT
|
|||
'help' => 'Lint all files in the project.',
|
||||
'conflicts' => array(
|
||||
'cache' => '--everything lints all files',
|
||||
'rev' => '--everything lints all files'
|
||||
'rev' => '--everything lints all files',
|
||||
),
|
||||
),
|
||||
'severity' => array(
|
||||
|
|
|
@ -499,7 +499,8 @@ EOTEXT
|
|||
} else {
|
||||
$copies[] = array(
|
||||
$change->getOldPath(),
|
||||
$change->getCurrentPath());
|
||||
$change->getCurrentPath(),
|
||||
);
|
||||
}
|
||||
break;
|
||||
case ArcanistDiffChangeType::TYPE_ADD:
|
||||
|
@ -864,7 +865,7 @@ EOTEXT
|
|||
'differential.query',
|
||||
array(
|
||||
'phids' => $phids,
|
||||
'arcanistProjects' => array($bundle->getProjectID())
|
||||
'arcanistProjects' => array($bundle->getProjectID()),
|
||||
));
|
||||
$revs = array();
|
||||
foreach ($dep_on_revs as $dep_on_rev) {
|
||||
|
@ -876,7 +877,8 @@ EOTEXT
|
|||
$base_args = array(
|
||||
'--force',
|
||||
'--skip-dependencies',
|
||||
'--nobranch');
|
||||
'--nobranch',
|
||||
);
|
||||
if (!$this->shouldCommit()) {
|
||||
$base_args[] = '--nocommit';
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ EOTEXT
|
|||
$started_phids[] = $conduit->callMethodSynchronous(
|
||||
'phrequent.push',
|
||||
array(
|
||||
'objectPHID' => $object_phid
|
||||
'objectPHID' => $object_phid,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ EOTEXT
|
|||
'engine' => array(
|
||||
'param' => 'classname',
|
||||
'help' =>
|
||||
'Override configured unit engine for this project.'
|
||||
'Override configured unit engine for this project.',
|
||||
),
|
||||
'coverage' => array(
|
||||
'help' => 'Always enable coverage information.',
|
||||
|
@ -80,7 +80,7 @@ EOTEXT
|
|||
'conflicts' => array(
|
||||
'json' => 'Only one output format allowed',
|
||||
'ugly' => 'Only one output format allowed',
|
||||
)
|
||||
),
|
||||
),
|
||||
'everything' => array(
|
||||
'help' => 'Run every test.',
|
||||
|
|
Loading…
Reference in a new issue