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
'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.',
),
));
'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'),
);
}
"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',
if (($o === $n) || !$ol || !$nl) {
return array(
array(array(0, $ol)),
- array(array(0, $nl))
+ array(array(0, $nl)),
);
}
array_merge($clients, array($hg)),
array(
'read' => $socket ? array($socket) : array(),
- 'except' => $socket ? array($socket) : array()
+ 'except' => $socket ? array($socket) : array(),
));
if (!$hg->update()) {
'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>',
'--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) {
'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>',
'%{column}',
'%{kind}',
'%{check}',
- '%{message}'))));
+ '%{message}',
+ ))),
+ );
}
public function getLinterConfigurationOptions() {
$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
'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;
$bookmarks[] = array(
'is_active' => $is_active,
'name' => $name,
- 'revision' => $revision);
+ 'revision' => $revision,
+ );
}
}
return array(
$future,
$assembly_dir.DIRECTORY_SEPARATOR.$xunit_temp,
- $cover_temp);
+ $cover_temp,
+ );
}
/**
$results[] = array(
'file' => $tag->getAttribute('file'),
'start' => $tag->getAttribute('start'),
- 'end' => $tag->getAttribute('end'));
+ 'end' => $tag->getAttribute('end'),
+ );
}
return $results;
}
array(
'revision_id' => null,
'edit' => 'create',
- 'fields' => $fields
+ 'fields' => $fields,
));
$template = $this->newInteractiveEditor($template)
->setName('new-commit')
$info = $conduit->callMethodSynchronous(
'maniphest.info',
array(
- 'task_id' => $task_id
+ 'task_id' => $task_id,
));
if ($info['status'] == $status) {
return false;
array(
'id' => $task_id,
'status' => $status,
- 'comments' => $comment
+ 'comments' => $comment,
));
}
'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.',
- )
+ ),
);
}
'lintall' => '--head suppresses lint.',
'advice' => '--head suppresses lint.',
),
- )
+ ),
);
return $arguments;
'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',
);
"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',
'engine' => array(
'param' => 'classname',
'help' =>
- 'Override configured lint engine for this project.'
+ 'Override configured lint engine for this project.',
),
'apply-patches' => array(
'help' =>
'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(
} else {
$copies[] = array(
$change->getOldPath(),
- $change->getCurrentPath());
+ $change->getCurrentPath(),
+ );
}
break;
case ArcanistDiffChangeType::TYPE_ADD:
'differential.query',
array(
'phids' => $phids,
- 'arcanistProjects' => array($bundle->getProjectID())
+ 'arcanistProjects' => array($bundle->getProjectID()),
));
$revs = array();
foreach ($dep_on_revs as $dep_on_rev) {
$base_args = array(
'--force',
'--skip-dependencies',
- '--nobranch');
+ '--nobranch',
+ );
if (!$this->shouldCommit()) {
$base_args[] = '--nocommit';
}
$started_phids[] = $conduit->callMethodSynchronous(
'phrequent.push',
array(
- 'objectPHID' => $object_phid
+ 'objectPHID' => $object_phid,
));
}
'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.',
'conflicts' => array(
'json' => 'Only one output format allowed',
'ugly' => 'Only one output format allowed',
- )
+ ),
),
'everything' => array(
'help' => 'Run every test.',